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



1688
1689
1690
# File 'lib/opencl_ruby_ffi/CommandQueue.rb', line 1688

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

#enqueue_svm_map(svm_ptr, size, 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

  • size - the size of the region to map

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

  • options - a hash containing named options

Options

  • :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



1730
1731
1732
# File 'lib/opencl_ruby_ffi/CommandQueue.rb', line 1730

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

#enqueue_svm_memcpy(dst_ptr, src_ptr, size, 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

  • size - the size of data to copy

  • options - a hash containing named options

Options

  • :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



1668
1669
1670
# File 'lib/opencl_ruby_ffi/CommandQueue.rb', line 1668

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

#enqueue_svm_memfill(svm_ptr, pattern, size, options = {}) ⇒ Object

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

  • size - the size of the area to fill

Options

  • :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



1708
1709
1710
# File 'lib/opencl_ruby_ffi/CommandQueue.rb', line 1708

def enqueue_svm_memfill( svm_ptr, pattern, size, options = {})
  return OpenCL.enqueue_svm_memfill(self, svm_ptr, pattern, size, 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



1748
1749
1750
# File 'lib/opencl_ruby_ffi/CommandQueue.rb', line 1748

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



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

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