lib/opencl_ruby_ffi/Context.rb
def devices
      @_devices ||= begin
        n = self.num_devices
        ptr2 = MemoryPointer::new( Device, n )
        error = OpenCL.clGetContextInfo(self, DEVICES, Device.size*n, ptr2, nil)
        error_check(error)
        ptr2.get_array_of_pointer(0, n).collect { |device_ptr|
          Device::new(device_ptr)
        }
      end
    end
# Returns an Array of Device associated to the Context
Returns an Array of Device associated to the Context
Returns an Array of Device associated to the Context
def devices
      @_devices ||= begin
        n = self.num_devices
        ptr2 = MemoryPointer::new( Device, n )
        error = OpenCL.clGetContextInfo(self, DEVICES, Device.size*n, ptr2, nil)
        error_check(error)
        ptr2.get_array_of_pointer(0, n).collect { |device_ptr|
          Device::new(device_ptr)
        }
      end
    end
def devices @_devices ||= begin n = self . num_devices ptr2 = MemoryPointer :: new ( Device , n ) error = OpenCL . clGetContextInfo ( self , DEVICES , Device . size * n , ptr2 , nil ) error_check ( error ) ptr2 . get_array_of_pointer ( 0 , n ) . collect { | device_ptr | Device :: new ( device_ptr ) } end end
Returns an Array of Device associated to the Context
Returns an Array of Device associated to the Context