lib/opencl_ruby_ffi/Platform.rb
# Creates a Context gathering devices of a certain type and belonging to this Platform
#
# ==== Attributes
#
# * +type+ - type of device to be used
# * +options+ - if given, a hash of named options
# * +block+ - if provided, a callback invoked when error arise in the context. Signature of the callback is { |Pointer to null terminated c string, Pointer to binary data, :size_t number of bytes of binary data, Pointer to user_data| ... }
#
# ==== Options
# 
# * +:properties+ - a list of :cl_context_properties, the Platform will be prepended
# * +:user_data+ - an Pointer or an object that can be converted into one using to_ptr. The pointer is passed to the callback.
Creates a Context gathering devices of a certain type and belonging to this Platform
Attributes



Options

+:properties+ - a list of :cl_context_properties, the Platform will be prepended
+:user_data+ - an Pointer or an object that can be converted into one using to_ptr. The pointer is passed to the callback.
Creates a Context gathering devices of a certain type and belonging to this Platform Attributes Options + : properties + - a list of : cl_context_properties the Platform will be prepended + : user_data + - an Pointer or an object that can be converted into one using to_ptr . The pointer is passed to the callback .
def create_context_from_type(type, options = {}, &block)
      props = [ Context::PLATFORM, self ]
      if options[:properties] then
        props = props +  options[:properties]
      else
        props.push( 0 )
      end
      opts = options.clone
      opts[:properties] = props
      OpenCL.create_context_from_type(type, opts, &block)
    end
def create_context_from_type ( type , options = { } , & block ) props = [ Context :: PLATFORM , self ] if options [ :properties ] then props = props + options [ :properties ] else props . push ( 0 ) end opts = options . clone opts [ :properties ] = props OpenCL . create_context_from_type ( type , opts , & block ) end
Creates a Context gathering devices of a certain type and belonging to this Platform
 Attributes
Creates a Context gathering devices of a certain type and belonging to this Platform Attributes
type
options
block