lib/opencl_ruby_ffi/Context.rb
# Returns the number of devices associated to the Context
Returns the number of devices associated to the Context
Returns the number of devices associated to the Context
def num_devices
      @_num_devices ||= begin
        ptr = MemoryPointer::new( :size_t )
        error = OpenCL.clGetContextInfo(self, DEVICES, 0, nil, ptr)
        error_check(error)
        ptr.read_size_t / Platform.size
      end
    end
def num_devices @_num_devices ||= begin ptr = MemoryPointer :: new ( :size_t ) error = OpenCL . clGetContextInfo ( self , DEVICES , 0 , nil , ptr ) error_check ( error ) ptr . read_size_t / Platform . size end end
Returns the number of devices associated to the Context
Returns the number of devices associated to the Context