lib/opencl_ruby_ffi/Kernel.rb
# Returns a String corresponding to the Arg type name
Returns a String corresponding to the Arg type name
Returns a String corresponding to the Arg type name
def type_name
          @_type_name ||= begin
            error_check(INVALID_OPERATION) if @kernel.context.platform.version_number < 1.2
            ptr1 = MemoryPointer::new( :size_t, 1)
            error = OpenCL.clGetKernelArgInfo(@kernel, @index, TYPE_NAME, 0, nil, ptr1)
            error_check(error)
            ptr2 = MemoryPointer::new( ptr1.read_size_t )
            error = OpenCL.clGetKernelArgInfo(@kernel, @index, TYPE_NAME, ptr1.read_size_t, ptr2, nil)
            error_check(error)
            ptr2.read_string
          end
        end
def type_name @_type_name ||= begin error_check ( INVALID_OPERATION ) if @kernel . context . platform . version_number < 1.2 ptr1 = MemoryPointer :: new ( :size_t , 1 ) error = OpenCL . clGetKernelArgInfo ( @kernel , @index , TYPE_NAME , 0 , nil , ptr1 ) error_check ( error ) ptr2 = MemoryPointer :: new ( ptr1 . read_size_t ) error = OpenCL . clGetKernelArgInfo ( @kernel , @index , TYPE_NAME , ptr1 . read_size_t , ptr2 , nil ) error_check ( error ) ptr2 . read_string end end
Returns a String corresponding to the Arg type name
Returns a String corresponding to the Arg type name