Module: OpenCL::CommandQueue::OpenCL12

Included in:
OpenCL::CommandQueue
Defined in:
lib/opencl_ruby_ffi/CommandQueue.rb

Instance Method Summary collapse

Instance Method Details

#enqueue_fill_buffer(buffer, pattern, options = {}) ⇒ Object

Enqueues a command to fill a Buffer with the given pattern using the CommandQueue

Attributes

  • buffer - a Buffer object to be filled

  • pattern - the Pointer (or convertible to Pointer using to_ptr) to the memory area where the pattern is stored

  • options - a hash containing named options

Options

  • :event_wait_list - if provided, a list of Event to wait upon before executing the command

  • :offset - if provided indicates the offset inside the Buffer of the area to be filled, else 0

  • :size - if provided indicates the size of data to fill, else the maximum size is filled

  • :pattern_size - if provided indicates the size of the pattern, else the maximum pattern data is used

Returns

the Event associated with the command



1605
1606
1607
# File 'lib/opencl_ruby_ffi/CommandQueue.rb', line 1605

def enqueue_fill_buffer( buffer, pattern, options = {} )
  return OpenCL.enqueue_fill_buffer( self, buffer, pattern, options )
end

#enqueue_fill_image(image, fill_color, options = {}) ⇒ Object

Enqueues a command to fill an Image with the given color using the CommandQueue

Attributes

  • image - an Image object to be filled

  • fill_color - the Pointer (or convertible to Pointer using to_ptr) to the memory area where the color is stored

  • options - a hash containing named options

Options

  • :event_wait_list - if provided, a list of Event to wait upon before executing the command

  • :origin - if provided indicates the origin of the region to fill inside the Image, else [0, 0, 0]

  • :region - if provided indicates the dimension of the region to fill, else the maximum region is filled

Returns

the Event associated with the command



1626
1627
1628
# File 'lib/opencl_ruby_ffi/CommandQueue.rb', line 1626

def enqueue_fill_image( image, fill_color, options = {} )
  return OpenCL.enqueue_fill_image( self, image, fill_color, options )
end

#enqueue_migrate_mem_objects(mem_objects, options = {}) ⇒ Object

Enqueues a command to indicate which device a set of memory objects should be migrated to using the CommandQueue

Attributes

  • mem_objects - the Mem objects to migrate

  • options - a hash containing named options

Options

  • :flags - a single or an Array of :cl_mem_migration flags

  • :event_wait_list - if provided, a list of Event to wait upon before executing the command

Returns

the Event associated with the command



1645
1646
1647
# File 'lib/opencl_ruby_ffi/CommandQueue.rb', line 1645

def enqueue_migrate_mem_objects( mem_objects, options = {} )
  return OpenCL.enqueue_migrate_mem_objects( self, mem_objects, options )
end