opencl_ruby_ffi 1.0.1 → 1.0.2

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: 3da147b1b6ee1301a55b8101c54b79d047e080e9
4
- data.tar.gz: f99e42e63b21a195ac80653093fe6deb24a79c0c
3
+ metadata.gz: b70a1f7693cf95d7be13695e3462dccfa46af4d3
4
+ data.tar.gz: 4a191813b7b7638b33931afaa74aeccd9246ba65
5
5
  SHA512:
6
- metadata.gz: fbefcbc0ed03ca736b67202e294704af7568631a1d799b557f6fdbe36162e1a93ba9dd26854278627b9957e831e21ffab7e7c853246e7b9010a49f545223e01a
7
- data.tar.gz: cbaaa49c9492fbe065ddc17c813be17329d0b92a5738533f4eb13366b4ae256c46639790cdbed9d98974c5f9ecb88e841bef8e241d6b18561fc357c49a14fbef
6
+ metadata.gz: ff3e4bf3b550df5a645eb3a738f3510c1e9bf5551bd8619210bc489d0ac9bbce82ef9637007b71e94f41320034f8232b18b39a866da251d2692fcebf310bc9bc
7
+ data.tar.gz: 86db94d389802daf7dd038b0a08c2e360671a00b219fb8149c2ad9a448b4246c3388ec397bcfcca0196a7ae908ac27f24588212171627cf0d5a8660289c6ef90
@@ -53,13 +53,16 @@ module OpenCL
53
53
  # ==== Options
54
54
  #
55
55
  # * +:flags+ - a single or an Array of :cl_mem_flags specifying the flags to be used when creating the Image
56
- def self.create_from_GL_buffer( context, bufobj, options = {} )
56
+ def self.create_from_gl_buffer( context, bufobj, options = {} )
57
57
  flags = get_flags( options )
58
58
  error = FFI::MemoryPointer::new( :cl_int )
59
59
  buff = clCreateFromGLBuffer( context, flags, bufobj, error )
60
60
  error_check(error.read_cl_int)
61
61
  return Buffer::new( buff, false )
62
62
  end
63
+ class << self
64
+ alias :create_from_GL_buffer :create_from_gl_buffer
65
+ end
63
66
 
64
67
  # Maps the cl_mem OpenCL object of type CL_MEM_OBJECT_BUFFER
65
68
  class Buffer < Mem
@@ -549,7 +549,7 @@ module OpenCL
549
549
  # ==== Returns
550
550
  #
551
551
  # the Event associated with the command
552
- def self.enqueue_acquire_GL_objects( command_queue, mem_objects, options = {} )
552
+ def self.enqueue_acquire_gl_objects( command_queue, mem_objects, options = {} )
553
553
  num_objs = [mem_objects].flatten.length
554
554
  objs = nil
555
555
  if num_objs > 0 then
@@ -565,7 +565,7 @@ module OpenCL
565
565
  return Event::new(event.read_pointer, false)
566
566
  end
567
567
  class << self
568
- alias :enqueue_acquire_gl_objects :enqueue_acquire_GL_objects
568
+ alias :enqueue_acquire_GL_objects :enqueue_acquire_gl_objects
569
569
  end
570
570
 
571
571
  # Release OpenCL Mem objects that have been created from OpenGL objects and previously acquired
@@ -583,7 +583,7 @@ module OpenCL
583
583
  # ==== Returns
584
584
  #
585
585
  # the Event associated with the command
586
- def self.enqueue_release_GL_objects( command_queue, mem_objects, options = {} )
586
+ def self.enqueue_release_gl_objects( command_queue, mem_objects, options = {} )
587
587
  num_objs = [mem_objects].flatten.length
588
588
  objs = nil
589
589
  if num_objs > 0 then
@@ -599,7 +599,7 @@ module OpenCL
599
599
  return Event::new(event.read_pointer, false)
600
600
  end
601
601
  class << self
602
- alias :enqueue_release_gl_objects :enqueue_release_GL_objects
602
+ alias :enqueue_release_GL_objects :enqueue_release_gl_objects
603
603
  end
604
604
 
605
605
  # Enqueues a command to fill a Buffer with the given pattern
@@ -913,11 +913,11 @@ module OpenCL
913
913
  else
