lib/opencl_ruby_ffi/Program.rb
def devices
      @_devices ||= begin
        n = self.num_devices
        ptr2 = MemoryPointer::new( Device, n )
        error = OpenCL.clGetProgramInfo(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 the Array of Device the Program is associated with
Returns the Array of Device the Program is associated with
Returns the Array of Device the Program is associated with
def devices
      @_devices ||= begin
        n = self.num_devices
        ptr2 = MemoryPointer::new( Device, n )
        error = OpenCL.clGetProgramInfo(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 . clGetProgramInfo ( 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 the Array of Device the Program is associated with
Returns the Array of Device the Program is associated with