opencl_ruby_ffi 0.1 → 0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -120,7 +120,7 @@ module OpenCL
120
120
  return devs.collect { |dev|
121
121
  error = OpenCL.clGetProgramBuildInfo(self, dev, OpenCL::Program::BUILD_STATUS, ptr.size, ptr, nil)
122
122
  OpenCL.error_check(error)
123
- OpenCL::BuildStatus::new(ptr.read_cl_build_status)
123
+ [dev, OpenCL::BuildStatus::new(ptr.read_cl_build_status)]
124
124
  }
125
125
  end
126
126
 
@@ -132,7 +132,7 @@ module OpenCL
132
132
  return devs.collect { |dev|
133
133
  error = OpenCL.clGetProgramBuildInfo(self, dev, OpenCL::Program::BINARY_TYPE, ptr.size, ptr, nil)
134
134
  OpenCL.error_check(error)
135
- OpenCL::Program::BinaryType::new(ptr.read_cl_program_binary_type)
135
+ [dev, OpenCL::Program::BinaryType::new(ptr.read_cl_program_binary_type)]
136
136
  }
137
137
  end
138
138
 
@@ -147,7 +147,7 @@ module OpenCL
147
147
  ptr2 = FFI::MemoryPointer.new( ptr1.read_size_t )
148
148
  error = OpenCL.clGetProgramBuildInfo(self, dev, OpenCL::Program::BUILD_OPTIONS, ptr1.read_size_t, ptr2, nil)
149
149
  OpenCL.error_check(error)
150
- ptr2.read_string
150
+ [dev, ptr2.read_string]
151
151
  }
152
152
  end
153
153
 
@@ -162,7 +162,7 @@ module OpenCL
162
162
  ptr2 = FFI::MemoryPointer.new( ptr1.read_size_t )
163
163
  error = OpenCL.clGetProgramBuildInfo(self, dev, OpenCL::Program::BUILD_LOG, ptr1.read_size_t, ptr2, nil)
164
164
  OpenCL.error_check(error)
165
- ptr2.read_string
165
+ [dev, ptr2.read_string]
166
166
  }
167
167
  end
168
168
 
@@ -179,8 +179,9 @@ module OpenCL
179
179
  error = OpenCL.clGetProgramInfo(self, Program::BINARIES, total_size, bin_array, nil)
180
180
  OpenCL.error_check(error)
181
181
  bins = []
182
+ devs = self.devices
182
183
  sizes.each_with_index { |s, i|
183
- bins.push bin_array[i].read_pointer.read_bytes(s)
184
+ bins.push [devs, bin_array[i].read_pointer.read_bytes(s)]
184
185
  }
185
186
  return bins
186
187
  end
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'opencl_ruby_ffi'
3
- s.version = "0.1"
3
+ s.version = "0.2"
4
4
  s.author = "Brice Videau"
5
5
  s.email = "brice.videau@imag.fr"
6
6
  s.homepage = "https://forge.imag.fr/projects/opencl-ruby/"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opencl_ruby_ffi
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.1'
4
+ version: '0.2'
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: