lib/opencl_ruby_ffi/Context.rb
# Returns an Array of ImageFormat that are supported for a given image type in the Context
#
# ==== Attributes
# * +image_type+ - a :cl_mem_object_type specifying the type of Image being queried
# * +options+ - a hash containing named options
#
# ==== Options
# 
# * +:flags+ - a single or an Array of :cl_mem_flags specifying the flags to be used when creating the Buffer
Returns an Array of ImageFormat that are supported for a given image type in the Context
Attributes
+image_type+ - a :cl_mem_object_type specifying the type of Image being queried
+options+ - a hash containing named options

Options

+:flags+ - a single or an Array of :cl_mem_flags specifying the flags to be used when creating the Buffer
Returns an Array of ImageFormat that are supported for a given image type in the Context Attributes + image_type + - a : cl_mem_object_type specifying the type of Image being queried + options + - a hash containing named options Options + : flags + - a single or an Array of : cl_mem_flags specifying the flags to be used when creating the Buffer
def supported_image_formats( image_type, options = {} )
      flags = get_flags( options )
      flags = Mem::Flags::READ_WRITE if flags.to_i == 0 
      num_image_formats = MemoryPointer::new( :cl_uint )
      error = OpenCL.clGetSupportedImageFormats( self, flags, image_type, 0, nil, num_image_formats )
      error_check(error)
      num_entries = num_image_formats.read_cl_uint
      image_formats = MemoryPointer::new( ImageFormat, num_entries )
      error = OpenCL.clGetSupportedImageFormats( self, flags, image_type, num_entries, image_formats, nil )
      error_check(error)
      return num_entries.times.collect { |i|
        ImageFormat::new( image_formats + i * ImageFormat.size )
      }
    end
def supported_image_formats ( image_type , options = { } ) flags = get_flags ( options ) flags = Mem :: Flags :: READ_WRITE if flags . to_i == 0 num_image_formats = MemoryPointer :: new ( :cl_uint ) error = OpenCL . clGetSupportedImageFormats ( self , flags , image_type , 0 , nil , num_image_formats ) error_check ( error ) num_entries = num_image_formats . read_cl_uint image_formats = MemoryPointer :: new ( ImageFormat , num_entries ) error = OpenCL . clGetSupportedImageFormats ( self , flags , image_type , num_entries , image_formats , nil ) error_check ( error ) return num_entries . times . collect { | i | ImageFormat :: new ( image_formats + i * ImageFormat . size ) } end
Returns an Array of ImageFormat that are supported for a given image type in the Context
 Attributes
 +image_type+ - a :cl_mem_object_type specifying the type of Image being queried
 +options+ - a hash containing named options
Returns an Array of ImageFormat that are supported for a given image type in the Context Attributes + image_type + - a : cl_mem_object_type specifying the type of Image being queried + options + - a hash containing named options
#ensure default READ_WRITE, Intel bug.
image_type
options