lib/opencl_ruby_ffi/Program.rb
# Returns the build log for each Device associated to the Program or the Device(s) specified. Returns an Array of tuple [ Device, String ]
Returns the build log for each Device associated to the Program or the Device(s) specified. Returns an Array of tuple [ Device, String ]
Returns the build log for each Device associated to the Program or the Device ( s ) specified . Returns an Array of tuple [ Device String ]
def build_log(devs = nil)
      devs = self.devices if not devs
      devs = [devs].flatten
      return devs.collect { |dev|
        ptr1 = MemoryPointer::new( :size_t, 1)
        error = OpenCL.clGetProgramBuildInfo(self, dev, BUILD_LOG, 0, nil, ptr1)
        error_check(error)
        ptr2 = MemoryPointer::new( ptr1.read_size_t )
        error = OpenCL.clGetProgramBuildInfo(self, dev, BUILD_LOG, ptr1.read_size_t, ptr2, nil)
        error_check(error)
        [dev, ptr2.read_string]
      }
    end
def build_log ( devs = nil ) devs = self . devices if not devs devs = [ devs ] . flatten return devs . collect { | dev | ptr1 = MemoryPointer :: new ( :size_t , 1 ) error = OpenCL . clGetProgramBuildInfo ( self , dev , BUILD_LOG , 0 , nil , ptr1 ) error_check ( error ) ptr2 = MemoryPointer :: new ( ptr1 . read_size_t ) error = OpenCL . clGetProgramBuildInfo ( self , dev , BUILD_LOG , ptr1 . read_size_t , ptr2 , nil ) error_check ( error ) [ dev , ptr2 . read_string ] } end
Returns the build log for each Device associated to the Program or the Device(s) specified.
Returns the build log for each Device associated to the Program or the Device ( s ) specified .
devs