914
914
  opts = options.dup
915
915
  opts[:local_work_size] = [1]
916
- return enqueue_NDrange_kernel( command_queue, kernel, [1], opts )
916
+ return enqueue_ndrange_kernel( command_queue, kernel, [1], opts )
917
917
  end
918
918
  end
919
919
 
920
- # Enqueues a kernel as a NDrange
920
+ # Enqueues a kernel as a ndrange
921
921
  #
922
922
  # ==== Attributes
923
923
  #
@@ -935,7 +935,7 @@ module OpenCL
935
935
  # ==== Returns
936
936
  #
937
937
  # the Event associated with the command
938
- def self.enqueue_NDrange_kernel( command_queue, kernel, global_work_size, options={} )
938
+ def self.enqueue_ndrange_kernel( command_queue, kernel, global_work_size, options={} )
939
939
  gws = FFI::MemoryPointer::new( :size_t, global_work_size.length )
940
940
  global_work_size.each_with_index { |g, i|
941
941
  gws[i].write_size_t(g)
@@ -961,7 +961,7 @@ module OpenCL
961
961
  return Event::new(event.read_pointer, false)
962
962
  end
963
963
  class << self
964
- alias :enqueue_nd_range_kernel :enqueue_NDrange_kernel
964
+ alias :enqueue_NDrange_kernel :enqueue_ndrange_kernel
965
965
  end
966
966
 
967
967
  # Enqueues a barrier on a list of envents
@@ -1104,7 +1104,7 @@ module OpenCL
1104
1104
  return OpenCL.enqueue_task( self, kernel, options )
1105
1105
  end
1106
1106
 
1107
- # Enqueues a kernel as a NDrange using the CommandQueue
1107
+ # Enqueues a kernel as a ndrange using the CommandQueue
1108
1108
  #
1109
1109
  # ==== Attributes
1110
1110
  #
@@ -1121,10 +1121,10 @@ module OpenCL
1121
1121
  # ==== Returns
1122
1122
  #
1123
1123
  # the Event associated with the command
1124
- def enqueue_NDrange_kernel( kernel, global_work_size, options = {} )
1125
- return OpenCL.enqueue_NDrange_kernel( self, kernel, global_work_size, options )
1124
+ def enqueue_ndrange_kernel( kernel, global_work_size, options = {} )
1125
+ return OpenCL.enqueue_ndrange_kernel( self, kernel, global_work_size, options )
1126
1126
  end
1127
- alias :enqueue_nd_range_kernel :enqueue_NDrange_kernel
1127
+ alias :enqueue_NDrange_kernel :enqueue_ndrange_kernel
1128
1128
 
1129
1129
  # Enqueues a command to write to a Buffer object from host memory using the CommandQueue
1130
1130
  #
@@ -1488,10 +1488,10 @@ module OpenCL
1488
1488
  # ==== Returns
1489
1489
  #
1490
1490
  # the Event associated with the command
1491
- def enqueue_acquire_GL_objects( mem_objects, options = {} )
1492
- return OpenCL.enqueue_acquire_GL_objects( self, mem_objects, options )
1491
+ def enqueue_acquire_gl_objects( mem_objects, options = {} )
1492
+ return OpenCL.enqueue_acquire_gl_objects( self, mem_objects, options )
1493
1493
  end
1494
- alias :enqueue_acquire_gl_objects :enqueue_acquire_GL_objects
1494
+ alias :enqueue_acquire_GL_objects :enqueue_acquire_gl_objects
1495
1495
 
1496
1496
  # Release OpenCL Mem objects that have been created from OpenGL objects and previously acquired using the CommandQueue
1497
1497
  #
@@ -1507,10 +1507,10 @@ module OpenCL
1507
1507
  # ==== Returns
1508
1508
  #
1509
1509
  # the Event associated with the command
1510
- def enqueue_release_GL_objects( mem_objects, options = {} )
1511
- return OpenCL.enqueue_release_GL_objects( self, mem_objects, options )
1510
+ def enqueue_release_gl_objects( mem_objects, options = {} )
1511
+ return OpenCL.enqueue_release_gl_objects( self, mem_objects, options )
1512
1512
  end
1513
- alias :enqueue_release_gl_objects :enqueue_release_GL_objects
1513
+ alias :enqueue_release_GL_objects :enqueue_release_gl_objects
1514
1514
 
1515
1515
  # Enqueues a command to map a Buffer into host memory using the CommandQueue
1516
1516
  #
@@ -1690,8 +1690,8 @@ module OpenCL
1690
1690
  # ==== Returns
1691
1691
  #
1692
1692
  # the Event associated with the command
1693
- def enqueue_svm_mem_fill(command_queue, svm_ptr, pattern, size, options = {})
1694
- return OpenCL.enqueue_svm_mem_fill(self, svm_ptr, pattern, size, options)
1693
+ def enqueue_svm_memfill(command_queue, svm_ptr, pattern, size, options = {})
1694
+ return OpenCL.enqueue_svm_memfill(self, svm_ptr, pattern, size, options)
1695
1695
  end
1696
1696
 
1697
1697
  # Enqueues a command to map an Image into host memory using the CommandQueue
@@ -162,9 +162,10 @@ module OpenCL
162
162
  # ==== Options
163
163
  #
164
164
  # * +:flags+ - a single or an Array of :cl_mem_flags specifying the flags to be used when creating the Image
165
- def create_from_GL_buffer( bufobj, options = {} )
166
- return OpenCL.create_from_GL_buffer( self, bufobj, options )
165
+ def create_from_gl_buffer( bufobj, options = {} )
166
+ return OpenCL.create_from_gl_buffer( self, bufobj, options )
167
167
  end
168
+ alias :create_from_GL_buffer :create_from_gl_buffer
168
169
 
169
170
  # Creates an Image in the Context from an OpenGL render buffer
170
171
  #
@@ -176,9 +177,10 @@ module OpenCL
176
177
  # ==== Options
177
178
  #
178
179
  # * +:flags+ - a single or an Array of :cl_mem_flags specifying the flags to be used when creating the Image
179
- def create_from_GL_render_buffer( renderbuffer, options = {} )
180
- return OpenCL.create_from_GL_render_buffer( self, renderbuffer, options )
180
+ def create_from_gl_render_buffer( renderbuffer, options = {} )
181
+ return OpenCL.create_from_gl_render_buffer( self, renderbuffer, options )
181
182
  end
183
+ alias :create_from_GL_render_buffer :create_from_gl_render_buffer
182
184
 
183
185
  # Creates an Image in the Context from an OpenGL texture
184
186
  #
@@ -192,9 +194,10 @@ module OpenCL
192
194
  #
193
195
  # * +:miplevel+ - a :GLint specifying the mipmap level to be used (default 0)
194
196
  # * +:flags+ - a single or an Array of :cl_mem_flags specifying the flags to be used when creating the Image
195
- def create_from_GL_texture( texture_target, texture, options = {} )
196
- return OpenCL.create_from_GL_texture( self, texture_target, texture, options )
197
+ def create_from_gl_texture( texture_target, texture, options = {} )
198
+ return OpenCL.create_from_gl_texture( self, texture_target, texture, options )
197
199
  end
200
+ alias :create_from_GL_texture :create_from_gl_texture
198
201
 
199
202
  # Creates an Image in the Context from an OpenGL 2D texture
200
203
  #
@@ -208,9 +211,10 @@ module OpenCL
208
211
  #
209
212
  # * +:miplevel+ - a :GLint specifying the mipmap level to be used (default 0)
210
213
  # * +:flags+ - a single or an Array of :cl_mem_flags specifying the flags to be used when creating the Image
211
- def create_from_GL_texture_2D( texture_target, texture, options = {} )
212
- return OpenCL.create_from_GL_texture_2D( self, texture_target, texture, options )
214
+ def create_from_gl_texture_2d( texture_target, texture, options = {} )
215
+ return OpenCL.create_from_gl_texture_2d( self, texture_target, texture, options )
213
216
  end
217
+ alias :create_from_GL_texture_2D :create_from_gl_texture_2d
214
218
 
215
219
  # Creates an Image in the Context from an OpenGL 3D texture
216
220
  #
@@ -224,9 +228,10 @@ module OpenCL
224
228
  #
225
229
  # * +:miplevel+ - a :GLint specifying the mipmap level to be used (default 0)
226
230
  # * +:flags+ - a single or an Array of :cl_mem_flags specifying the flags to be used when creating the Image
227
- def create_from_GL_texture_3D( texture_target, texture, options = {} )
228
- return OpenCL.create_from_GL_texture_3D( self, texture_target, texture, options )
231
+ def create_from_gl_texture_3d( texture_target, texture, options = {} )
232
+ return OpenCL.create_from_gl_texture_3d( self, texture_target, texture, options )
229
233
  end
234
+ alias :create_from_GL_texture_3D :create_from_gl_texture_3d
230
235
 
231
236
  # Creates an Image in the Context
232
237
  #
@@ -254,9 +259,10 @@ module OpenCL
254
259
  #
255
260
  # * +:flags+ - a single or an Array of :cl_mem_flags specifying the flags to be used when creating the Buffer
256
261
  # * +:host_ptr+ - if provided, the Pointer (or convertible to Pointer using to_ptr) to the memory area to use
257
- def create_image_1D( format, width, options = {} )
258
- return OpenCL.create_image_1D( self, format, width, options )
262
+ def create_image_1d( format, width, options = {} )
263
+ return OpenCL.create_image_1d( self, format, width, options )
259
264
  end
265
+ alias :create_image_1D :create_image_1d
260
266
 
261
267
  # Creates a 2D Image in the Context
262
268
  #
@@ -270,9 +276,10 @@ module OpenCL
270
276
  # * +:flags+ - a single or an Array of :cl_mem_flags specifying the flags to be used when creating the Buffer
271
277
  # * +:host_ptr+ - if provided, the Pointer (or convertible to Pointer using to_ptr) to the memory area to use
272
278
  # * +:row_pitch+ - if provided the row_pitch of data in host_ptr
273
- def create_image_2D( format, width, height, options = {} )
274
- return OpenCL.create_image_2D( self, format, width, height, options )
279
+ def create_image_2d( format, width, height, options = {} )
280
+ return OpenCL.create_image_2d( self, format, width, height, options )
275
281
  end
282
+ alias :create_image_2D :create_image_2d
276
283
 
277
284
  # Creates a 3D Image in the Context
278
285
  #
@@ -287,18 +294,20 @@ module OpenCL
287
294
  # * +:host_ptr+ - if provided, the Pointer (or convertible to Pointer using to_ptr) to the memory area to use
288
295
  # * +:row_pitch+ - if provided the row_pitch of data in host_ptr
289
296
  # * +:slice_pitch+ - if provided the slice_pitch of data in host_ptr
290
- def create_image_3D( format, width, height, depth, options = {} )
291
- return OpenCL.create_image_3D( self, format, width, height, depth, options )
297
+ def create_image_3d( format, width, height, depth, options = {} )
298
+ return OpenCL.create_image_3d( self, format, width, height, depth, options )
292
299
  end
300
+ alias :create_image_3D :create_image_3d
293
301
 
294
302
  # # Creates an Event in the Context from a GL sync
295
303
  # #
296
304
  # # ==== Attributes
297
305
  # #
298
306
  # # * +sync+ - a :GLsync representing the name of the sync object
299
- # def create_event_from_GL_sync_KHR( sync )
300
- # return OpenCL.create_event_from_GL_sync_KHR( self, sync )
307
+ # def create_event_from_gl_sync_khr( sync )
308
+ # return OpenCL.create_event_from_gl_sync_khr( self, sync )
301
309
  # end
310
+ # alias :create_event_from_GL_sync_KHR :create_event_from_gl_sync_khr
302
311
 
303
312
 
304
313
  # Creates a user Event in the Context
@@ -37,9 +37,9 @@ module OpenCL
37
37
  include InnerGenerator
38
38
  end
39
39
 
40
- # :stopdoc:
40
+ #:stopdoc:
41
41
  DRIVER_VERSION = 0x102D
42
- # :startdoc:
42
+ #:startdoc:
43
43
 
44
44
  # Returns an Array of String corresponding to the Device extensions
45
45
  def extensions
@@ -58,7 +58,7 @@ module OpenCL
58
58
  # #
59
59
  # # * +context+ - Context the created Event will be associated to
60
60
  # # * +sync+ - a :GLsync representing the name of the sync object
61
- # def self.create_event_from_GL_sync_KHR( context, sync )
61
+ # def self.create_event_from_gl_sync_khr( context, sync )
62
62
  # error = FFI::MemoryPointer::new(:cl_int)
63
63
  # event = clCreateEventFromGLsyncKHR(context, sync, error)
64
64
  # error_check(error.read_cl_int)
@@ -33,7 +33,7 @@ module OpenCL
33
33
  #
34
34
  # * +:flags+ - a single or an Array of :cl_mem_flags specifying the flags to be used when creating the Image
35
35
  # * +:host_ptr+ - if provided, the Pointer (or convertible to Pointer using to_ptr) to the memory area to use
36
- def self.create_image_1D( context, format, width, options = {} )
36
+ def self.create_image_1d( context, format, width, options = {} )
37
37
  if context.platform.version_number > 1.1 then
38
38
  desc = ImageDesc::new(Mem::IMAGE1D, width, 0, 0, 0, 0, 0, 0, 0, nil)
39
39
  return create_image( context, format, desc, options )
@@ -41,6 +41,9 @@ module OpenCL
41
41
  error_check(INVALID_OPERATION)
42
42
  end
43
43
  end
44
+ class << self
45
+ alias :create_image_1D :create_image_1d
46
+ end
44
47
 
45
48
  # Creates a 2D Image
46
49
  #
@@ -55,7 +58,7 @@ module OpenCL
55
58
  # * +:flags+ - a single or an Array of :cl_mem_flags specifying the flags to be used when creating the Image
56
59
  # * +:host_ptr+ - if provided, the Pointer (or convertible to Pointer using to_ptr) to the memory area to use
57
60
  # * +:row_pitch+ - if provided the row_pitch of data in host_ptr
58
- def self.create_image_2D( context, format, width, height, options = {} )
61
+ def self.create_image_2d( context, format, width, height, options = {} )
59
62
  row_pitch = 0
60
63
  row_pitch = options[:row_pitch] if options[:row_pitch]
61
64
  if context.platform.version_number > 1.1 then
@@ -69,6 +72,9 @@ module OpenCL
69
72
  error_check(error.read_cl_int)
70
73
  return Image::new(img_ptr, false)
71
74
  end
75
+ class << self
76
+ alias :create_image_2D :create_image_2d
77
+ end
72
78
 
73
79
  # Creates a 3D Image
74
80
  #
@@ -84,7 +90,7 @@ module OpenCL
84
90
  # * +:host_ptr+ - if provided, the Pointer (or convertible to Pointer using to_ptr) to the memory area to use
85
91
  # * +:row_pitch+ - if provided the row_pitch of data in host_ptr
86
92
  # * +:slice_pitch+ - if provided the slice_pitch of data in host_ptr
87
- def self.create_image_3D( context, format, width, height, depth, options = {} )
93
+ def self.create_image_3d( context, format, width, height, depth, options = {} )
88
94
  row_pitch = 0
89
95
  row_pitch = options[:row_pitch] if options[:row_pitch]
90
96
  slice_pitch = 0
@@ -100,6 +106,9 @@ module OpenCL
100
106
  error_check(error.read_cl_int)
101
107
  return Image::new(img_ptr, false)
102
108
  end
109
+ class << self
110
+ alias :create_image_3D :create_image_3d
111
+ end
103
112
 
104
113
  # Creates an Image from an OpenGL render buffer
105
114
  #
@@ -112,13 +121,16 @@ module OpenCL
112
121
  # ==== Options
113
122
  #
114
123
  # * +:flags+ - a single or an Array of :cl_mem_flags specifying the flags to be used when creating the Image (default Mem::READ_WRITE)
115
- def self.create_from_GL_render_buffer( context, renderbuffer, options = {} )
124
+ def self.create_from_gl_render_buffer( context, renderbuffer, options = {} )
116
125
  flags = get_flags( options )
117
126
  error = FFI::MemoryPointer::new( :cl_int )
118
127
  img = clCreateFromGLRenderBuffer( context, flags, renderbuffer, error )
119
128
  error_check(error.read_cl_int)
120
129
  return Image::new( img, false )
121
130
  end
131
+ class << self
132
+ alias :create_from_GL_render_buffer :create_from_gl_render_buffer
133
+ end
122
134
 
123
135
  # Creates an Image from an OpenGL texture
124
136
  #
@@ -133,7 +145,7 @@ module OpenCL
133
145
  #
134
146
  # * +:miplevel+ - a :GLint specifying the mipmap level to be used (default 0)
135
147
  # * +:flags+ - a single or an Array of :cl_mem_flags specifying the flags to be used when creating the Image (default Mem::READ_WRITE)
136
- def self.create_from_GL_texture( context, texture_target, texture, options = {} )
148
+ def self.create_from_gl_texture( context, texture_target, texture, options = {} )
137
149
  if context.platform.version_number < 1.2 then
138
150
  error_check(INVALID_OPERATION)
139
151
  end
@@ -145,6 +157,9 @@ module OpenCL
145
157
  error_check(error.read_cl_int)
146
158
  return Image::new( img, false )
147
159
  end
160
+ class << self
161
+ alias :create_from_GL_texture :create_from_gl_texture
162
+ end
148
163
 
149
164
  # Creates an Image from an OpenGL 2D texture
150
165
  #
@@ -158,9 +173,9 @@ module OpenCL
158
173
  #
159
174
  # * +:miplevel+ - a :GLint specifying the mipmap level to be used (default 0)
160
175
  # * +:flags+ - a single or an Array of :cl_mem_flags specifying the flags to be used when creating the Image
161
- def self.create_from_GL_texture_2D( context, texture_target, texture, options = {} )
176
+ def self.create_from_gl_texture_2d( context, texture_target, texture, options = {} )
162
177
  if context.platform.version_number > 1.1 then
163
- return create_from_GL_texture( context, texture_target, texture, options )
178
+ return create_from_gl_texture( context, texture_target, texture, options )
164
179
  end
165
180
  flags = get_flags( options )
166
181
  miplevel = 0
@@ -170,6 +185,9 @@ module OpenCL
170
185
  error_check(error.read_cl_int)
171
186
  return Image::new( img, false )
172
187
  end
188
+ class << self
189
+ alias :create_from_GL_texture_2D :create_from_gl_texture_2d
190
+ end
173
191
 
174
192
  # Creates an Image from an OpenGL 3D texture
175
193
  #
@@ -183,9 +201,9 @@ module OpenCL
183
201
  #
184
202
  # * +:miplevel+ - a :GLint specifying the mipmap level to be used (default 0)
185
203
  # * +:flags+ - a single or an Array of :cl_mem_flags specifying the flags to be used when creating the Image
186
- def self.create_from_GL_texture_3D( context, texture_target, texture, options = {} )
204
+ def self.create_from_gl_texture_3d( context, texture_target, texture, options = {} )
187
205
  if context.platform.version_number > 1.1 then
188
- return create_from_GL_texture( context, texture_target, texture, options )
206
+ return create_from_gl_texture( context, texture_target, texture, options )
189
207
  end
190
208
  flags = get_flags( options )
191
209
  miplevel = 0
@@ -195,6 +213,9 @@ module OpenCL
195
213
  error_check(error.read_cl_int)
196
214
  return Image::new( img, false )
197
215
  end
216
+ class << self
217
+ alias :create_from_GL_texture_3D :create_from_gl_texture_3d
218
+ end
198
219
 
199
220
  # Maps the cl_mem OpenCL objects of type CL_MEM_OBJECT_IMAGE*
200
221
  class Image #< Mem
@@ -151,7 +151,7 @@ module OpenCL
151
151
  error_check(INVALID_OPERATION) if self.context.platform.version_number < 2.0
152
152
  pt = FFI::MemoryPointer::new( :cl_bool )
153
153
  pt.write_cl_bool( flag )
154
- error = OpenCL.clSetKernelExecInfo( self, EXEC_INFO_SVM_FINE_GRAIN_SYSTEL, pt.size, pt)
154
+ error = OpenCL.clSetKernelExecInfo( self, EXEC_INFO_SVM_FINE_GRAIN_SYSTEM, pt.size, pt)
155
155
  error_check(error)
156
156
  return self
157
157
  end
@@ -206,7 +206,7 @@ module OpenCL
206
206
  OpenCL.set_kernel_arg_svm_pointer(self, index, svm_pointer)
207
207
  end
208
208
 
209
- # Enqueues the Kernel in the given queue, specifying the global_work_size. Arguments for the kernel are specified afterwards. Last, a hash containing options for enqueuNDrange kernel can be specified
209
+ # Enqueues the Kernel in the given queue, specifying the global_work_size. Arguments for the kernel are specified afterwards. Last, a hash containing options for enqueu_ndrange kernel can be specified
210
210
  def enqueue_with_args(command_queue, global_work_size, *args)
211
211
  n = self.num_args
212
212
  error_check(INVALID_KERNEL_ARGS) if args.length < n
@@ -223,7 +223,7 @@ module OpenCL
223
223
  self.set_arg(i, args[i])
224
224
  end
225
225
  }
