lib/opencl_ruby_ffi/Program.rb
# Returns an Array of String representing the Kernel names inside the Program
Returns an Array of String representing the Kernel names inside the Program
Returns an Array of String representing the Kernel names inside the Program
def kernel_names
        if context.platform.version_number < 1.2 then
          return kernels.collect(&:name)
        else
          kernel_names_size = MemoryPointer::new( :size_t )
          error = OpenCL.clGetProgramInfo( self, KERNEL_NAMES, 0, nil, kernel_names_size)
          error_check(error)
          k_names = MemoryPointer::new( kernel_names_size.read_size_t )
          error = OpenCL.clGetProgramInfo( self, KERNEL_NAMES, kernel_names_size.read_size_t, k_names, nil)
          error_check(error)
          k_names_string = k_names.read_string
          return k_names_string.split(";")
        end
      end
def kernel_names if context . platform . version_number < 1.2 then return kernels . collect ( & :name ) else kernel_names_size = MemoryPointer :: new ( :size_t ) error = OpenCL . clGetProgramInfo ( self , KERNEL_NAMES , 0 , nil , kernel_names_size ) error_check ( error ) k_names = MemoryPointer :: new ( kernel_names_size . read_size_t ) error = OpenCL . clGetProgramInfo ( self , KERNEL_NAMES , kernel_names_size . read_size_t , k_names , nil ) error_check ( error ) k_names_string = k_names . read_string return k_names_string . split ( ";" ) end end
Returns an Array of String representing the Kernel names inside the Program
Returns an Array of String representing the Kernel names inside the Program