opencl_ruby_ffi 0.997 → 0.998

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4c6d294756964590d3ca64856f07e0d27a1cd958
4
- data.tar.gz: 0f5359b20f08865399a7dc72a3d5ecb2d5ded52f
3
+ metadata.gz: 011d95c065f199af11900e31c3ea7934c05adcec
4
+ data.tar.gz: e9f298c20e30f0f7e1cb6491063ca594a7349d78
5
5
  SHA512:
6
- metadata.gz: 8c9cacd57d48ef0dd809af9cee6d594c205dca00062d47274c0f932b6f02e9716b5c36e1f2a702598f086c9dc0ecae8fb48fe554d314f03918fde66975f025d6
7
- data.tar.gz: 9eba6ab841b34ce1dc92659a07a186aa53c7b0967873aa71166a36667cd594a7bdda07a4cb80d3378c8256fa352ae31bfafb7f3122baf9ed53fdd6edbc7f0396
6
+ metadata.gz: ac99570df0bd52c1f0efd2464979bbfdd46b9af25a08d4cdaeab21de6264fce83ee5404625a6ddfdc0f051e6d3e96b8b0132e2f91584b967ed1e78b0267b21c2
7
+ data.tar.gz: 08b3062f79979f57ff7f7df0c9a49d5ffe4f3c76b1828879e235b8059945b6d1a8a18f077eb97f4f7585b0ca07a738b38d503aae9b36ca3b9d8b221e2486387a
@@ -158,18 +158,16 @@ module OpenCL
158
158
 
159
159
  # Extracts the :event_wait_list named option from the hash given and returns a tuple containing the number of events and a pointer to those events
160
160
  def get_event_wait_list( options )
161
+ events = options[:event_wait_list]
162
+ events = [events].flatten if events
163
+ events_p = nil
161
164
  num_events = 0
162
- events = nil
163
- if options[:event_wait_list] then
164
- num_events = options[:event_wait_list].length
165
- if num_events > 0 then
166
- events = FFI::MemoryPointer::new( Event, num_events )
167
- options[:event_wait_list].each_with_index { |e, i|
168
- events[i].write_pointer(e)
169
- }
170
- end
165
+ if events and events.size > 0 then
166
+ num_events = events.size
167
+ events_p = FFI::MemoryPointer::new( Event, num_events )
168
+ events_p.write_array_of_pointer(events)
171
169
  end
172
- return [num_events, events]
170
+ return [num_events, events_p]
173
171
  end
174
172
 
175
173
  # Extracts the :properties named option (for a CommandQueue) from the hash given and returns the properties values
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'opencl_ruby_ffi'
3
- s.version = "0.997"
3
+ s.version = "0.998"
4
4
  s.author = "Brice Videau"
5
5
  s.email = "brice.videau@imag.fr"
6
6
  s.homepage = "https://github.com/Nanosim-LIG/opencl-ruby"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opencl_ruby_ffi
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.997'
4
+ version: '0.998'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brice Videau
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-12-05 00:00:00.000000000 Z
11
+ date: 2015-01-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: narray