Module: OpenCL::CommandQueue::OpenCL20

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

Instance Method Summary collapse

Instance Method Details

#enqueue_svm_free(svm_pointers, options = {}, &block) ⇒ Object

Enqueues a command that frees SVMPointers (or Pointers using a callback) using the CommandQueue

Attributes

  • svm_pointer - a single or an Array of SVMPointer (or Pointer)

  • options - a hash containing named options

  • block - if provided, a callback invoked to free the pointers. Signature of the callback is { |CommandQueue, num_pointers, Pointer to an array of num_pointers Pointers, Pointer to user_data| … }

Options

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

  • :user_data - if provided, a Pointer (or convertible to using to_ptr) that will be passed to the callback

Returns

the Event associated with the command



1694
1695
1696
# File 'lib/opencl_ruby_ffi/CommandQueue.rb', line 1694

def enqueue_svm_free( svm_pointers, options = {}, &block)
  return OpenCL.enqueue_svm_free(self, svm_pointers, options, &block)
end

#enqueue_svm_map(svm_ptr, map_flags, options = {}) ⇒ Object

Enqueues a command to map an Image into host memory using the CommandQueue

Attributes

  • svm_ptr - the SVMPointer to the area to map

  • map_flags - a single or an Array of :cl_map_flags flags

  • options - a hash containing named options

Options

  • :size - the size of the region to map

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

  • :blocking_map - if provided indicates if the command blocks until the region is mapped

  • :blocking - if provided indicates if the command blocks until the region is mapped

Returns

the Event associated with the command



1737
1738
1739
# File 'lib/opencl_ruby_ffi/CommandQueue.rb', line 1737

def enqueue_svm_map( svm_ptr, map_flags, options = {} )
  return OpenCL.enqueue_svm_map( self, svm_ptr, map_flags, options )
end

#enqueue_svm_memcpy(dst_ptr, src_ptr, options = {}) ⇒ Object

Enqueues a command to copy from or to an SVMPointer using the CommandQueue

Attributes

  • dst_ptr - the Pointer (or convertible to Pointer using to_ptr) or SVMPointer to be written to

  • src_ptr - the Pointer (or convertible to Pointer using to_ptr) or SVMPointer to be read from

  • options - a hash containing named options

Options

  • :size - the size of data to copy

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

  • :blocking_copy - if provided indicates if the command blocks until the copy finishes

  • :blocking - if provided indicates if the command blocks until the copy finishes

Returns

the Event associated with the command



1674
1675
1676
# File 'lib/opencl_ruby_ffi/CommandQueue.rb', line 1674

def enqueue_svm_memcpy( dst_ptr, src_ptr, options = {})
  return OpenCL.enqueue_svm_memcpy(self, dst_ptr, src_ptr, options)
end

#enqueue_svm_memfill(svm_ptr, pattern, options = {}) ⇒ Object Also known as: enqueue_svm_mem_fill

Enqueues a command to fill a an SVM memory area using the CommandQueue

Attributes

  • svm_ptr - the SVMPointer to the area to fill

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

Options

  • :size - the size of the area to fill

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

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

Returns

the Event associated with the command



1714
1715
1716
# File 'lib/opencl_ruby_ffi/CommandQueue.rb', line 1714

def enqueue_svm_memfill( svm_ptr, pattern, options = {})
  return OpenCL.enqueue_svm_memfill(self, svm_ptr, pattern, options)
end

#enqueue_svm_unmap(svm_ptr, options = {}) ⇒ Object

Enqueues a command to unmap a previously mapped SVM memory area using the CommandQueue

Attributes

  • svm_ptr - the SVMPointer of the area to be unmapped

  • options - a hash containing named options

Options

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

Returns

the Event associated with the command



1755
1756
1757
# File 'lib/opencl_ruby_ffi/CommandQueue.rb', line 1755

def enqueue_svm_unmap( svm_ptr, options = {} )
  return OpenCL.enqueue_svm_unmap( self, svm_ptr, options )
end

#sizeObject

Returns the OpenCL::CommandQueue::size info

Returns:

  • cl_uint



1654
# File 'lib/opencl_ruby_ffi/CommandQueue.rb', line 1654

get_info("CommandQueue", :cl_uint, "size")