226
- command_queue.enqueue_NDrange_kernel(self, global_work_size, options)
226
+ command_queue.enqueue_ndrange_kernel(self, global_work_size, options)
227
227
  end
228
228
 
229
229
  end
@@ -106,36 +106,40 @@ module OpenCL
106
106
  end
107
107
 
108
108
  # Returns the texture_target argument specified in create_from_GL_texture for Mem
109
- def GL_texture_target
109
+ def gl_texture_target
110
110
  param_value = FFI::MemoryPointer::new( :cl_GLenum )
111
111
  error = OpenCL.clGetGLTextureInfo( self, GL_TEXTURE_TARGET, param_value.size, param_value, nil )
112
112
  error_check(error)
113
113
  return param_value.read_cl_GLenum
114
114
  end
115
+ alias :GL_texture_target :gl_texture_target
115
116
 
116
117
  # Returns the miplevel argument specified in create_from_GL_texture for Mem
117
- def GL_mimap_level
118
+ def gl_mimap_level
118
119
  param_value = FFI::MemoryPointer::new( :cl_GLint )
119
120
  error = OpenCL.clGetGLTextureInfo( self, GL_MIPMAP_LEVEL, param_value.size, param_value, nil )
120
121
  error_check(error)
121
122
  return param_value.read_cl_GLint
122
123
  end
124
+ alias :GL_mimap_level :gl_mimap_level
123
125
 
124
126
  # Returns the type of the GL object associated with Mem
125
- def GL_object_type
127
+ def gl_object_type
126
128
  param_value = FFI::MemoryPointer::new( :cl_gl_object_type )
127
129
  error = OpenCL.clGetGLObjectInfo( self, param_value, nil )
128
130
  error_check(error)
129
131
  return GLObjectType::new(param_value.read_cl_gl_object_type)
130
132
  end
133
+ alias :GL_object_type :gl_object_type
131
134
 
132
135
  # Returns the name of the GL object associated with Mem
133
- def GL_object_name
136
+ def gl_object_name
134
137
  param_value = FFI::MemoryPointer::new( :cl_GLuint )
135
138
  error = OpenCL.clGetGLObjectInfo( self, nil, param_value )
136
139
  error_check(error)
137
140
  return param_value.read_cl_GLuint
138
141
  end
142
+ alias :GL_object_name :gl_object_name
139
143
 
140
144
  end
141
145
 
@@ -146,7 +146,7 @@ module OpenCL
146
146
  # ==== Returns
147
147
  #
148
148
  # the Event associated with the command
149
- def self.enqueue_svm_mem_fill(command_queue, svm_ptr, pattern, size, options = {})
149
+ def self.enqueue_svm_memfill(command_queue, svm_ptr, pattern, size, options = {})
150
150
  num_events, events = get_event_wait_list( options )
151
151
  pattern_size = pattern.size
152
152
  pattern_size = options[:pattern_size] if options[:pattern_size]
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'opencl_ruby_ffi'
3
- s.version = "1.0.1"
3
+ s.version = "1.0.2"
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: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brice Videau
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-05-22 00:00:00.000000000 Z
11
+ date: 2015-05-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: narray
@@ -120,3 +120,4 @@ signing_key:
120
120
  specification_version: 4
121
121
  summary: Ruby OpenCL FFI bindings
122
122
  test_files: []
123
+ has_rdoc: true