opencl_ruby_ffi 0.1

Sign up to get free protection for your applications and to get access to all the features.
data/LICENSE ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2014, Brice Videau <brice.videau@imag.fr>
2
+ All rights reserved.
3
+
4
+ Redistribution and use in source and binary forms, with or without
5
+ modification, are permitted provided that the following conditions are met:
6
+
7
+ 1. Redistributions of source code must retain the above copyright notice, this
8
+ list of conditions and the following disclaimer.
9
+ 2. Redistributions in binary form must reproduce the above copyright notice,
10
+ this list of conditions and the following disclaimer in the documentation
11
+ and/or other materials provided with the distribution.
12
+
13
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
14
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
15
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
16
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
17
+ ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
18
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
19
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
20
+ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
22
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -0,0 +1,18 @@
1
+ require "opencl_ruby_ffi/opencl_ruby_ffi_base_gen.rb"
2
+ require "opencl_ruby_ffi/opencl_ruby_ffi_base.rb"
3
+ require "opencl_ruby_ffi/Arithmetic_gen.rb"
4
+ require "opencl_ruby_ffi/Context.rb"
5
+ require "opencl_ruby_ffi/Platform.rb"
6
+ require "opencl_ruby_ffi/Device.rb"
7
+ require "opencl_ruby_ffi/CommandQueue.rb"
8
+ require "opencl_ruby_ffi/Mem.rb"
9
+ require "opencl_ruby_ffi/Buffer.rb"
10
+ require "opencl_ruby_ffi/Program.rb"
11
+ require "opencl_ruby_ffi/Event.rb"
12
+ require "opencl_ruby_ffi/Kernel.rb"
13
+ require "opencl_ruby_ffi/Image.rb"
14
+ require "opencl_ruby_ffi/Sampler.rb"
15
+
16
+ require "narray_ffi"
17
+
18
+
@@ -0,0 +1,3566 @@
1
+ module OpenCL
2
+ # Maps the cl_char type of OpenCL
3
+ class Char < FFI::Struct
4
+ @size = FFI.find_type(:cl_char).size * 1
5
+ @layout = FFI::StructLayout::new([ FFI::StructLayout::Field::new( "s0", FFI.find_type(:cl_char).size * 0, FFI.find_type(:cl_char) ) ], FFI.find_type(:cl_char).size * 1, FFI.find_type(:cl_char).size * 1 )
6
+ # Creates a new Char with members set to 0 or to the user specified values
7
+ def initialize( s0 = 0 )
8
+ super()
9
+ self[:s0] = s0
10
+ end
11
+ # Reads the s0 member
12
+ def s0
13
+ return self[:s0]
14
+ end
15
+ # Sets the s0 member to value
16
+ def s0=(value)
17
+ self[:s0] = value
18
+ end
19
+ end
20
+ # Maps the cl_uchar type of OpenCL
21
+ class UChar < FFI::Struct
22
+ @size = FFI.find_type(:cl_uchar).size * 1
23
+ @layout = FFI::StructLayout::new([ FFI::StructLayout::Field::new( "s0", FFI.find_type(:cl_uchar).size * 0, FFI.find_type(:cl_uchar) ) ], FFI.find_type(:cl_uchar).size * 1, FFI.find_type(:cl_uchar).size * 1 )
24
+ # Creates a new UChar with members set to 0 or to the user specified values
25
+ def initialize( s0 = 0 )
26
+ super()
27
+ self[:s0] = s0
28
+ end
29
+ # Reads the s0 member
30
+ def s0
31
+ return self[:s0]
32
+ end
33
+ # Sets the s0 member to value
34
+ def s0=(value)
35
+ self[:s0] = value
36
+ end
37
+ end
38
+ # Maps the cl_short type of OpenCL
39
+ class Short < FFI::Struct
40
+ @size = FFI.find_type(:cl_short).size * 1
41
+ @layout = FFI::StructLayout::new([ FFI::StructLayout::Field::new( "s0", FFI.find_type(:cl_short).size * 0, FFI.find_type(:cl_short) ) ], FFI.find_type(:cl_short).size * 1, FFI.find_type(:cl_short).size * 1 )
42
+ # Creates a new Short with members set to 0 or to the user specified values
43
+ def initialize( s0 = 0 )
44
+ super()
45
+ self[:s0] = s0
46
+ end
47
+ # Reads the s0 member
48
+ def s0
49
+ return self[:s0]
50
+ end
51
+ # Sets the s0 member to value
52
+ def s0=(value)
53
+ self[:s0] = value
54
+ end
55
+ end
56
+ # Maps the cl_ushort type of OpenCL
57
+ class UShort < FFI::Struct
58
+ @size = FFI.find_type(:cl_ushort).size * 1
59
+ @layout = FFI::StructLayout::new([ FFI::StructLayout::Field::new( "s0", FFI.find_type(:cl_ushort).size * 0, FFI.find_type(:cl_ushort) ) ], FFI.find_type(:cl_ushort).size * 1, FFI.find_type(:cl_ushort).size * 1 )
60
+ # Creates a new UShort with members set to 0 or to the user specified values
61
+ def initialize( s0 = 0 )
62
+ super()
63
+ self[:s0] = s0
64
+ end
65
+ # Reads the s0 member
66
+ def s0
67
+ return self[:s0]
68
+ end
69
+ # Sets the s0 member to value
70
+ def s0=(value)
71
+ self[:s0] = value
72
+ end
73
+ end
74
+ # Maps the cl_int type of OpenCL
75
+ class Int < FFI::Struct
76
+ @size = FFI.find_type(:cl_int).size * 1
77
+ @layout = FFI::StructLayout::new([ FFI::StructLayout::Field::new( "s0", FFI.find_type(:cl_int).size * 0, FFI.find_type(:cl_int) ) ], FFI.find_type(:cl_int).size * 1, FFI.find_type(:cl_int).size * 1 )
78
+ # Creates a new Int with members set to 0 or to the user specified values
79
+ def initialize( s0 = 0 )
80
+ super()
81
+ self[:s0] = s0
82
+ end
83
+ # Reads the s0 member
84
+ def s0
85
+ return self[:s0]
86
+ end
87
+ # Sets the s0 member to value
88
+ def s0=(value)
89
+ self[:s0] = value
90
+ end
91
+ end
92
+ # Maps the cl_uint type of OpenCL
93
+ class UInt < FFI::Struct
94
+ @size = FFI.find_type(:cl_uint).size * 1
95
+ @layout = FFI::StructLayout::new([ FFI::StructLayout::Field::new( "s0", FFI.find_type(:cl_uint).size * 0, FFI.find_type(:cl_uint) ) ], FFI.find_type(:cl_uint).size * 1, FFI.find_type(:cl_uint).size * 1 )
96
+ # Creates a new UInt with members set to 0 or to the user specified values
97
+ def initialize( s0 = 0 )
98
+ super()
99
+ self[:s0] = s0
100
+ end
101
+ # Reads the s0 member
102
+ def s0
103
+ return self[:s0]
104
+ end
105
+ # Sets the s0 member to value
106
+ def s0=(value)
107
+ self[:s0] = value
108
+ end
109
+ end
110
+ # Maps the cl_long type of OpenCL
111
+ class Long < FFI::Struct
112
+ @size = FFI.find_type(:cl_long).size * 1
113
+ @layout = FFI::StructLayout::new([ FFI::StructLayout::Field::new( "s0", FFI.find_type(:cl_long).size * 0, FFI.find_type(:cl_long) ) ], FFI.find_type(:cl_long).size * 1, FFI.find_type(:cl_long).size * 1 )
114
+ # Creates a new Long with members set to 0 or to the user specified values
115
+ def initialize( s0 = 0 )
116
+ super()
117
+ self[:s0] = s0
118
+ end
119
+ # Reads the s0 member
120
+ def s0
121
+ return self[:s0]
122
+ end
123
+ # Sets the s0 member to value
124
+ def s0=(value)
125
+ self[:s0] = value
126
+ end
127
+ end
128
+ # Maps the cl_ulong type of OpenCL
129
+ class ULong < FFI::Struct
130
+ @size = FFI.find_type(:cl_ulong).size * 1
131
+ @layout = FFI::StructLayout::new([ FFI::StructLayout::Field::new( "s0", FFI.find_type(:cl_ulong).size * 0, FFI.find_type(:cl_ulong) ) ], FFI.find_type(:cl_ulong).size * 1, FFI.find_type(:cl_ulong).size * 1 )
132
+ # Creates a new ULong with members set to 0 or to the user specified values
133
+ def initialize( s0 = 0 )
134
+ super()
135
+ self[:s0] = s0
136
+ end
137
+ # Reads the s0 member
138
+ def s0
139
+ return self[:s0]
140
+ end
141
+ # Sets the s0 member to value
142
+ def s0=(value)
143
+ self[:s0] = value
144
+ end
145
+ end
146
+ # Maps the cl_float type of OpenCL
147
+ class Float < FFI::Struct
148
+ @size = FFI.find_type(:cl_float).size * 1
149
+ @layout = FFI::StructLayout::new([ FFI::StructLayout::Field::new( "s0", FFI.find_type(:cl_float).size * 0, FFI.find_type(:cl_float) ) ], FFI.find_type(:cl_float).size * 1, FFI.find_type(:cl_float).size * 1 )
150
+ # Creates a new Float with members set to 0 or to the user specified values
151
+ def initialize( s0 = 0.0 )
152
+ super()
153
+ self[:s0] = s0
154
+ end
155
+ # Reads the s0 member
156
+ def s0
157
+ return self[:s0]
158
+ end
159
+ # Sets the s0 member to value
160
+ def s0=(value)
161
+ self[:s0] = value
162
+ end
163
+ end
164
+ # Maps the cl_double type of OpenCL
165
+ class Double < FFI::Struct
166
+ @size = FFI.find_type(:cl_double).size * 1
167
+ @layout = FFI::StructLayout::new([ FFI::StructLayout::Field::new( "s0", FFI.find_type(:cl_double).size * 0, FFI.find_type(:cl_double) ) ], FFI.find_type(:cl_double).size * 1, FFI.find_type(:cl_double).size * 1 )
168
+ # Creates a new Double with members set to 0 or to the user specified values
169
+ def initialize( s0 = 0.0 )
170
+ super()
171
+ self[:s0] = s0
172
+ end
173
+ # Reads the s0 member
174
+ def s0
175
+ return self[:s0]
176
+ end
177
+ # Sets the s0 member to value
178
+ def s0=(value)
179
+ self[:s0] = value
180
+ end
181
+ end
182
+ # Maps the cl_half type of OpenCL
183
+ class Half < FFI::Struct
184
+ @size = FFI.find_type(:cl_half).size * 1
185
+ @layout = FFI::StructLayout::new([ FFI::StructLayout::Field::new( "s0", FFI.find_type(:cl_half).size * 0, FFI.find_type(:cl_half) ) ], FFI.find_type(:cl_half).size * 1, FFI.find_type(:cl_half).size * 1 )
186
+ # Creates a new Half with members set to 0 or to the user specified values
187
+ def initialize( s0 = 0.0 )
188
+ super()
189
+ self[:s0] = s0
190
+ end
191
+ # Reads the s0 member
192
+ def s0
193
+ return self[:s0]
194
+ end
195
+ # Sets the s0 member to value
196
+ def s0=(value)
197
+ self[:s0] = value
198
+ end
199
+ end
200
+ # Maps the cl_char2 type of OpenCL
201
+ class Char2 < FFI::Struct
202
+ @size = FFI.find_type(:cl_char).size * 2
203
+ @layout = FFI::StructLayout::new([ FFI::StructLayout::Field::new( "s0", FFI.find_type(:cl_char).size * 0, FFI.find_type(:cl_char) ), FFI::StructLayout::Field::new( "s1", FFI.find_type(:cl_char).size * 1, FFI.find_type(:cl_char) ) ], FFI.find_type(:cl_char).size * 2, FFI.find_type(:cl_char).size * 2 )
204
+ # Creates a new Char2 with members set to 0 or to the user specified values
205
+ def initialize( s0 = 0, s1 = 0 )
206
+ super()
207
+ self[:s0] = s0
208
+ self[:s1] = s1
209
+ end
210
+ # Reads the s0 member
211
+ def s0
212
+ return self[:s0]
213
+ end
214
+ # Reads the s1 member
215
+ def s1
216
+ return self[:s1]
217
+ end
218
+ # Sets the s0 member to value
219
+ def s0=(value)
220
+ self[:s0] = value
221
+ end
222
+ # Sets the s1 member to value
223
+ def s1=(value)
224
+ self[:s1] = value
225
+ end
226
+ end
227
+ # Maps the cl_uchar2 type of OpenCL
228
+ class UChar2 < FFI::Struct
229
+ @size = FFI.find_type(:cl_uchar).size * 2
230
+ @layout = FFI::StructLayout::new([ FFI::StructLayout::Field::new( "s0", FFI.find_type(:cl_uchar).size * 0, FFI.find_type(:cl_uchar) ), FFI::StructLayout::Field::new( "s1", FFI.find_type(:cl_uchar).size * 1, FFI.find_type(:cl_uchar) ) ], FFI.find_type(:cl_uchar).size * 2, FFI.find_type(:cl_uchar).size * 2 )
231
+ # Creates a new UChar2 with members set to 0 or to the user specified values
232
+ def initialize( s0 = 0, s1 = 0 )
233
+ super()
234
+ self[:s0] = s0
235
+ self[:s1] = s1
236
+ end
237
+ # Reads the s0 member
238
+ def s0
239
+ return self[:s0]
240
+ end
241
+ # Reads the s1 member
242
+ def s1
243
+ return self[:s1]
244
+ end
245
+ # Sets the s0 member to value
246
+ def s0=(value)
247
+ self[:s0] = value
248
+ end
249
+ # Sets the s1 member to value
250
+ def s1=(value)
251
+ self[:s1] = value
252
+ end
253
+ end
254
+ # Maps the cl_short2 type of OpenCL
255
+ class Short2 < FFI::Struct
256
+ @size = FFI.find_type(:cl_short).size * 2
257
+ @layout = FFI::StructLayout::new([ FFI::StructLayout::Field::new( "s0", FFI.find_type(:cl_short).size * 0, FFI.find_type(:cl_short) ), FFI::StructLayout::Field::new( "s1", FFI.find_type(:cl_short).size * 1, FFI.find_type(:cl_short) ) ], FFI.find_type(:cl_short).size * 2, FFI.find_type(:cl_short).size * 2 )
258
+ # Creates a new Short2 with members set to 0 or to the user specified values
259
+ def initialize( s0 = 0, s1 = 0 )
260
+ super()
261
+ self[:s0] = s0
262
+ self[:s1] = s1
263
+ end
264
+ # Reads the s0 member
265
+ def s0
266
+ return self[:s0]
267
+ end
268
+ # Reads the s1 member
269
+ def s1
270
+ return self[:s1]
271
+ end
272
+ # Sets the s0 member to value
273
+ def s0=(value)
274
+ self[:s0] = value
275
+ end
276
+ # Sets the s1 member to value
277
+ def s1=(value)
278
+ self[:s1] = value
279
+ end
280
+ end
281
+ # Maps the cl_ushort2 type of OpenCL
282
+ class UShort2 < FFI::Struct
283
+ @size = FFI.find_type(:cl_ushort).size * 2
284
+ @layout = FFI::StructLayout::new([ FFI::StructLayout::Field::new( "s0", FFI.find_type(:cl_ushort).size * 0, FFI.find_type(:cl_ushort) ), FFI::StructLayout::Field::new( "s1", FFI.find_type(:cl_ushort).size * 1, FFI.find_type(:cl_ushort) ) ], FFI.find_type(:cl_ushort).size * 2, FFI.find_type(:cl_ushort).size * 2 )
285
+ # Creates a new UShort2 with members set to 0 or to the user specified values
286
+ def initialize( s0 = 0, s1 = 0 )
287
+ super()
288
+ self[:s0] = s0
289
+ self[:s1] = s1
290
+ end
291
+ # Reads the s0 member
292
+ def s0
293
+ return self[:s0]
294
+ end
295
+ # Reads the s1 member
296
+ def s1
297
+ return self[:s1]
298
+ end
299
+ # Sets the s0 member to value
300
+ def s0=(value)
301
+ self[:s0] = value
302
+ end
303
+ # Sets the s1 member to value
304
+ def s1=(value)
305
+ self[:s1] = value
306
+ end
307
+ end
308
+ # Maps the cl_int2 type of OpenCL
309
+ class Int2 < FFI::Struct
310
+ @size = FFI.find_type(:cl_int).size * 2
311
+ @layout = FFI::StructLayout::new([ FFI::StructLayout::Field::new( "s0", FFI.find_type(:cl_int).size * 0, FFI.find_type(:cl_int) ), FFI::StructLayout::Field::new( "s1", FFI.find_type(:cl_int).size * 1, FFI.find_type(:cl_int) ) ], FFI.find_type(:cl_int).size * 2, FFI.find_type(:cl_int).size * 2 )
312
+ # Creates a new Int2 with members set to 0 or to the user specified values
313
+ def initialize( s0 = 0, s1 = 0 )
314
+ super()
315
+ self[:s0] = s0
316
+ self[:s1] = s1
317
+ end
318
+ # Reads the s0 member
319
+ def s0
320
+ return self[:s0]
321
+ end
322
+ # Reads the s1 member
323
+ def s1
324
+ return self[:s1]
325
+ end
326
+ # Sets the s0 member to value
327
+ def s0=(value)
328
+ self[:s0] = value
329
+ end
330
+ # Sets the s1 member to value
331
+ def s1=(value)
332
+ self[:s1] = value
333
+ end
334
+ end
335
+ # Maps the cl_uint2 type of OpenCL
336
+ class UInt2 < FFI::Struct
337
+ @size = FFI.find_type(:cl_uint).size * 2
338
+ @layout = FFI::StructLayout::new([ FFI::StructLayout::Field::new( "s0", FFI.find_type(:cl_uint).size * 0, FFI.find_type(:cl_uint) ), FFI::StructLayout::Field::new( "s1", FFI.find_type(:cl_uint).size * 1, FFI.find_type(:cl_uint) ) ], FFI.find_type(:cl_uint).size * 2, FFI.find_type(:cl_uint).size * 2 )
339
+ # Creates a new UInt2 with members set to 0 or to the user specified values
340
+ def initialize( s0 = 0, s1 = 0 )
341
+ super()
342
+ self[:s0] = s0
343
+ self[:s1] = s1
344
+ end
345
+ # Reads the s0 member
346
+ def s0
347
+ return self[:s0]
348
+ end
349
+ # Reads the s1 member
350
+ def s1
351
+ return self[:s1]
352
+ end
353
+ # Sets the s0 member to value
354
+ def s0=(value)
355
+ self[:s0] = value
356
+ end
357
+ # Sets the s1 member to value
358
+ def s1=(value)
359
+ self[:s1] = value
360
+ end
361
+ end
362
+ # Maps the cl_long2 type of OpenCL
363
+ class Long2 < FFI::Struct
364
+ @size = FFI.find_type(:cl_long).size * 2
365
+ @layout = FFI::StructLayout::new([ FFI::StructLayout::Field::new( "s0", FFI.find_type(:cl_long).size * 0, FFI.find_type(:cl_long) ), FFI::StructLayout::Field::new( "s1", FFI.find_type(:cl_long).size * 1, FFI.find_type(:cl_long) ) ], FFI.find_type(:cl_long).size * 2, FFI.find_type(:cl_long).size * 2 )
366
+ # Creates a new Long2 with members set to 0 or to the user specified values
367
+ def initialize( s0 = 0, s1 = 0 )
368
+ super()
369
+ self[:s0] = s0
370
+ self[:s1] = s1
371
+ end
372
+ # Reads the s0 member
373
+ def s0
374
+ return self[:s0]
375
+ end
376
+ # Reads the s1 member
377
+ def s1
378
+ return self[:s1]
379
+ end
380
+ # Sets the s0 member to value
381
+ def s0=(value)
382
+ self[:s0] = value
383
+ end
384
+ # Sets the s1 member to value
385
+ def s1=(value)
386
+ self[:s1] = value
387
+ end
388
+ end
389
+ # Maps the cl_ulong2 type of OpenCL
390
+ class ULong2 < FFI::Struct
391
+ @size = FFI.find_type(:cl_ulong).size * 2
392
+ @layout = FFI::StructLayout::new([ FFI::StructLayout::Field::new( "s0", FFI.find_type(:cl_ulong).size * 0, FFI.find_type(:cl_ulong) ), FFI::StructLayout::Field::new( "s1", FFI.find_type(:cl_ulong).size * 1, FFI.find_type(:cl_ulong) ) ], FFI.find_type(:cl_ulong).size * 2, FFI.find_type(:cl_ulong).size * 2 )
393
+ # Creates a new ULong2 with members set to 0 or to the user specified values
394
+ def initialize( s0 = 0, s1 = 0 )
395
+ super()
396
+ self[:s0] = s0
397
+ self[:s1] = s1
398
+ end
399
+ # Reads the s0 member
400
+ def s0
401
+ return self[:s0]
402
+ end
403
+ # Reads the s1 member
404
+ def s1
405
+ return self[:s1]
406
+ end
407
+ # Sets the s0 member to value
408
+ def s0=(value)
409
+ self[:s0] = value
410
+ end
411
+ # Sets the s1 member to value
412
+ def s1=(value)
413
+ self[:s1] = value
414
+ end
415
+ end
416
+ # Maps the cl_float2 type of OpenCL
417
+ class Float2 < FFI::Struct
418
+ @size = FFI.find_type(:cl_float).size * 2
419
+ @layout = FFI::StructLayout::new([ FFI::StructLayout::Field::new( "s0", FFI.find_type(:cl_float).size * 0, FFI.find_type(:cl_float) ), FFI::StructLayout::Field::new( "s1", FFI.find_type(:cl_float).size * 1, FFI.find_type(:cl_float) ) ], FFI.find_type(:cl_float).size * 2, FFI.find_type(:cl_float).size * 2 )
420
+ # Creates a new Float2 with members set to 0 or to the user specified values
421
+ def initialize( s0 = 0.0, s1 = 0.0 )
422
+ super()
423
+ self[:s0] = s0
424
+ self[:s1] = s1
425
+ end
426
+ # Reads the s0 member
427
+ def s0
428
+ return self[:s0]
429
+ end
430
+ # Reads the s1 member
431
+ def s1
432
+ return self[:s1]
433
+ end
434
+ # Sets the s0 member to value
435
+ def s0=(value)
436
+ self[:s0] = value
437
+ end
438
+ # Sets the s1 member to value
439
+ def s1=(value)
440
+ self[:s1] = value
441
+ end
442
+ end
443
+ # Maps the cl_double2 type of OpenCL
444
+ class Double2 < FFI::Struct
445
+ @size = FFI.find_type(:cl_double).size * 2
446
+ @layout = FFI::StructLayout::new([ FFI::StructLayout::Field::new( "s0", FFI.find_type(:cl_double).size * 0, FFI.find_type(:cl_double) ), FFI::StructLayout::Field::new( "s1", FFI.find_type(:cl_double).size * 1, FFI.find_type(:cl_double) ) ], FFI.find_type(:cl_double).size * 2, FFI.find_type(:cl_double).size * 2 )
447
+ # Creates a new Double2 with members set to 0 or to the user specified values
448
+ def initialize( s0 = 0.0, s1 = 0.0 )
449
+ super()
450
+ self[:s0] = s0
451
+ self[:s1] = s1
452
+ end
453
+ # Reads the s0 member
454
+ def s0
455
+ return self[:s0]
456
+ end
457
+ # Reads the s1 member
458
+ def s1
459
+ return self[:s1]
460
+ end
461
+ # Sets the s0 member to value
462
+ def s0=(value)
463
+ self[:s0] = value
464
+ end
465
+ # Sets the s1 member to value
466
+ def s1=(value)
467
+ self[:s1] = value
468
+ end
469
+ end
470
+ # Maps the cl_half2 type of OpenCL
471
+ class Half2 < FFI::Struct
472
+ @size = FFI.find_type(:cl_half).size * 2
473
+ @layout = FFI::StructLayout::new([ FFI::StructLayout::Field::new( "s0", FFI.find_type(:cl_half).size * 0, FFI.find_type(:cl_half) ), FFI::StructLayout::Field::new( "s1", FFI.find_type(:cl_half).size * 1, FFI.find_type(:cl_half) ) ], FFI.find_type(:cl_half).size * 2, FFI.find_type(:cl_half).size * 2 )
474
+ # Creates a new Half2 with members set to 0 or to the user specified values
475
+ def initialize( s0 = 0.0, s1 = 0.0 )
476
+ super()
477
+ self[:s0] = s0
478
+ self[:s1] = s1
479
+ end
480
+ # Reads the s0 member
481
+ def s0
482
+ return self[:s0]
483
+ end
484
+ # Reads the s1 member
485
+ def s1
486
+ return self[:s1]
487
+ end
488
+ # Sets the s0 member to value
489
+ def s0=(value)
490
+ self[:s0] = value
491
+ end
492
+ # Sets the s1 member to value
493
+ def s1=(value)
494
+ self[:s1] = value
495
+ end
496
+ end
497
+ # Maps the cl_char4 type of OpenCL
498
+ class Char4 < FFI::Struct
499
+ @size = FFI.find_type(:cl_char).size * 4
500
+ @layout = FFI::StructLayout::new([ FFI::StructLayout::Field::new( "s0", FFI.find_type(:cl_char).size * 0, FFI.find_type(:cl_char) ), FFI::StructLayout::Field::new( "s1", FFI.find_type(:cl_char).size * 1, FFI.find_type(:cl_char) ), FFI::StructLayout::Field::new( "s2", FFI.find_type(:cl_char).size * 2, FFI.find_type(:cl_char) ), FFI::StructLayout::Field::new( "s3", FFI.find_type(:cl_char).size * 3, FFI.find_type(:cl_char) ) ], FFI.find_type(:cl_char).size * 4, FFI.find_type(:cl_char).size * 4 )
501
+ # Creates a new Char4 with members set to 0 or to the user specified values
502
+ def initialize( s0 = 0, s1 = 0, s2 = 0, s3 = 0 )
503
+ super()
504
+ self[:s0] = s0
505
+ self[:s1] = s1
506
+ self[:s2] = s2
507
+ self[:s3] = s3
508
+ end
509
+ # Reads the s0 member
510
+ def s0
511
+ return self[:s0]
512
+ end
513
+ # Reads the s1 member
514
+ def s1
515
+ return self[:s1]
516
+ end
517
+ # Reads the s2 member
518
+ def s2
519
+ return self[:s2]
520
+ end
521
+ # Reads the s3 member
522
+ def s3
523
+ return self[:s3]
524
+ end
525
+ # Sets the s0 member to value
526
+ def s0=(value)
527
+ self[:s0] = value
528
+ end
529
+ # Sets the s1 member to value
530
+ def s1=(value)
531
+ self[:s1] = value
532
+ end
533
+ # Sets the s2 member to value
534
+ def s2=(value)
535
+ self[:s2] = value
536
+ end
537
+ # Sets the s3 member to value
538
+ def s3=(value)
539
+ self[:s3] = value
540
+ end
541
+ end
542
+ # Maps the cl_uchar4 type of OpenCL
543
+ class UChar4 < FFI::Struct
544
+ @size = FFI.find_type(:cl_uchar).size * 4
545
+ @layout = FFI::StructLayout::new([ FFI::StructLayout::Field::new( "s0", FFI.find_type(:cl_uchar).size * 0, FFI.find_type(:cl_uchar) ), FFI::StructLayout::Field::new( "s1", FFI.find_type(:cl_uchar).size * 1, FFI.find_type(:cl_uchar) ), FFI::StructLayout::Field::new( "s2", FFI.find_type(:cl_uchar).size * 2, FFI.find_type(:cl_uchar) ), FFI::StructLayout::Field::new( "s3", FFI.find_type(:cl_uchar).size * 3, FFI.find_type(:cl_uchar) ) ], FFI.find_type(:cl_uchar).size * 4, FFI.find_type(:cl_uchar).size * 4 )
546
+ # Creates a new UChar4 with members set to 0 or to the user specified values
547
+ def initialize( s0 = 0, s1 = 0, s2 = 0, s3 = 0 )
548
+ super()
549
+ self[:s0] = s0
550
+ self[:s1] = s1
551
+ self[:s2] = s2
552
+ self[:s3] = s3
553
+ end
554
+ # Reads the s0 member
555
+ def s0
556
+ return self[:s0]
557
+ end
558
+ # Reads the s1 member
559
+ def s1
560
+ return self[:s1]
561
+ end
562
+ # Reads the s2 member
563
+ def s2
564
+ return self[:s2]
565
+ end
566
+ # Reads the s3 member
567
+ def s3
568
+ return self[:s3]
569
+ end
570
+ # Sets the s0 member to value
571
+ def s0=(value)
572
+ self[:s0] = value
573
+ end
574
+ # Sets the s1 member to value
575
+ def s1=(value)
576
+ self[:s1] = value
577
+ end
578
+ # Sets the s2 member to value
579
+ def s2=(value)
580
+ self[:s2] = value
581
+ end
582
+ # Sets the s3 member to value
583
+ def s3=(value)
584
+ self[:s3] = value
585
+ end
586
+ end
587
+ # Maps the cl_short4 type of OpenCL
588
+ class Short4 < FFI::Struct
589
+ @size = FFI.find_type(:cl_short).size * 4
590
+ @layout = FFI::StructLayout::new([ FFI::StructLayout::Field::new( "s0", FFI.find_type(:cl_short).size * 0, FFI.find_type(:cl_short) ), FFI::StructLayout::Field::new( "s1", FFI.find_type(:cl_short).size * 1, FFI.find_type(:cl_short) ), FFI::StructLayout::Field::new( "s2", FFI.find_type(:cl_short).size * 2, FFI.find_type(:cl_short) ), FFI::StructLayout::Field::new( "s3", FFI.find_type(:cl_short).size * 3, FFI.find_type(:cl_short) ) ], FFI.find_type(:cl_short).size * 4, FFI.find_type(:cl_short).size * 4 )
591
+ # Creates a new Short4 with members set to 0 or to the user specified values
592
+ def initialize( s0 = 0, s1 = 0, s2 = 0, s3 = 0 )
593
+ super()
594
+ self[:s0] = s0
595
+ self[:s1] = s1
596
+ self[:s2] = s2
597
+ self[:s3] = s3
598
+ end
599
+ # Reads the s0 member
600
+ def s0
601
+ return self[:s0]
602
+ end
603
+ # Reads the s1 member
604
+ def s1
605
+ return self[:s1]
606
+ end
607
+ # Reads the s2 member
608
+ def s2
609
+ return self[:s2]
610
+ end
611
+ # Reads the s3 member
612
+ def s3
613
+ return self[:s3]
614
+ end
615
+ # Sets the s0 member to value
616
+ def s0=(value)
617
+ self[:s0] = value
618
+ end
619
+ # Sets the s1 member to value
620
+ def s1=(value)
621
+ self[:s1] = value
622
+ end
623
+ # Sets the s2 member to value
624
+ def s2=(value)
625
+ self[:s2] = value
626
+ end
627
+ # Sets the s3 member to value
628
+ def s3=(value)
629
+ self[:s3] = value
630
+ end
631
+ end
632
+ # Maps the cl_ushort4 type of OpenCL
633
+ class UShort4 < FFI::Struct
634
+ @size = FFI.find_type(:cl_ushort).size * 4
635
+ @layout = FFI::StructLayout::new([ FFI::StructLayout::Field::new( "s0", FFI.find_type(:cl_ushort).size * 0, FFI.find_type(:cl_ushort) ), FFI::StructLayout::Field::new( "s1", FFI.find_type(:cl_ushort).size * 1, FFI.find_type(:cl_ushort) ), FFI::StructLayout::Field::new( "s2", FFI.find_type(:cl_ushort).size * 2, FFI.find_type(:cl_ushort) ), FFI::StructLayout::Field::new( "s3", FFI.find_type(:cl_ushort).size * 3, FFI.find_type(:cl_ushort) ) ], FFI.find_type(:cl_ushort).size * 4, FFI.find_type(:cl_ushort).size * 4 )
636
+ # Creates a new UShort4 with members set to 0 or to the user specified values
637
+ def initialize( s0 = 0, s1 = 0, s2 = 0, s3 = 0 )
638
+ super()
639
+ self[:s0] = s0
640
+ self[:s1] = s1
641
+ self[:s2] = s2
642
+ self[:s3] = s3
643
+ end
644
+ # Reads the s0 member
645
+ def s0
646
+ return self[:s0]
647
+ end
648
+ # Reads the s1 member
649
+ def s1
650
+ return self[:s1]
651
+ end
652
+ # Reads the s2 member
653
+ def s2
654
+ return self[:s2]
655
+ end
656
+ # Reads the s3 member
657
+ def s3
658
+ return self[:s3]
659
+ end
660
+ # Sets the s0 member to value
661
+ def s0=(value)
662
+ self[:s0] = value
663
+ end
664
+ # Sets the s1 member to value
665
+ def s1=(value)
666
+ self[:s1] = value
667
+ end
668
+ # Sets the s2 member to value
669
+ def s2=(value)
670
+ self[:s2] = value
671
+ end
672
+ # Sets the s3 member to value
673
+ def s3=(value)
674
+ self[:s3] = value
675
+ end
676
+ end
677
+ # Maps the cl_int4 type of OpenCL
678
+ class Int4 < FFI::Struct
679
+ @size = FFI.find_type(:cl_int).size * 4
680
+ @layout = FFI::StructLayout::new([ FFI::StructLayout::Field::new( "s0", FFI.find_type(:cl_int).size * 0, FFI.find_type(:cl_int) ), FFI::StructLayout::Field::new( "s1", FFI.find_type(:cl_int).size * 1, FFI.find_type(:cl_int) ), FFI::StructLayout::Field::new( "s2", FFI.find_type(:cl_int).size * 2, FFI.find_type(:cl_int) ), FFI::StructLayout::Field::new( "s3", FFI.find_type(:cl_int).size * 3, FFI.find_type(:cl_int) ) ], FFI.find_type(:cl_int).size * 4, FFI.find_type(:cl_int).size * 4 )
681
+ # Creates a new Int4 with members set to 0 or to the user specified values
682
+ def initialize( s0 = 0, s1 = 0, s2 = 0, s3 = 0 )
683
+ super()
684
+ self[:s0] = s0
685
+ self[:s1] = s1
686
+ self[:s2] = s2
687
+ self[:s3] = s3
688
+ end
689
+ # Reads the s0 member
690
+ def s0
691
+ return self[:s0]
692
+ end
693
+ # Reads the s1 member
694
+ def s1
695
+ return self[:s1]
696
+ end
697
+ # Reads the s2 member
698
+ def s2
699
+ return self[:s2]
700
+ end
701
+ # Reads the s3 member
702
+ def s3
703
+ return self[:s3]
704
+ end
705
+ # Sets the s0 member to value
706
+ def s0=(value)
707
+ self[:s0] = value
708
+ end
709
+ # Sets the s1 member to value
710
+ def s1=(value)
711
+ self[:s1] = value
712
+ end
713
+ # Sets the s2 member to value
714
+ def s2=(value)
715
+ self[:s2] = value
716
+ end
717
+ # Sets the s3 member to value
718
+ def s3=(value)
719
+ self[:s3] = value
720
+ end
721
+ end
722
+ # Maps the cl_uint4 type of OpenCL
723
+ class UInt4 < FFI::Struct
724
+ @size = FFI.find_type(:cl_uint).size * 4
725
+ @layout = FFI::StructLayout::new([ FFI::StructLayout::Field::new( "s0", FFI.find_type(:cl_uint).size * 0, FFI.find_type(:cl_uint) ), FFI::StructLayout::Field::new( "s1", FFI.find_type(:cl_uint).size * 1, FFI.find_type(:cl_uint) ), FFI::StructLayout::Field::new( "s2", FFI.find_type(:cl_uint).size * 2, FFI.find_type(:cl_uint) ), FFI::StructLayout::Field::new( "s3", FFI.find_type(:cl_uint).size * 3, FFI.find_type(:cl_uint) ) ], FFI.find_type(:cl_uint).size * 4, FFI.find_type(:cl_uint).size * 4 )
726
+ # Creates a new UInt4 with members set to 0 or to the user specified values
727
+ def initialize( s0 = 0, s1 = 0, s2 = 0, s3 = 0 )
728
+ super()
729
+ self[:s0] = s0
730
+ self[:s1] = s1
731
+ self[:s2] = s2
732
+ self[:s3] = s3
733
+ end
734
+ # Reads the s0 member
735
+ def s0
736
+ return self[:s0]
737
+ end
738
+ # Reads the s1 member
739
+ def s1
740
+ return self[:s1]
741
+ end
742
+ # Reads the s2 member
743
+ def s2
744
+ return self[:s2]
745
+ end
746
+ # Reads the s3 member
747
+ def s3
748
+ return self[:s3]
749
+ end
750
+ # Sets the s0 member to value
751
+ def s0=(value)
752
+ self[:s0] = value
753
+ end
754
+ # Sets the s1 member to value
755
+ def s1=(value)
756
+ self[:s1] = value
757
+ end
758
+ # Sets the s2 member to value
759
+ def s2=(value)
760
+ self[:s2] = value
761
+ end
762
+ # Sets the s3 member to value
763
+ def s3=(value)
764
+ self[:s3] = value
765
+ end
766
+ end
767
+ # Maps the cl_long4 type of OpenCL
768
+ class Long4 < FFI::Struct
769
+ @size = FFI.find_type(:cl_long).size * 4
770
+ @layout = FFI::StructLayout::new([ FFI::StructLayout::Field::new( "s0", FFI.find_type(:cl_long).size * 0, FFI.find_type(:cl_long) ), FFI::StructLayout::Field::new( "s1", FFI.find_type(:cl_long).size * 1, FFI.find_type(:cl_long) ), FFI::StructLayout::Field::new( "s2", FFI.find_type(:cl_long).size * 2, FFI.find_type(:cl_long) ), FFI::StructLayout::Field::new( "s3", FFI.find_type(:cl_long).size * 3, FFI.find_type(:cl_long) ) ], FFI.find_type(:cl_long).size * 4, FFI.find_type(:cl_long).size * 4 )
771
+ # Creates a new Long4 with members set to 0 or to the user specified values
772
+ def initialize( s0 = 0, s1 = 0, s2 = 0, s3 = 0 )
773
+ super()
774
+ self[:s0] = s0
775
+ self[:s1] = s1
776
+ self[:s2] = s2
777
+ self[:s3] = s3
778
+ end
779
+ # Reads the s0 member
780
+ def s0
781
+ return self[:s0]
782
+ end
783
+ # Reads the s1 member
784
+ def s1
785
+ return self[:s1]
786
+ end
787
+ # Reads the s2 member
788
+ def s2
789
+ return self[:s2]
790
+ end
791
+ # Reads the s3 member
792
+ def s3
793
+ return self[:s3]
794
+ end
795
+ # Sets the s0 member to value
796
+ def s0=(value)
797
+ self[:s0] = value
798
+ end
799
+ # Sets the s1 member to value
800
+ def s1=(value)
801
+ self[:s1] = value
802
+ end
803
+ # Sets the s2 member to value
804
+ def s2=(value)
805
+ self[:s2] = value
806
+ end
807
+ # Sets the s3 member to value
808
+ def s3=(value)
809
+ self[:s3] = value
810
+ end
811
+ end
812
+ # Maps the cl_ulong4 type of OpenCL
813
+ class ULong4 < FFI::Struct
814
+ @size = FFI.find_type(:cl_ulong).size * 4
815
+ @layout = FFI::StructLayout::new([ FFI::StructLayout::Field::new( "s0", FFI.find_type(:cl_ulong).size * 0, FFI.find_type(:cl_ulong) ), FFI::StructLayout::Field::new( "s1", FFI.find_type(:cl_ulong).size * 1, FFI.find_type(:cl_ulong) ), FFI::StructLayout::Field::new( "s2", FFI.find_type(:cl_ulong).size * 2, FFI.find_type(:cl_ulong) ), FFI::StructLayout::Field::new( "s3", FFI.find_type(:cl_ulong).size * 3, FFI.find_type(:cl_ulong) ) ], FFI.find_type(:cl_ulong).size * 4, FFI.find_type(:cl_ulong).size * 4 )
816
+ # Creates a new ULong4 with members set to 0 or to the user specified values
817
+ def initialize( s0 = 0, s1 = 0, s2 = 0, s3 = 0 )
818
+ super()
819
+ self[:s0] = s0
820
+ self[:s1] = s1
821
+ self[:s2] = s2
822
+ self[:s3] = s3
823
+ end
824
+ # Reads the s0 member
825
+ def s0
826
+ return self[:s0]
827
+ end
828
+ # Reads the s1 member
829
+ def s1
830
+ return self[:s1]
831
+ end
832
+ # Reads the s2 member
833
+ def s2
834
+ return self[:s2]
835
+ end
836
+ # Reads the s3 member
837
+ def s3
838
+ return self[:s3]
839
+ end
840
+ # Sets the s0 member to value
841
+ def s0=(value)
842
+ self[:s0] = value
843
+ end
844
+ # Sets the s1 member to value
845
+ def s1=(value)
846
+ self[:s1] = value
847
+ end
848
+ # Sets the s2 member to value
849
+ def s2=(value)
850
+ self[:s2] = value
851
+ end
852
+ # Sets the s3 member to value
853
+ def s3=(value)
854
+ self[:s3] = value
855
+ end
856
+ end
857
+ # Maps the cl_float4 type of OpenCL
858
+ class Float4 < FFI::Struct
859
+ @size = FFI.find_type(:cl_float).size * 4
860
+ @layout = FFI::StructLayout::new([ FFI::StructLayout::Field::new( "s0", FFI.find_type(:cl_float).size * 0, FFI.find_type(:cl_float) ), FFI::StructLayout::Field::new( "s1", FFI.find_type(:cl_float).size * 1, FFI.find_type(:cl_float) ), FFI::StructLayout::Field::new( "s2", FFI.find_type(:cl_float).size * 2, FFI.find_type(:cl_float) ), FFI::StructLayout::Field::new( "s3", FFI.find_type(:cl_float).size * 3, FFI.find_type(:cl_float) ) ], FFI.find_type(:cl_float).size * 4, FFI.find_type(:cl_float).size * 4 )
861
+ # Creates a new Float4 with members set to 0 or to the user specified values
862
+ def initialize( s0 = 0.0, s1 = 0.0, s2 = 0.0, s3 = 0.0 )
863
+ super()
864
+ self[:s0] = s0
865
+ self[:s1] = s1
866
+ self[:s2] = s2
867
+ self[:s3] = s3
868
+ end
869
+ # Reads the s0 member
870
+ def s0
871
+ return self[:s0]
872
+ end
873
+ # Reads the s1 member
874
+ def s1
875
+ return self[:s1]
876
+ end
877
+ # Reads the s2 member
878
+ def s2
879
+ return self[:s2]
880
+ end
881
+ # Reads the s3 member
882
+ def s3
883
+ return self[:s3]
884
+ end
885
+ # Sets the s0 member to value
886
+ def s0=(value)
887
+ self[:s0] = value
888
+ end
889
+ # Sets the s1 member to value
890
+ def s1=(value)
891
+ self[:s1] = value
892
+ end
893
+ # Sets the s2 member to value
894
+ def s2=(value)
895
+ self[:s2] = value
896
+ end
897
+ # Sets the s3 member to value
898
+ def s3=(value)
899
+ self[:s3] = value
900
+ end
901
+ end
902
+ # Maps the cl_double4 type of OpenCL
903
+ class Double4 < FFI::Struct
904
+ @size = FFI.find_type(:cl_double).size * 4
905
+ @layout = FFI::StructLayout::new([ FFI::StructLayout::Field::new( "s0", FFI.find_type(:cl_double).size * 0, FFI.find_type(:cl_double) ), FFI::StructLayout::Field::new( "s1", FFI.find_type(:cl_double).size * 1, FFI.find_type(:cl_double) ), FFI::StructLayout::Field::new( "s2", FFI.find_type(:cl_double).size * 2, FFI.find_type(:cl_double) ), FFI::StructLayout::Field::new( "s3", FFI.find_type(:cl_double).size * 3, FFI.find_type(:cl_double) ) ], FFI.find_type(:cl_double).size * 4, FFI.find_type(:cl_double).size * 4 )
906
+ # Creates a new Double4 with members set to 0 or to the user specified values
907
+ def initialize( s0 = 0.0, s1 = 0.0, s2 = 0.0, s3 = 0.0 )
908
+ super()
909
+ self[:s0] = s0
910
+ self[:s1] = s1
911
+ self[:s2] = s2
912
+ self[:s3] = s3
913
+ end
914
+ # Reads the s0 member
915
+ def s0
916
+ return self[:s0]
917
+ end
918
+ # Reads the s1 member
919
+ def s1
920
+ return self[:s1]
921
+ end
922
+ # Reads the s2 member
923
+ def s2
924
+ return self[:s2]
925
+ end
926
+ # Reads the s3 member
927
+ def s3
928
+ return self[:s3]
929
+ end
930
+ # Sets the s0 member to value
931
+ def s0=(value)
932
+ self[:s0] = value
933
+ end
934
+ # Sets the s1 member to value
935
+ def s1=(value)
936
+ self[:s1] = value
937
+ end
938
+ # Sets the s2 member to value
939
+ def s2=(value)
940
+ self[:s2] = value
941
+ end
942
+ # Sets the s3 member to value
943
+ def s3=(value)
944
+ self[:s3] = value
945
+ end
946
+ end
947
+ # Maps the cl_half4 type of OpenCL
948
+ class Half4 < FFI::Struct
949
+ @size = FFI.find_type(:cl_half).size * 4
950
+ @layout = FFI::StructLayout::new([ FFI::StructLayout::Field::new( "s0", FFI.find_type(:cl_half).size * 0, FFI.find_type(:cl_half) ), FFI::StructLayout::Field::new( "s1", FFI.find_type(:cl_half).size * 1, FFI.find_type(:cl_half) ), FFI::StructLayout::Field::new( "s2", FFI.find_type(:cl_half).size * 2, FFI.find_type(:cl_half) ), FFI::StructLayout::Field::new( "s3", FFI.find_type(:cl_half).size * 3, FFI.find_type(:cl_half) ) ], FFI.find_type(:cl_half).size * 4, FFI.find_type(:cl_half).size * 4 )
951
+ # Creates a new Half4 with members set to 0 or to the user specified values
952
+ def initialize( s0 = 0.0, s1 = 0.0, s2 = 0.0, s3 = 0.0 )
953
+ super()
954
+ self[:s0] = s0
955
+ self[:s1] = s1
956
+ self[:s2] = s2
957
+ self[:s3] = s3
958
+ end
959
+ # Reads the s0 member
960
+ def s0
961
+ return self[:s0]
962
+ end
963
+ # Reads the s1 member
964
+ def s1
965
+ return self[:s1]
966
+ end
967
+ # Reads the s2 member
968
+ def s2
969
+ return self[:s2]
970
+ end
971
+ # Reads the s3 member
972
+ def s3
973
+ return self[:s3]
974
+ end
975
+ # Sets the s0 member to value
976
+ def s0=(value)
977
+ self[:s0] = value
978
+ end
979
+ # Sets the s1 member to value
980
+ def s1=(value)
981
+ self[:s1] = value
982
+ end
983
+ # Sets the s2 member to value
984
+ def s2=(value)
985
+ self[:s2] = value
986
+ end
987
+ # Sets the s3 member to value
988
+ def s3=(value)
989
+ self[:s3] = value
990
+ end
991
+ end
992
+ # Maps the cl_char8 type of OpenCL
993
+ class Char8 < FFI::Struct
994
+ @size = FFI.find_type(:cl_char).size * 8
995
+ @layout = FFI::StructLayout::new([ FFI::StructLayout::Field::new( "s0", FFI.find_type(:cl_char).size * 0, FFI.find_type(:cl_char) ), FFI::StructLayout::Field::new( "s1", FFI.find_type(:cl_char).size * 1, FFI.find_type(:cl_char) ), FFI::StructLayout::Field::new( "s2", FFI.find_type(:cl_char).size * 2, FFI.find_type(:cl_char) ), FFI::StructLayout::Field::new( "s3", FFI.find_type(:cl_char).size * 3, FFI.find_type(:cl_char) ), FFI::StructLayout::Field::new( "s4", FFI.find_type(:cl_char).size * 4, FFI.find_type(:cl_char) ), FFI::StructLayout::Field::new( "s5", FFI.find_type(:cl_char).size * 5, FFI.find_type(:cl_char) ), FFI::StructLayout::Field::new( "s6", FFI.find_type(:cl_char).size * 6, FFI.find_type(:cl_char) ), FFI::StructLayout::Field::new( "s7", FFI.find_type(:cl_char).size * 7, FFI.find_type(:cl_char) ) ], FFI.find_type(:cl_char).size * 8, FFI.find_type(:cl_char).size * 8 )
996
+ # Creates a new Char8 with members set to 0 or to the user specified values
997
+ def initialize( s0 = 0, s1 = 0, s2 = 0, s3 = 0, s4 = 0, s5 = 0, s6 = 0, s7 = 0 )
998
+ super()
999
+ self[:s0] = s0
1000
+ self[:s1] = s1
1001
+ self[:s2] = s2
1002
+ self[:s3] = s3
1003
+ self[:s4] = s4
1004
+ self[:s5] = s5
1005
+ self[:s6] = s6
1006
+ self[:s7] = s7
1007
+ end
1008
+ # Reads the s0 member
1009
+ def s0
1010
+ return self[:s0]
1011
+ end
1012
+ # Reads the s1 member
1013
+ def s1
1014
+ return self[:s1]
1015
+ end
1016
+ # Reads the s2 member
1017
+ def s2
1018
+ return self[:s2]
1019
+ end
1020
+ # Reads the s3 member
1021
+ def s3
1022
+ return self[:s3]
1023
+ end
1024
+ # Reads the s4 member
1025
+ def s4
1026
+ return self[:s4]
1027
+ end
1028
+ # Reads the s5 member
1029
+ def s5
1030
+ return self[:s5]
1031
+ end
1032
+ # Reads the s6 member
1033
+ def s6
1034
+ return self[:s6]
1035
+ end
1036
+ # Reads the s7 member
1037
+ def s7
1038
+ return self[:s7]
1039
+ end
1040
+ # Sets the s0 member to value
1041
+ def s0=(value)
1042
+ self[:s0] = value
1043
+ end
1044
+ # Sets the s1 member to value
1045
+ def s1=(value)
1046
+ self[:s1] = value
1047
+ end
1048
+ # Sets the s2 member to value
1049
+ def s2=(value)
1050
+ self[:s2] = value
1051
+ end
1052
+ # Sets the s3 member to value
1053
+ def s3=(value)
1054
+ self[:s3] = value
1055
+ end
1056
+ # Sets the s4 member to value
1057
+ def s4=(value)
1058
+ self[:s4] = value
1059
+ end
1060
+ # Sets the s5 member to value
1061
+ def s5=(value)
1062
+ self[:s5] = value
1063
+ end
1064
+ # Sets the s6 member to value
1065
+ def s6=(value)
1066
+ self[:s6] = value
1067
+ end
1068
+ # Sets the s7 member to value
1069
+ def s7=(value)
1070
+ self[:s7] = value
1071
+ end
1072
+ end
1073
+ # Maps the cl_uchar8 type of OpenCL
1074
+ class UChar8 < FFI::Struct
1075
+ @size = FFI.find_type(:cl_uchar).size * 8
1076
+ @layout = FFI::StructLayout::new([ FFI::StructLayout::Field::new( "s0", FFI.find_type(:cl_uchar).size * 0, FFI.find_type(:cl_uchar) ), FFI::StructLayout::Field::new( "s1", FFI.find_type(:cl_uchar).size * 1, FFI.find_type(:cl_uchar) ), FFI::StructLayout::Field::new( "s2", FFI.find_type(:cl_uchar).size * 2, FFI.find_type(:cl_uchar) ), FFI::StructLayout::Field::new( "s3", FFI.find_type(:cl_uchar).size * 3, FFI.find_type(:cl_uchar) ), FFI::StructLayout::Field::new( "s4", FFI.find_type(:cl_uchar).size * 4, FFI.find_type(:cl_uchar) ), FFI::StructLayout::Field::new( "s5", FFI.find_type(:cl_uchar).size * 5, FFI.find_type(:cl_uchar) ), FFI::StructLayout::Field::new( "s6", FFI.find_type(:cl_uchar).size * 6, FFI.find_type(:cl_uchar) ), FFI::StructLayout::Field::new( "s7", FFI.find_type(:cl_uchar).size * 7, FFI.find_type(:cl_uchar) ) ], FFI.find_type(:cl_uchar).size * 8, FFI.find_type(:cl_uchar).size * 8 )
1077
+ # Creates a new UChar8 with members set to 0 or to the user specified values
1078
+ def initialize( s0 = 0, s1 = 0, s2 = 0, s3 = 0, s4 = 0, s5 = 0, s6 = 0, s7 = 0 )
1079
+ super()
1080
+ self[:s0] = s0
1081
+ self[:s1] = s1
1082
+ self[:s2] = s2
1083
+ self[:s3] = s3
1084
+ self[:s4] = s4
1085
+ self[:s5] = s5
1086
+ self[:s6] = s6
1087
+ self[:s7] = s7
1088
+ end
1089
+ # Reads the s0 member
1090
+ def s0
1091
+ return self[:s0]
1092
+ end
1093
+ # Reads the s1 member
1094
+ def s1
1095
+ return self[:s1]
1096
+ end
1097
+ # Reads the s2 member
1098
+ def s2
1099
+ return self[:s2]
1100
+ end
1101
+ # Reads the s3 member
1102
+ def s3
1103
+ return self[:s3]
1104
+ end
1105
+ # Reads the s4 member
1106
+ def s4
1107
+ return self[:s4]
1108
+ end
1109
+ # Reads the s5 member
1110
+ def s5
1111
+ return self[:s5]
1112
+ end
1113
+ # Reads the s6 member
1114
+ def s6
1115
+ return self[:s6]
1116
+ end
1117
+ # Reads the s7 member
1118
+ def s7
1119
+ return self[:s7]
1120
+ end
1121
+ # Sets the s0 member to value
1122
+ def s0=(value)
1123
+ self[:s0] = value
1124
+ end
1125
+ # Sets the s1 member to value
1126
+ def s1=(value)
1127
+ self[:s1] = value
1128
+ end
1129
+ # Sets the s2 member to value
1130
+ def s2=(value)
1131
+ self[:s2] = value
1132
+ end
1133
+ # Sets the s3 member to value
1134
+ def s3=(value)
1135
+ self[:s3] = value
1136
+ end
1137
+ # Sets the s4 member to value
1138
+ def s4=(value)
1139
+ self[:s4] = value
1140
+ end
1141
+ # Sets the s5 member to value
1142
+ def s5=(value)
1143
+ self[:s5] = value
1144
+ end
1145
+ # Sets the s6 member to value
1146
+ def s6=(value)
1147
+ self[:s6] = value
1148
+ end
1149
+ # Sets the s7 member to value
1150
+ def s7=(value)
1151
+ self[:s7] = value
1152
+ end
1153
+ end
1154
+ # Maps the cl_short8 type of OpenCL
1155
+ class Short8 < FFI::Struct
1156
+ @size = FFI.find_type(:cl_short).size * 8
1157
+ @layout = FFI::StructLayout::new([ FFI::StructLayout::Field::new( "s0", FFI.find_type(:cl_short).size * 0, FFI.find_type(:cl_short) ), FFI::StructLayout::Field::new( "s1", FFI.find_type(:cl_short).size * 1, FFI.find_type(:cl_short) ), FFI::StructLayout::Field::new( "s2", FFI.find_type(:cl_short).size * 2, FFI.find_type(:cl_short) ), FFI::StructLayout::Field::new( "s3", FFI.find_type(:cl_short).size * 3, FFI.find_type(:cl_short) ), FFI::StructLayout::Field::new( "s4", FFI.find_type(:cl_short).size * 4, FFI.find_type(:cl_short) ), FFI::StructLayout::Field::new( "s5", FFI.find_type(:cl_short).size * 5, FFI.find_type(:cl_short) ), FFI::StructLayout::Field::new( "s6", FFI.find_type(:cl_short).size * 6, FFI.find_type(:cl_short) ), FFI::StructLayout::Field::new( "s7", FFI.find_type(:cl_short).size * 7, FFI.find_type(:cl_short) ) ], FFI.find_type(:cl_short).size * 8, FFI.find_type(:cl_short).size * 8 )
1158
+ # Creates a new Short8 with members set to 0 or to the user specified values
1159
+ def initialize( s0 = 0, s1 = 0, s2 = 0, s3 = 0, s4 = 0, s5 = 0, s6 = 0, s7 = 0 )
1160
+ super()
1161
+ self[:s0] = s0
1162
+ self[:s1] = s1
1163
+ self[:s2] = s2
1164
+ self[:s3] = s3
1165
+ self[:s4] = s4
1166
+ self[:s5] = s5
1167
+ self[:s6] = s6
1168
+ self[:s7] = s7
1169
+ end
1170
+ # Reads the s0 member
1171
+ def s0
1172
+ return self[:s0]
1173
+ end
1174
+ # Reads the s1 member
1175
+ def s1
1176
+ return self[:s1]
1177
+ end
1178
+ # Reads the s2 member
1179
+ def s2
1180
+ return self[:s2]
1181
+ end
1182
+ # Reads the s3 member
1183
+ def s3
1184
+ return self[:s3]
1185
+ end
1186
+ # Reads the s4 member
1187
+ def s4
1188
+ return self[:s4]
1189
+ end
1190
+ # Reads the s5 member
1191
+ def s5
1192
+ return self[:s5]
1193
+ end
1194
+ # Reads the s6 member
1195
+ def s6
1196
+ return self[:s6]
1197
+ end
1198
+ # Reads the s7 member
1199
+ def s7
1200
+ return self[:s7]
1201
+ end
1202
+ # Sets the s0 member to value
1203
+ def s0=(value)
1204
+ self[:s0] = value
1205
+ end
1206
+ # Sets the s1 member to value
1207
+ def s1=(value)
1208
+ self[:s1] = value
1209
+ end
1210
+ # Sets the s2 member to value
1211
+ def s2=(value)
1212
+ self[:s2] = value
1213
+ end
1214
+ # Sets the s3 member to value
1215
+ def s3=(value)
1216
+ self[:s3] = value
1217
+ end
1218
+ # Sets the s4 member to value
1219
+ def s4=(value)
1220
+ self[:s4] = value
1221
+ end
1222
+ # Sets the s5 member to value
1223
+ def s5=(value)
1224
+ self[:s5] = value
1225
+ end
1226
+ # Sets the s6 member to value
1227
+ def s6=(value)
1228
+ self[:s6] = value
1229
+ end
1230
+ # Sets the s7 member to value
1231
+ def s7=(value)
1232
+ self[:s7] = value
1233
+ end
1234
+ end
1235
+ # Maps the cl_ushort8 type of OpenCL
1236
+ class UShort8 < FFI::Struct
1237
+ @size = FFI.find_type(:cl_ushort).size * 8
1238
+ @layout = FFI::StructLayout::new([ FFI::StructLayout::Field::new( "s0", FFI.find_type(:cl_ushort).size * 0, FFI.find_type(:cl_ushort) ), FFI::StructLayout::Field::new( "s1", FFI.find_type(:cl_ushort).size * 1, FFI.find_type(:cl_ushort) ), FFI::StructLayout::Field::new( "s2", FFI.find_type(:cl_ushort).size * 2, FFI.find_type(:cl_ushort) ), FFI::StructLayout::Field::new( "s3", FFI.find_type(:cl_ushort).size * 3, FFI.find_type(:cl_ushort) ), FFI::StructLayout::Field::new( "s4", FFI.find_type(:cl_ushort).size * 4, FFI.find_type(:cl_ushort) ), FFI::StructLayout::Field::new( "s5", FFI.find_type(:cl_ushort).size * 5, FFI.find_type(:cl_ushort) ), FFI::StructLayout::Field::new( "s6", FFI.find_type(:cl_ushort).size * 6, FFI.find_type(:cl_ushort) ), FFI::StructLayout::Field::new( "s7", FFI.find_type(:cl_ushort).size * 7, FFI.find_type(:cl_ushort) ) ], FFI.find_type(:cl_ushort).size * 8, FFI.find_type(:cl_ushort).size * 8 )
1239
+ # Creates a new UShort8 with members set to 0 or to the user specified values
1240
+ def initialize( s0 = 0, s1 = 0, s2 = 0, s3 = 0, s4 = 0, s5 = 0, s6 = 0, s7 = 0 )
1241
+ super()
1242
+ self[:s0] = s0
1243
+ self[:s1] = s1
1244
+ self[:s2] = s2
1245
+ self[:s3] = s3
1246
+ self[:s4] = s4
1247
+ self[:s5] = s5
1248
+ self[:s6] = s6
1249
+ self[:s7] = s7
1250
+ end
1251
+ # Reads the s0 member
1252
+ def s0
1253
+ return self[:s0]
1254
+ end
1255
+ # Reads the s1 member
1256
+ def s1
1257
+ return self[:s1]
1258
+ end
1259
+ # Reads the s2 member
1260
+ def s2
1261
+ return self[:s2]
1262
+ end
1263
+ # Reads the s3 member
1264
+ def s3
1265
+ return self[:s3]
1266
+ end
1267
+ # Reads the s4 member
1268
+ def s4
1269
+ return self[:s4]
1270
+ end
1271
+ # Reads the s5 member
1272
+ def s5
1273
+ return self[:s5]
1274
+ end
1275
+ # Reads the s6 member
1276
+ def s6
1277
+ return self[:s6]
1278
+ end
1279
+ # Reads the s7 member
1280
+ def s7
1281
+ return self[:s7]
1282
+ end
1283
+ # Sets the s0 member to value
1284
+ def s0=(value)
1285
+ self[:s0] = value
1286
+ end
1287
+ # Sets the s1 member to value
1288
+ def s1=(value)
1289
+ self[:s1] = value
1290
+ end
1291
+ # Sets the s2 member to value
1292
+ def s2=(value)
1293
+ self[:s2] = value
1294
+ end
1295
+ # Sets the s3 member to value
1296
+ def s3=(value)
1297
+ self[:s3] = value
1298
+ end
1299
+ # Sets the s4 member to value
1300
+ def s4=(value)
1301
+ self[:s4] = value
1302
+ end
1303
+ # Sets the s5 member to value
1304
+ def s5=(value)
1305
+ self[:s5] = value
1306
+ end
1307
+ # Sets the s6 member to value
1308
+ def s6=(value)
1309
+ self[:s6] = value
1310
+ end
1311
+ # Sets the s7 member to value
1312
+ def s7=(value)
1313
+ self[:s7] = value
1314
+ end
1315
+ end
1316
+ # Maps the cl_int8 type of OpenCL
1317
+ class Int8 < FFI::Struct
1318
+ @size = FFI.find_type(:cl_int).size * 8
1319
+ @layout = FFI::StructLayout::new([ FFI::StructLayout::Field::new( "s0", FFI.find_type(:cl_int).size * 0, FFI.find_type(:cl_int) ), FFI::StructLayout::Field::new( "s1", FFI.find_type(:cl_int).size * 1, FFI.find_type(:cl_int) ), FFI::StructLayout::Field::new( "s2", FFI.find_type(:cl_int).size * 2, FFI.find_type(:cl_int) ), FFI::StructLayout::Field::new( "s3", FFI.find_type(:cl_int).size * 3, FFI.find_type(:cl_int) ), FFI::StructLayout::Field::new( "s4", FFI.find_type(:cl_int).size * 4, FFI.find_type(:cl_int) ), FFI::StructLayout::Field::new( "s5", FFI.find_type(:cl_int).size * 5, FFI.find_type(:cl_int) ), FFI::StructLayout::Field::new( "s6", FFI.find_type(:cl_int).size * 6, FFI.find_type(:cl_int) ), FFI::StructLayout::Field::new( "s7", FFI.find_type(:cl_int).size * 7, FFI.find_type(:cl_int) ) ], FFI.find_type(:cl_int).size * 8, FFI.find_type(:cl_int).size * 8 )
1320
+ # Creates a new Int8 with members set to 0 or to the user specified values
1321
+ def initialize( s0 = 0, s1 = 0, s2 = 0, s3 = 0, s4 = 0, s5 = 0, s6 = 0, s7 = 0 )
1322
+ super()
1323
+ self[:s0] = s0
1324
+ self[:s1] = s1
1325
+ self[:s2] = s2
1326
+ self[:s3] = s3
1327
+ self[:s4] = s4
1328
+ self[:s5] = s5
1329
+ self[:s6] = s6
1330
+ self[:s7] = s7
1331
+ end
1332
+ # Reads the s0 member
1333
+ def s0
1334
+ return self[:s0]
1335
+ end
1336
+ # Reads the s1 member
1337
+ def s1
1338
+ return self[:s1]
1339
+ end
1340
+ # Reads the s2 member
1341
+ def s2
1342
+ return self[:s2]
1343
+ end
1344
+ # Reads the s3 member
1345
+ def s3
1346
+ return self[:s3]
1347
+ end
1348
+ # Reads the s4 member
1349
+ def s4
1350
+ return self[:s4]
1351
+ end
1352
+ # Reads the s5 member
1353
+ def s5
1354
+ return self[:s5]
1355
+ end
1356
+ # Reads the s6 member
1357
+ def s6
1358
+ return self[:s6]
1359
+ end
1360
+ # Reads the s7 member
1361
+ def s7
1362
+ return self[:s7]
1363
+ end
1364
+ # Sets the s0 member to value
1365
+ def s0=(value)
1366
+ self[:s0] = value
1367
+ end
1368
+ # Sets the s1 member to value
1369
+ def s1=(value)
1370
+ self[:s1] = value
1371
+ end
1372
+ # Sets the s2 member to value
1373
+ def s2=(value)
1374
+ self[:s2] = value
1375
+ end
1376
+ # Sets the s3 member to value
1377
+ def s3=(value)
1378
+ self[:s3] = value
1379
+ end
1380
+ # Sets the s4 member to value
1381
+ def s4=(value)
1382
+ self[:s4] = value
1383
+ end
1384
+ # Sets the s5 member to value
1385
+ def s5=(value)
1386
+ self[:s5] = value
1387
+ end
1388
+ # Sets the s6 member to value
1389
+ def s6=(value)
1390
+ self[:s6] = value
1391
+ end
1392
+ # Sets the s7 member to value
1393
+ def s7=(value)
1394
+ self[:s7] = value
1395
+ end
1396
+ end
1397
+ # Maps the cl_uint8 type of OpenCL
1398
+ class UInt8 < FFI::Struct
1399
+ @size = FFI.find_type(:cl_uint).size * 8
1400
+ @layout = FFI::StructLayout::new([ FFI::StructLayout::Field::new( "s0", FFI.find_type(:cl_uint).size * 0, FFI.find_type(:cl_uint) ), FFI::StructLayout::Field::new( "s1", FFI.find_type(:cl_uint).size * 1, FFI.find_type(:cl_uint) ), FFI::StructLayout::Field::new( "s2", FFI.find_type(:cl_uint).size * 2, FFI.find_type(:cl_uint) ), FFI::StructLayout::Field::new( "s3", FFI.find_type(:cl_uint).size * 3, FFI.find_type(:cl_uint) ), FFI::StructLayout::Field::new( "s4", FFI.find_type(:cl_uint).size * 4, FFI.find_type(:cl_uint) ), FFI::StructLayout::Field::new( "s5", FFI.find_type(:cl_uint).size * 5, FFI.find_type(:cl_uint) ), FFI::StructLayout::Field::new( "s6", FFI.find_type(:cl_uint).size * 6, FFI.find_type(:cl_uint) ), FFI::StructLayout::Field::new( "s7", FFI.find_type(:cl_uint).size * 7, FFI.find_type(:cl_uint) ) ], FFI.find_type(:cl_uint).size * 8, FFI.find_type(:cl_uint).size * 8 )
1401
+ # Creates a new UInt8 with members set to 0 or to the user specified values
1402
+ def initialize( s0 = 0, s1 = 0, s2 = 0, s3 = 0, s4 = 0, s5 = 0, s6 = 0, s7 = 0 )
1403
+ super()
1404
+ self[:s0] = s0
1405
+ self[:s1] = s1
1406
+ self[:s2] = s2
1407
+ self[:s3] = s3
1408
+ self[:s4] = s4
1409
+ self[:s5] = s5
1410
+ self[:s6] = s6
1411
+ self[:s7] = s7
1412
+ end
1413
+ # Reads the s0 member
1414
+ def s0
1415
+ return self[:s0]
1416
+ end
1417
+ # Reads the s1 member
1418
+ def s1
1419
+ return self[:s1]
1420
+ end
1421
+ # Reads the s2 member
1422
+ def s2
1423
+ return self[:s2]
1424
+ end
1425
+ # Reads the s3 member
1426
+ def s3
1427
+ return self[:s3]
1428
+ end
1429
+ # Reads the s4 member
1430
+ def s4
1431
+ return self[:s4]
1432
+ end
1433
+ # Reads the s5 member
1434
+ def s5
1435
+ return self[:s5]
1436
+ end
1437
+ # Reads the s6 member
1438
+ def s6
1439
+ return self[:s6]
1440
+ end
1441
+ # Reads the s7 member
1442
+ def s7
1443
+ return self[:s7]
1444
+ end
1445
+ # Sets the s0 member to value
1446
+ def s0=(value)
1447
+ self[:s0] = value
1448
+ end
1449
+ # Sets the s1 member to value
1450
+ def s1=(value)
1451
+ self[:s1] = value
1452
+ end
1453
+ # Sets the s2 member to value
1454
+ def s2=(value)
1455
+ self[:s2] = value
1456
+ end
1457
+ # Sets the s3 member to value
1458
+ def s3=(value)
1459
+ self[:s3] = value
1460
+ end
1461
+ # Sets the s4 member to value
1462
+ def s4=(value)
1463
+ self[:s4] = value
1464
+ end
1465
+ # Sets the s5 member to value
1466
+ def s5=(value)
1467
+ self[:s5] = value
1468
+ end
1469
+ # Sets the s6 member to value
1470
+ def s6=(value)
1471
+ self[:s6] = value
1472
+ end
1473
+ # Sets the s7 member to value
1474
+ def s7=(value)
1475
+ self[:s7] = value
1476
+ end
1477
+ end
1478
+ # Maps the cl_long8 type of OpenCL
1479
+ class Long8 < FFI::Struct
1480
+ @size = FFI.find_type(:cl_long).size * 8
1481
+ @layout = FFI::StructLayout::new([ FFI::StructLayout::Field::new( "s0", FFI.find_type(:cl_long).size * 0, FFI.find_type(:cl_long) ), FFI::StructLayout::Field::new( "s1", FFI.find_type(:cl_long).size * 1, FFI.find_type(:cl_long) ), FFI::StructLayout::Field::new( "s2", FFI.find_type(:cl_long).size * 2, FFI.find_type(:cl_long) ), FFI::StructLayout::Field::new( "s3", FFI.find_type(:cl_long).size * 3, FFI.find_type(:cl_long) ), FFI::StructLayout::Field::new( "s4", FFI.find_type(:cl_long).size * 4, FFI.find_type(:cl_long) ), FFI::StructLayout::Field::new( "s5", FFI.find_type(:cl_long).size * 5, FFI.find_type(:cl_long) ), FFI::StructLayout::Field::new( "s6", FFI.find_type(:cl_long).size * 6, FFI.find_type(:cl_long) ), FFI::StructLayout::Field::new( "s7", FFI.find_type(:cl_long).size * 7, FFI.find_type(:cl_long) ) ], FFI.find_type(:cl_long).size * 8, FFI.find_type(:cl_long).size * 8 )
1482
+ # Creates a new Long8 with members set to 0 or to the user specified values
1483
+ def initialize( s0 = 0, s1 = 0, s2 = 0, s3 = 0, s4 = 0, s5 = 0, s6 = 0, s7 = 0 )
1484
+ super()
1485
+ self[:s0] = s0
1486
+ self[:s1] = s1
1487
+ self[:s2] = s2
1488
+ self[:s3] = s3
1489
+ self[:s4] = s4
1490
+ self[:s5] = s5
1491
+ self[:s6] = s6
1492
+ self[:s7] = s7
1493
+ end
1494
+ # Reads the s0 member
1495
+ def s0
1496
+ return self[:s0]
1497
+ end
1498
+ # Reads the s1 member
1499
+ def s1
1500
+ return self[:s1]
1501
+ end
1502
+ # Reads the s2 member
1503
+ def s2
1504
+ return self[:s2]
1505
+ end
1506
+ # Reads the s3 member
1507
+ def s3
1508
+ return self[:s3]
1509
+ end
1510
+ # Reads the s4 member
1511
+ def s4
1512
+ return self[:s4]
1513
+ end
1514
+ # Reads the s5 member
1515
+ def s5
1516
+ return self[:s5]
1517
+ end
1518
+ # Reads the s6 member
1519
+ def s6
1520
+ return self[:s6]
1521
+ end
1522
+ # Reads the s7 member
1523
+ def s7
1524
+ return self[:s7]
1525
+ end
1526
+ # Sets the s0 member to value
1527
+ def s0=(value)
1528
+ self[:s0] = value
1529
+ end
1530
+ # Sets the s1 member to value
1531
+ def s1=(value)
1532
+ self[:s1] = value
1533
+ end
1534
+ # Sets the s2 member to value
1535
+ def s2=(value)
1536
+ self[:s2] = value
1537
+ end
1538
+ # Sets the s3 member to value
1539
+ def s3=(value)
1540
+ self[:s3] = value
1541
+ end
1542
+ # Sets the s4 member to value
1543
+ def s4=(value)
1544
+ self[:s4] = value
1545
+ end
1546
+ # Sets the s5 member to value
1547
+ def s5=(value)
1548
+ self[:s5] = value
1549
+ end
1550
+ # Sets the s6 member to value
1551
+ def s6=(value)
1552
+ self[:s6] = value
1553
+ end
1554
+ # Sets the s7 member to value
1555
+ def s7=(value)
1556
+ self[:s7] = value
1557
+ end
1558
+ end
1559
+ # Maps the cl_ulong8 type of OpenCL
1560
+ class ULong8 < FFI::Struct
1561
+ @size = FFI.find_type(:cl_ulong).size * 8
1562
+ @layout = FFI::StructLayout::new([ FFI::StructLayout::Field::new( "s0", FFI.find_type(:cl_ulong).size * 0, FFI.find_type(:cl_ulong) ), FFI::StructLayout::Field::new( "s1", FFI.find_type(:cl_ulong).size * 1, FFI.find_type(:cl_ulong) ), FFI::StructLayout::Field::new( "s2", FFI.find_type(:cl_ulong).size * 2, FFI.find_type(:cl_ulong) ), FFI::StructLayout::Field::new( "s3", FFI.find_type(:cl_ulong).size * 3, FFI.find_type(:cl_ulong) ), FFI::StructLayout::Field::new( "s4", FFI.find_type(:cl_ulong).size * 4, FFI.find_type(:cl_ulong) ), FFI::StructLayout::Field::new( "s5", FFI.find_type(:cl_ulong).size * 5, FFI.find_type(:cl_ulong) ), FFI::StructLayout::Field::new( "s6", FFI.find_type(:cl_ulong).size * 6, FFI.find_type(:cl_ulong) ), FFI::StructLayout::Field::new( "s7", FFI.find_type(:cl_ulong).size * 7, FFI.find_type(:cl_ulong) ) ], FFI.find_type(:cl_ulong).size * 8, FFI.find_type(:cl_ulong).size * 8 )
1563
+ # Creates a new ULong8 with members set to 0 or to the user specified values
1564
+ def initialize( s0 = 0, s1 = 0, s2 = 0, s3 = 0, s4 = 0, s5 = 0, s6 = 0, s7 = 0 )
1565
+ super()
1566
+ self[:s0] = s0
1567
+ self[:s1] = s1
1568
+ self[:s2] = s2
1569
+ self[:s3] = s3
1570
+ self[:s4] = s4
1571
+ self[:s5] = s5
1572
+ self[:s6] = s6
1573
+ self[:s7] = s7
1574
+ end
1575
+ # Reads the s0 member
1576
+ def s0
1577
+ return self[:s0]
1578
+ end
1579
+ # Reads the s1 member
1580
+ def s1
1581
+ return self[:s1]
1582
+ end
1583
+ # Reads the s2 member
1584
+ def s2
1585
+ return self[:s2]
1586
+ end
1587
+ # Reads the s3 member
1588
+ def s3
1589
+ return self[:s3]
1590
+ end
1591
+ # Reads the s4 member
1592
+ def s4
1593
+ return self[:s4]
1594
+ end
1595
+ # Reads the s5 member
1596
+ def s5
1597
+ return self[:s5]
1598
+ end
1599
+ # Reads the s6 member
1600
+ def s6
1601
+ return self[:s6]
1602
+ end
1603
+ # Reads the s7 member
1604
+ def s7
1605
+ return self[:s7]
1606
+ end
1607
+ # Sets the s0 member to value
1608
+ def s0=(value)
1609
+ self[:s0] = value
1610
+ end
1611
+ # Sets the s1 member to value
1612
+ def s1=(value)
1613
+ self[:s1] = value
1614
+ end
1615
+ # Sets the s2 member to value
1616
+ def s2=(value)
1617
+ self[:s2] = value
1618
+ end
1619
+ # Sets the s3 member to value
1620
+ def s3=(value)
1621
+ self[:s3] = value
1622
+ end
1623
+ # Sets the s4 member to value
1624
+ def s4=(value)
1625
+ self[:s4] = value
1626
+ end
1627
+ # Sets the s5 member to value
1628
+ def s5=(value)
1629
+ self[:s5] = value
1630
+ end
1631
+ # Sets the s6 member to value
1632
+ def s6=(value)
1633
+ self[:s6] = value
1634
+ end
1635
+ # Sets the s7 member to value
1636
+ def s7=(value)
1637
+ self[:s7] = value
1638
+ end
1639
+ end
1640
+ # Maps the cl_float8 type of OpenCL
1641
+ class Float8 < FFI::Struct
1642
+ @size = FFI.find_type(:cl_float).size * 8
1643
+ @layout = FFI::StructLayout::new([ FFI::StructLayout::Field::new( "s0", FFI.find_type(:cl_float).size * 0, FFI.find_type(:cl_float) ), FFI::StructLayout::Field::new( "s1", FFI.find_type(:cl_float).size * 1, FFI.find_type(:cl_float) ), FFI::StructLayout::Field::new( "s2", FFI.find_type(:cl_float).size * 2, FFI.find_type(:cl_float) ), FFI::StructLayout::Field::new( "s3", FFI.find_type(:cl_float).size * 3, FFI.find_type(:cl_float) ), FFI::StructLayout::Field::new( "s4", FFI.find_type(:cl_float).size * 4, FFI.find_type(:cl_float) ), FFI::StructLayout::Field::new( "s5", FFI.find_type(:cl_float).size * 5, FFI.find_type(:cl_float) ), FFI::StructLayout::Field::new( "s6", FFI.find_type(:cl_float).size * 6, FFI.find_type(:cl_float) ), FFI::StructLayout::Field::new( "s7", FFI.find_type(:cl_float).size * 7, FFI.find_type(:cl_float) ) ], FFI.find_type(:cl_float).size * 8, FFI.find_type(:cl_float).size * 8 )
1644
+ # Creates a new Float8 with members set to 0 or to the user specified values
1645
+ def initialize( s0 = 0.0, s1 = 0.0, s2 = 0.0, s3 = 0.0, s4 = 0.0, s5 = 0.0, s6 = 0.0, s7 = 0.0 )
1646
+ super()
1647
+ self[:s0] = s0
1648
+ self[:s1] = s1
1649
+ self[:s2] = s2
1650
+ self[:s3] = s3
1651
+ self[:s4] = s4
1652
+ self[:s5] = s5
1653
+ self[:s6] = s6
1654
+ self[:s7] = s7
1655
+ end
1656
+ # Reads the s0 member
1657
+ def s0
1658
+ return self[:s0]
1659
+ end
1660
+ # Reads the s1 member
1661
+ def s1
1662
+ return self[:s1]
1663
+ end
1664
+ # Reads the s2 member
1665
+ def s2
1666
+ return self[:s2]
1667
+ end
1668
+ # Reads the s3 member
1669
+ def s3
1670
+ return self[:s3]
1671
+ end
1672
+ # Reads the s4 member
1673
+ def s4
1674
+ return self[:s4]
1675
+ end
1676
+ # Reads the s5 member
1677
+ def s5
1678
+ return self[:s5]
1679
+ end
1680
+ # Reads the s6 member
1681
+ def s6
1682
+ return self[:s6]
1683
+ end
1684
+ # Reads the s7 member
1685
+ def s7
1686
+ return self[:s7]
1687
+ end
1688
+ # Sets the s0 member to value
1689
+ def s0=(value)
1690
+ self[:s0] = value
1691
+ end
1692
+ # Sets the s1 member to value
1693
+ def s1=(value)
1694
+ self[:s1] = value
1695
+ end
1696
+ # Sets the s2 member to value
1697
+ def s2=(value)
1698
+ self[:s2] = value
1699
+ end
1700
+ # Sets the s3 member to value
1701
+ def s3=(value)
1702
+ self[:s3] = value
1703
+ end
1704
+ # Sets the s4 member to value
1705
+ def s4=(value)
1706
+ self[:s4] = value
1707
+ end
1708
+ # Sets the s5 member to value
1709
+ def s5=(value)
1710
+ self[:s5] = value
1711
+ end
1712
+ # Sets the s6 member to value
1713
+ def s6=(value)
1714
+ self[:s6] = value
1715
+ end
1716
+ # Sets the s7 member to value
1717
+ def s7=(value)
1718
+ self[:s7] = value
1719
+ end
1720
+ end
1721
+ # Maps the cl_double8 type of OpenCL
1722
+ class Double8 < FFI::Struct
1723
+ @size = FFI.find_type(:cl_double).size * 8
1724
+ @layout = FFI::StructLayout::new([ FFI::StructLayout::Field::new( "s0", FFI.find_type(:cl_double).size * 0, FFI.find_type(:cl_double) ), FFI::StructLayout::Field::new( "s1", FFI.find_type(:cl_double).size * 1, FFI.find_type(:cl_double) ), FFI::StructLayout::Field::new( "s2", FFI.find_type(:cl_double).size * 2, FFI.find_type(:cl_double) ), FFI::StructLayout::Field::new( "s3", FFI.find_type(:cl_double).size * 3, FFI.find_type(:cl_double) ), FFI::StructLayout::Field::new( "s4", FFI.find_type(:cl_double).size * 4, FFI.find_type(:cl_double) ), FFI::StructLayout::Field::new( "s5", FFI.find_type(:cl_double).size * 5, FFI.find_type(:cl_double) ), FFI::StructLayout::Field::new( "s6", FFI.find_type(:cl_double).size * 6, FFI.find_type(:cl_double) ), FFI::StructLayout::Field::new( "s7", FFI.find_type(:cl_double).size * 7, FFI.find_type(:cl_double) ) ], FFI.find_type(:cl_double).size * 8, FFI.find_type(:cl_double).size * 8 )
1725
+ # Creates a new Double8 with members set to 0 or to the user specified values
1726
+ def initialize( s0 = 0.0, s1 = 0.0, s2 = 0.0, s3 = 0.0, s4 = 0.0, s5 = 0.0, s6 = 0.0, s7 = 0.0 )
1727
+ super()
1728
+ self[:s0] = s0
1729
+ self[:s1] = s1
1730
+ self[:s2] = s2
1731
+ self[:s3] = s3
1732
+ self[:s4] = s4
1733
+ self[:s5] = s5
1734
+ self[:s6] = s6
1735
+ self[:s7] = s7
1736
+ end
1737
+ # Reads the s0 member
1738
+ def s0
1739
+ return self[:s0]
1740
+ end
1741
+ # Reads the s1 member
1742
+ def s1
1743
+ return self[:s1]
1744
+ end
1745
+ # Reads the s2 member
1746
+ def s2
1747
+ return self[:s2]
1748
+ end
1749
+ # Reads the s3 member
1750
+ def s3
1751
+ return self[:s3]
1752
+ end
1753
+ # Reads the s4 member
1754
+ def s4
1755
+ return self[:s4]
1756
+ end
1757
+ # Reads the s5 member
1758
+ def s5
1759
+ return self[:s5]
1760
+ end
1761
+ # Reads the s6 member
1762
+ def s6
1763
+ return self[:s6]
1764
+ end
1765
+ # Reads the s7 member
1766
+ def s7
1767
+ return self[:s7]
1768
+ end
1769
+ # Sets the s0 member to value
1770
+ def s0=(value)
1771
+ self[:s0] = value
1772
+ end
1773
+ # Sets the s1 member to value
1774
+ def s1=(value)
1775
+ self[:s1] = value
1776
+ end
1777
+ # Sets the s2 member to value
1778
+ def s2=(value)
1779
+ self[:s2] = value
1780
+ end
1781
+ # Sets the s3 member to value
1782
+ def s3=(value)
1783
+ self[:s3] = value
1784
+ end
1785
+ # Sets the s4 member to value
1786
+ def s4=(value)
1787
+ self[:s4] = value
1788
+ end
1789
+ # Sets the s5 member to value
1790
+ def s5=(value)
1791
+ self[:s5] = value
1792
+ end
1793
+ # Sets the s6 member to value
1794
+ def s6=(value)
1795
+ self[:s6] = value
1796
+ end
1797
+ # Sets the s7 member to value
1798
+ def s7=(value)
1799
+ self[:s7] = value
1800
+ end
1801
+ end
1802
+ # Maps the cl_half8 type of OpenCL
1803
+ class Half8 < FFI::Struct
1804
+ @size = FFI.find_type(:cl_half).size * 8
1805
+ @layout = FFI::StructLayout::new([ FFI::StructLayout::Field::new( "s0", FFI.find_type(:cl_half).size * 0, FFI.find_type(:cl_half) ), FFI::StructLayout::Field::new( "s1", FFI.find_type(:cl_half).size * 1, FFI.find_type(:cl_half) ), FFI::StructLayout::Field::new( "s2", FFI.find_type(:cl_half).size * 2, FFI.find_type(:cl_half) ), FFI::StructLayout::Field::new( "s3", FFI.find_type(:cl_half).size * 3, FFI.find_type(:cl_half) ), FFI::StructLayout::Field::new( "s4", FFI.find_type(:cl_half).size * 4, FFI.find_type(:cl_half) ), FFI::StructLayout::Field::new( "s5", FFI.find_type(:cl_half).size * 5, FFI.find_type(:cl_half) ), FFI::StructLayout::Field::new( "s6", FFI.find_type(:cl_half).size * 6, FFI.find_type(:cl_half) ), FFI::StructLayout::Field::new( "s7", FFI.find_type(:cl_half).size * 7, FFI.find_type(:cl_half) ) ], FFI.find_type(:cl_half).size * 8, FFI.find_type(:cl_half).size * 8 )
1806
+ # Creates a new Half8 with members set to 0 or to the user specified values
1807
+ def initialize( s0 = 0.0, s1 = 0.0, s2 = 0.0, s3 = 0.0, s4 = 0.0, s5 = 0.0, s6 = 0.0, s7 = 0.0 )
1808
+ super()
1809
+ self[:s0] = s0
1810
+ self[:s1] = s1
1811
+ self[:s2] = s2
1812
+ self[:s3] = s3
1813
+ self[:s4] = s4
1814
+ self[:s5] = s5
1815
+ self[:s6] = s6
1816
+ self[:s7] = s7
1817
+ end
1818
+ # Reads the s0 member
1819
+ def s0
1820
+ return self[:s0]
1821
+ end
1822
+ # Reads the s1 member
1823
+ def s1
1824
+ return self[:s1]
1825
+ end
1826
+ # Reads the s2 member
1827
+ def s2
1828
+ return self[:s2]
1829
+ end
1830
+ # Reads the s3 member
1831
+ def s3
1832
+ return self[:s3]
1833
+ end
1834
+ # Reads the s4 member
1835
+ def s4
1836
+ return self[:s4]
1837
+ end
1838
+ # Reads the s5 member
1839
+ def s5
1840
+ return self[:s5]
1841
+ end
1842
+ # Reads the s6 member
1843
+ def s6
1844
+ return self[:s6]
1845
+ end
1846
+ # Reads the s7 member
1847
+ def s7
1848
+ return self[:s7]
1849
+ end
1850
+ # Sets the s0 member to value
1851
+ def s0=(value)
1852
+ self[:s0] = value
1853
+ end
1854
+ # Sets the s1 member to value
1855
+ def s1=(value)
1856
+ self[:s1] = value
1857
+ end
1858
+ # Sets the s2 member to value
1859
+ def s2=(value)
1860
+ self[:s2] = value
1861
+ end
1862
+ # Sets the s3 member to value
1863
+ def s3=(value)
1864
+ self[:s3] = value
1865
+ end
1866
+ # Sets the s4 member to value
1867
+ def s4=(value)
1868
+ self[:s4] = value
1869
+ end
1870
+ # Sets the s5 member to value
1871
+ def s5=(value)
1872
+ self[:s5] = value
1873
+ end
1874
+ # Sets the s6 member to value
1875
+ def s6=(value)
1876
+ self[:s6] = value
1877
+ end
1878
+ # Sets the s7 member to value
1879
+ def s7=(value)
1880
+ self[:s7] = value
1881
+ end
1882
+ end
1883
+ # Maps the cl_char16 type of OpenCL
1884
+ class Char16 < FFI::Struct
1885
+ @size = FFI.find_type(:cl_char).size * 16
1886
+ @layout = FFI::StructLayout::new([ FFI::StructLayout::Field::new( "s0", FFI.find_type(:cl_char).size * 0, FFI.find_type(:cl_char) ), FFI::StructLayout::Field::new( "s1", FFI.find_type(:cl_char).size * 1, FFI.find_type(:cl_char) ), FFI::StructLayout::Field::new( "s2", FFI.find_type(:cl_char).size * 2, FFI.find_type(:cl_char) ), FFI::StructLayout::Field::new( "s3", FFI.find_type(:cl_char).size * 3, FFI.find_type(:cl_char) ), FFI::StructLayout::Field::new( "s4", FFI.find_type(:cl_char).size * 4, FFI.find_type(:cl_char) ), FFI::StructLayout::Field::new( "s5", FFI.find_type(:cl_char).size * 5, FFI.find_type(:cl_char) ), FFI::StructLayout::Field::new( "s6", FFI.find_type(:cl_char).size * 6, FFI.find_type(:cl_char) ), FFI::StructLayout::Field::new( "s7", FFI.find_type(:cl_char).size * 7, FFI.find_type(:cl_char) ), FFI::StructLayout::Field::new( "s8", FFI.find_type(:cl_char).size * 8, FFI.find_type(:cl_char) ), FFI::StructLayout::Field::new( "s9", FFI.find_type(:cl_char).size * 9, FFI.find_type(:cl_char) ), FFI::StructLayout::Field::new( "sa", FFI.find_type(:cl_char).size * 10, FFI.find_type(:cl_char) ), FFI::StructLayout::Field::new( "sb", FFI.find_type(:cl_char).size * 11, FFI.find_type(:cl_char) ), FFI::StructLayout::Field::new( "sc", FFI.find_type(:cl_char).size * 12, FFI.find_type(:cl_char) ), FFI::StructLayout::Field::new( "sd", FFI.find_type(:cl_char).size * 13, FFI.find_type(:cl_char) ), FFI::StructLayout::Field::new( "se", FFI.find_type(:cl_char).size * 14, FFI.find_type(:cl_char) ), FFI::StructLayout::Field::new( "sf", FFI.find_type(:cl_char).size * 15, FFI.find_type(:cl_char) ) ], FFI.find_type(:cl_char).size * 16, FFI.find_type(:cl_char).size * 16 )
1887
+ # Creates a new Char16 with members set to 0 or to the user specified values
1888
+ def initialize( s0 = 0, s1 = 0, s2 = 0, s3 = 0, s4 = 0, s5 = 0, s6 = 0, s7 = 0, s8 = 0, s9 = 0, sa = 0, sb = 0, sc = 0, sd = 0, se = 0, sf = 0 )
1889
+ super()
1890
+ self[:s0] = s0
1891
+ self[:s1] = s1
1892
+ self[:s2] = s2
1893
+ self[:s3] = s3
1894
+ self[:s4] = s4
1895
+ self[:s5] = s5
1896
+ self[:s6] = s6
1897
+ self[:s7] = s7
1898
+ self[:s8] = s8
1899
+ self[:s9] = s9
1900
+ self[:sa] = sa
1901
+ self[:sb] = sb
1902
+ self[:sc] = sc
1903
+ self[:sd] = sd
1904
+ self[:se] = se
1905
+ self[:sf] = sf
1906
+ end
1907
+ # Reads the s0 member
1908
+ def s0
1909
+ return self[:s0]
1910
+ end
1911
+ # Reads the s1 member
1912
+ def s1
1913
+ return self[:s1]
1914
+ end
1915
+ # Reads the s2 member
1916
+ def s2
1917
+ return self[:s2]
1918
+ end
1919
+ # Reads the s3 member
1920
+ def s3
1921
+ return self[:s3]
1922
+ end
1923
+ # Reads the s4 member
1924
+ def s4
1925
+ return self[:s4]
1926
+ end
1927
+ # Reads the s5 member
1928
+ def s5
1929
+ return self[:s5]
1930
+ end
1931
+ # Reads the s6 member
1932
+ def s6
1933
+ return self[:s6]
1934
+ end
1935
+ # Reads the s7 member
1936
+ def s7
1937
+ return self[:s7]
1938
+ end
1939
+ # Reads the s8 member
1940
+ def s8
1941
+ return self[:s8]
1942
+ end
1943
+ # Reads the s9 member
1944
+ def s9
1945
+ return self[:s9]
1946
+ end
1947
+ # Reads the sa member
1948
+ def sa
1949
+ return self[:sa]
1950
+ end
1951
+ # Reads the sb member
1952
+ def sb
1953
+ return self[:sb]
1954
+ end
1955
+ # Reads the sc member
1956
+ def sc
1957
+ return self[:sc]
1958
+ end
1959
+ # Reads the sd member
1960
+ def sd
1961
+ return self[:sd]
1962
+ end
1963
+ # Reads the se member
1964
+ def se
1965
+ return self[:se]
1966
+ end
1967
+ # Reads the sf member
1968
+ def sf
1969
+ return self[:sf]
1970
+ end
1971
+ # Sets the s0 member to value
1972
+ def s0=(value)
1973
+ self[:s0] = value
1974
+ end
1975
+ # Sets the s1 member to value
1976
+ def s1=(value)
1977
+ self[:s1] = value
1978
+ end
1979
+ # Sets the s2 member to value
1980
+ def s2=(value)
1981
+ self[:s2] = value
1982
+ end
1983
+ # Sets the s3 member to value
1984
+ def s3=(value)
1985
+ self[:s3] = value
1986
+ end
1987
+ # Sets the s4 member to value
1988
+ def s4=(value)
1989
+ self[:s4] = value
1990
+ end
1991
+ # Sets the s5 member to value
1992
+ def s5=(value)
1993
+ self[:s5] = value
1994
+ end
1995
+ # Sets the s6 member to value
1996
+ def s6=(value)
1997
+ self[:s6] = value
1998
+ end
1999
+ # Sets the s7 member to value
2000
+ def s7=(value)
2001
+ self[:s7] = value
2002
+ end
2003
+ # Sets the s8 member to value
2004
+ def s8=(value)
2005
+ self[:s8] = value
2006
+ end
2007
+ # Sets the s9 member to value
2008
+ def s9=(value)
2009
+ self[:s9] = value
2010
+ end
2011
+ # Sets the sa member to value
2012
+ def sa=(value)
2013
+ self[:sa] = value
2014
+ end
2015
+ # Sets the sb member to value
2016
+ def sb=(value)
2017
+ self[:sb] = value
2018
+ end
2019
+ # Sets the sc member to value
2020
+ def sc=(value)
2021
+ self[:sc] = value
2022
+ end
2023
+ # Sets the sd member to value
2024
+ def sd=(value)
2025
+ self[:sd] = value
2026
+ end
2027
+ # Sets the se member to value
2028
+ def se=(value)
2029
+ self[:se] = value
2030
+ end
2031
+ # Sets the sf member to value
2032
+ def sf=(value)
2033
+ self[:sf] = value
2034
+ end
2035
+ end
2036
+ # Maps the cl_uchar16 type of OpenCL
2037
+ class UChar16 < FFI::Struct
2038
+ @size = FFI.find_type(:cl_uchar).size * 16
2039
+ @layout = FFI::StructLayout::new([ FFI::StructLayout::Field::new( "s0", FFI.find_type(:cl_uchar).size * 0, FFI.find_type(:cl_uchar) ), FFI::StructLayout::Field::new( "s1", FFI.find_type(:cl_uchar).size * 1, FFI.find_type(:cl_uchar) ), FFI::StructLayout::Field::new( "s2", FFI.find_type(:cl_uchar).size * 2, FFI.find_type(:cl_uchar) ), FFI::StructLayout::Field::new( "s3", FFI.find_type(:cl_uchar).size * 3, FFI.find_type(:cl_uchar) ), FFI::StructLayout::Field::new( "s4", FFI.find_type(:cl_uchar).size * 4, FFI.find_type(:cl_uchar) ), FFI::StructLayout::Field::new( "s5", FFI.find_type(:cl_uchar).size * 5, FFI.find_type(:cl_uchar) ), FFI::StructLayout::Field::new( "s6", FFI.find_type(:cl_uchar).size * 6, FFI.find_type(:cl_uchar) ), FFI::StructLayout::Field::new( "s7", FFI.find_type(:cl_uchar).size * 7, FFI.find_type(:cl_uchar) ), FFI::StructLayout::Field::new( "s8", FFI.find_type(:cl_uchar).size * 8, FFI.find_type(:cl_uchar) ), FFI::StructLayout::Field::new( "s9", FFI.find_type(:cl_uchar).size * 9, FFI.find_type(:cl_uchar) ), FFI::StructLayout::Field::new( "sa", FFI.find_type(:cl_uchar).size * 10, FFI.find_type(:cl_uchar) ), FFI::StructLayout::Field::new( "sb", FFI.find_type(:cl_uchar).size * 11, FFI.find_type(:cl_uchar) ), FFI::StructLayout::Field::new( "sc", FFI.find_type(:cl_uchar).size * 12, FFI.find_type(:cl_uchar) ), FFI::StructLayout::Field::new( "sd", FFI.find_type(:cl_uchar).size * 13, FFI.find_type(:cl_uchar) ), FFI::StructLayout::Field::new( "se", FFI.find_type(:cl_uchar).size * 14, FFI.find_type(:cl_uchar) ), FFI::StructLayout::Field::new( "sf", FFI.find_type(:cl_uchar).size * 15, FFI.find_type(:cl_uchar) ) ], FFI.find_type(:cl_uchar).size * 16, FFI.find_type(:cl_uchar).size * 16 )
2040
+ # Creates a new UChar16 with members set to 0 or to the user specified values
2041
+ def initialize( s0 = 0, s1 = 0, s2 = 0, s3 = 0, s4 = 0, s5 = 0, s6 = 0, s7 = 0, s8 = 0, s9 = 0, sa = 0, sb = 0, sc = 0, sd = 0, se = 0, sf = 0 )
2042
+ super()
2043
+ self[:s0] = s0
2044
+ self[:s1] = s1
2045
+ self[:s2] = s2
2046
+ self[:s3] = s3
2047
+ self[:s4] = s4
2048
+ self[:s5] = s5
2049
+ self[:s6] = s6
2050
+ self[:s7] = s7
2051
+ self[:s8] = s8
2052
+ self[:s9] = s9
2053
+ self[:sa] = sa
2054
+ self[:sb] = sb
2055
+ self[:sc] = sc
2056
+ self[:sd] = sd
2057
+ self[:se] = se
2058
+ self[:sf] = sf
2059
+ end
2060
+ # Reads the s0 member
2061
+ def s0
2062
+ return self[:s0]
2063
+ end
2064
+ # Reads the s1 member
2065
+ def s1
2066
+ return self[:s1]
2067
+ end
2068
+ # Reads the s2 member
2069
+ def s2
2070
+ return self[:s2]
2071
+ end
2072
+ # Reads the s3 member
2073
+ def s3
2074
+ return self[:s3]
2075
+ end
2076
+ # Reads the s4 member
2077
+ def s4
2078
+ return self[:s4]
2079
+ end
2080
+ # Reads the s5 member
2081
+ def s5
2082
+ return self[:s5]
2083
+ end
2084
+ # Reads the s6 member
2085
+ def s6
2086
+ return self[:s6]
2087
+ end
2088
+ # Reads the s7 member
2089
+ def s7
2090
+ return self[:s7]
2091
+ end
2092
+ # Reads the s8 member
2093
+ def s8
2094
+ return self[:s8]
2095
+ end
2096
+ # Reads the s9 member
2097
+ def s9
2098
+ return self[:s9]
2099
+ end
2100
+ # Reads the sa member
2101
+ def sa
2102
+ return self[:sa]
2103
+ end
2104
+ # Reads the sb member
2105
+ def sb
2106
+ return self[:sb]
2107
+ end
2108
+ # Reads the sc member
2109
+ def sc
2110
+ return self[:sc]
2111
+ end
2112
+ # Reads the sd member
2113
+ def sd
2114
+ return self[:sd]
2115
+ end
2116
+ # Reads the se member
2117
+ def se
2118
+ return self[:se]
2119
+ end
2120
+ # Reads the sf member
2121
+ def sf
2122
+ return self[:sf]
2123
+ end
2124
+ # Sets the s0 member to value
2125
+ def s0=(value)
2126
+ self[:s0] = value
2127
+ end
2128
+ # Sets the s1 member to value
2129
+ def s1=(value)
2130
+ self[:s1] = value
2131
+ end
2132
+ # Sets the s2 member to value
2133
+ def s2=(value)
2134
+ self[:s2] = value
2135
+ end
2136
+ # Sets the s3 member to value
2137
+ def s3=(value)
2138
+ self[:s3] = value
2139
+ end
2140
+ # Sets the s4 member to value
2141
+ def s4=(value)
2142
+ self[:s4] = value
2143
+ end
2144
+ # Sets the s5 member to value
2145
+ def s5=(value)
2146
+ self[:s5] = value
2147
+ end
2148
+ # Sets the s6 member to value
2149
+ def s6=(value)
2150
+ self[:s6] = value
2151
+ end
2152
+ # Sets the s7 member to value
2153
+ def s7=(value)
2154
+ self[:s7] = value
2155
+ end
2156
+ # Sets the s8 member to value
2157
+ def s8=(value)
2158
+ self[:s8] = value
2159
+ end
2160
+ # Sets the s9 member to value
2161
+ def s9=(value)
2162
+ self[:s9] = value
2163
+ end
2164
+ # Sets the sa member to value
2165
+ def sa=(value)
2166
+ self[:sa] = value
2167
+ end
2168
+ # Sets the sb member to value
2169
+ def sb=(value)
2170
+ self[:sb] = value
2171
+ end
2172
+ # Sets the sc member to value
2173
+ def sc=(value)
2174
+ self[:sc] = value
2175
+ end
2176
+ # Sets the sd member to value
2177
+ def sd=(value)
2178
+ self[:sd] = value
2179
+ end
2180
+ # Sets the se member to value
2181
+ def se=(value)
2182
+ self[:se] = value
2183
+ end
2184
+ # Sets the sf member to value
2185
+ def sf=(value)
2186
+ self[:sf] = value
2187
+ end
2188
+ end
2189
+ # Maps the cl_short16 type of OpenCL
2190
+ class Short16 < FFI::Struct
2191
+ @size = FFI.find_type(:cl_short).size * 16
2192
+ @layout = FFI::StructLayout::new([ FFI::StructLayout::Field::new( "s0", FFI.find_type(:cl_short).size * 0, FFI.find_type(:cl_short) ), FFI::StructLayout::Field::new( "s1", FFI.find_type(:cl_short).size * 1, FFI.find_type(:cl_short) ), FFI::StructLayout::Field::new( "s2", FFI.find_type(:cl_short).size * 2, FFI.find_type(:cl_short) ), FFI::StructLayout::Field::new( "s3", FFI.find_type(:cl_short).size * 3, FFI.find_type(:cl_short) ), FFI::StructLayout::Field::new( "s4", FFI.find_type(:cl_short).size * 4, FFI.find_type(:cl_short) ), FFI::StructLayout::Field::new( "s5", FFI.find_type(:cl_short).size * 5, FFI.find_type(:cl_short) ), FFI::StructLayout::Field::new( "s6", FFI.find_type(:cl_short).size * 6, FFI.find_type(:cl_short) ), FFI::StructLayout::Field::new( "s7", FFI.find_type(:cl_short).size * 7, FFI.find_type(:cl_short) ), FFI::StructLayout::Field::new( "s8", FFI.find_type(:cl_short).size * 8, FFI.find_type(:cl_short) ), FFI::StructLayout::Field::new( "s9", FFI.find_type(:cl_short).size * 9, FFI.find_type(:cl_short) ), FFI::StructLayout::Field::new( "sa", FFI.find_type(:cl_short).size * 10, FFI.find_type(:cl_short) ), FFI::StructLayout::Field::new( "sb", FFI.find_type(:cl_short).size * 11, FFI.find_type(:cl_short) ), FFI::StructLayout::Field::new( "sc", FFI.find_type(:cl_short).size * 12, FFI.find_type(:cl_short) ), FFI::StructLayout::Field::new( "sd", FFI.find_type(:cl_short).size * 13, FFI.find_type(:cl_short) ), FFI::StructLayout::Field::new( "se", FFI.find_type(:cl_short).size * 14, FFI.find_type(:cl_short) ), FFI::StructLayout::Field::new( "sf", FFI.find_type(:cl_short).size * 15, FFI.find_type(:cl_short) ) ], FFI.find_type(:cl_short).size * 16, FFI.find_type(:cl_short).size * 16 )
2193
+ # Creates a new Short16 with members set to 0 or to the user specified values
2194
+ def initialize( s0 = 0, s1 = 0, s2 = 0, s3 = 0, s4 = 0, s5 = 0, s6 = 0, s7 = 0, s8 = 0, s9 = 0, sa = 0, sb = 0, sc = 0, sd = 0, se = 0, sf = 0 )
2195
+ super()
2196
+ self[:s0] = s0
2197
+ self[:s1] = s1
2198
+ self[:s2] = s2
2199
+ self[:s3] = s3
2200
+ self[:s4] = s4
2201
+ self[:s5] = s5
2202
+ self[:s6] = s6
2203
+ self[:s7] = s7
2204
+ self[:s8] = s8
2205
+ self[:s9] = s9
2206
+ self[:sa] = sa
2207
+ self[:sb] = sb
2208
+ self[:sc] = sc
2209
+ self[:sd] = sd
2210
+ self[:se] = se
2211
+ self[:sf] = sf
2212
+ end
2213
+ # Reads the s0 member
2214
+ def s0
2215
+ return self[:s0]
2216
+ end
2217
+ # Reads the s1 member
2218
+ def s1
2219
+ return self[:s1]
2220
+ end
2221
+ # Reads the s2 member
2222
+ def s2
2223
+ return self[:s2]
2224
+ end
2225
+ # Reads the s3 member
2226
+ def s3
2227
+ return self[:s3]
2228
+ end
2229
+ # Reads the s4 member
2230
+ def s4
2231
+ return self[:s4]
2232
+ end
2233
+ # Reads the s5 member
2234
+ def s5
2235
+ return self[:s5]
2236
+ end
2237
+ # Reads the s6 member
2238
+ def s6
2239
+ return self[:s6]
2240
+ end
2241
+ # Reads the s7 member
2242
+ def s7
2243
+ return self[:s7]
2244
+ end
2245
+ # Reads the s8 member
2246
+ def s8
2247
+ return self[:s8]
2248
+ end
2249
+ # Reads the s9 member
2250
+ def s9
2251
+ return self[:s9]
2252
+ end
2253
+ # Reads the sa member
2254
+ def sa
2255
+ return self[:sa]
2256
+ end
2257
+ # Reads the sb member
2258
+ def sb
2259
+ return self[:sb]
2260
+ end
2261
+ # Reads the sc member
2262
+ def sc
2263
+ return self[:sc]
2264
+ end
2265
+ # Reads the sd member
2266
+ def sd
2267
+ return self[:sd]
2268
+ end
2269
+ # Reads the se member
2270
+ def se
2271
+ return self[:se]
2272
+ end
2273
+ # Reads the sf member
2274
+ def sf
2275
+ return self[:sf]
2276
+ end
2277
+ # Sets the s0 member to value
2278
+ def s0=(value)
2279
+ self[:s0] = value
2280
+ end
2281
+ # Sets the s1 member to value
2282
+ def s1=(value)
2283
+ self[:s1] = value
2284
+ end
2285
+ # Sets the s2 member to value
2286
+ def s2=(value)
2287
+ self[:s2] = value
2288
+ end
2289
+ # Sets the s3 member to value
2290
+ def s3=(value)
2291
+ self[:s3] = value
2292
+ end
2293
+ # Sets the s4 member to value
2294
+ def s4=(value)
2295
+ self[:s4] = value
2296
+ end
2297
+ # Sets the s5 member to value
2298
+ def s5=(value)
2299
+ self[:s5] = value
2300
+ end
2301
+ # Sets the s6 member to value
2302
+ def s6=(value)
2303
+ self[:s6] = value
2304
+ end
2305
+ # Sets the s7 member to value
2306
+ def s7=(value)
2307
+ self[:s7] = value
2308
+ end
2309
+ # Sets the s8 member to value
2310
+ def s8=(value)
2311
+ self[:s8] = value
2312
+ end
2313
+ # Sets the s9 member to value
2314
+ def s9=(value)
2315
+ self[:s9] = value
2316
+ end
2317
+ # Sets the sa member to value
2318
+ def sa=(value)
2319
+ self[:sa] = value
2320
+ end
2321
+ # Sets the sb member to value
2322
+ def sb=(value)
2323
+ self[:sb] = value
2324
+ end
2325
+ # Sets the sc member to value
2326
+ def sc=(value)
2327
+ self[:sc] = value
2328
+ end
2329
+ # Sets the sd member to value
2330
+ def sd=(value)
2331
+ self[:sd] = value
2332
+ end
2333
+ # Sets the se member to value
2334
+ def se=(value)
2335
+ self[:se] = value
2336
+ end
2337
+ # Sets the sf member to value
2338
+ def sf=(value)
2339
+ self[:sf] = value
2340
+ end
2341
+ end
2342
+ # Maps the cl_ushort16 type of OpenCL
2343
+ class UShort16 < FFI::Struct
2344
+ @size = FFI.find_type(:cl_ushort).size * 16
2345
+ @layout = FFI::StructLayout::new([ FFI::StructLayout::Field::new( "s0", FFI.find_type(:cl_ushort).size * 0, FFI.find_type(:cl_ushort) ), FFI::StructLayout::Field::new( "s1", FFI.find_type(:cl_ushort).size * 1, FFI.find_type(:cl_ushort) ), FFI::StructLayout::Field::new( "s2", FFI.find_type(:cl_ushort).size * 2, FFI.find_type(:cl_ushort) ), FFI::StructLayout::Field::new( "s3", FFI.find_type(:cl_ushort).size * 3, FFI.find_type(:cl_ushort) ), FFI::StructLayout::Field::new( "s4", FFI.find_type(:cl_ushort).size * 4, FFI.find_type(:cl_ushort) ), FFI::StructLayout::Field::new( "s5", FFI.find_type(:cl_ushort).size * 5, FFI.find_type(:cl_ushort) ), FFI::StructLayout::Field::new( "s6", FFI.find_type(:cl_ushort).size * 6, FFI.find_type(:cl_ushort) ), FFI::StructLayout::Field::new( "s7", FFI.find_type(:cl_ushort).size * 7, FFI.find_type(:cl_ushort) ), FFI::StructLayout::Field::new( "s8", FFI.find_type(:cl_ushort).size * 8, FFI.find_type(:cl_ushort) ), FFI::StructLayout::Field::new( "s9", FFI.find_type(:cl_ushort).size * 9, FFI.find_type(:cl_ushort) ), FFI::StructLayout::Field::new( "sa", FFI.find_type(:cl_ushort).size * 10, FFI.find_type(:cl_ushort) ), FFI::StructLayout::Field::new( "sb", FFI.find_type(:cl_ushort).size * 11, FFI.find_type(:cl_ushort) ), FFI::StructLayout::Field::new( "sc", FFI.find_type(:cl_ushort).size * 12, FFI.find_type(:cl_ushort) ), FFI::StructLayout::Field::new( "sd", FFI.find_type(:cl_ushort).size * 13, FFI.find_type(:cl_ushort) ), FFI::StructLayout::Field::new( "se", FFI.find_type(:cl_ushort).size * 14, FFI.find_type(:cl_ushort) ), FFI::StructLayout::Field::new( "sf", FFI.find_type(:cl_ushort).size * 15, FFI.find_type(:cl_ushort) ) ], FFI.find_type(:cl_ushort).size * 16, FFI.find_type(:cl_ushort).size * 16 )
2346
+ # Creates a new UShort16 with members set to 0 or to the user specified values
2347
+ def initialize( s0 = 0, s1 = 0, s2 = 0, s3 = 0, s4 = 0, s5 = 0, s6 = 0, s7 = 0, s8 = 0, s9 = 0, sa = 0, sb = 0, sc = 0, sd = 0, se = 0, sf = 0 )
2348
+ super()
2349
+ self[:s0] = s0
2350
+ self[:s1] = s1
2351
+ self[:s2] = s2
2352
+ self[:s3] = s3
2353
+ self[:s4] = s4
2354
+ self[:s5] = s5
2355
+ self[:s6] = s6
2356
+ self[:s7] = s7
2357
+ self[:s8] = s8
2358
+ self[:s9] = s9
2359
+ self[:sa] = sa
2360
+ self[:sb] = sb
2361
+ self[:sc] = sc
2362
+ self[:sd] = sd
2363
+ self[:se] = se
2364
+ self[:sf] = sf
2365
+ end
2366
+ # Reads the s0 member
2367
+ def s0
2368
+ return self[:s0]
2369
+ end
2370
+ # Reads the s1 member
2371
+ def s1
2372
+ return self[:s1]
2373
+ end
2374
+ # Reads the s2 member
2375
+ def s2
2376
+ return self[:s2]
2377
+ end
2378
+ # Reads the s3 member
2379
+ def s3
2380
+ return self[:s3]
2381
+ end
2382
+ # Reads the s4 member
2383
+ def s4
2384
+ return self[:s4]
2385
+ end
2386
+ # Reads the s5 member
2387
+ def s5
2388
+ return self[:s5]
2389
+ end
2390
+ # Reads the s6 member
2391
+ def s6
2392
+ return self[:s6]
2393
+ end
2394
+ # Reads the s7 member
2395
+ def s7
2396
+ return self[:s7]
2397
+ end
2398
+ # Reads the s8 member
2399
+ def s8
2400
+ return self[:s8]
2401
+ end
2402
+ # Reads the s9 member
2403
+ def s9
2404
+ return self[:s9]
2405
+ end
2406
+ # Reads the sa member
2407
+ def sa
2408
+ return self[:sa]
2409
+ end
2410
+ # Reads the sb member
2411
+ def sb
2412
+ return self[:sb]
2413
+ end
2414
+ # Reads the sc member
2415
+ def sc
2416
+ return self[:sc]
2417
+ end
2418
+ # Reads the sd member
2419
+ def sd
2420
+ return self[:sd]
2421
+ end
2422
+ # Reads the se member
2423
+ def se
2424
+ return self[:se]
2425
+ end
2426
+ # Reads the sf member
2427
+ def sf
2428
+ return self[:sf]
2429
+ end
2430
+ # Sets the s0 member to value
2431
+ def s0=(value)
2432
+ self[:s0] = value
2433
+ end
2434
+ # Sets the s1 member to value
2435
+ def s1=(value)
2436
+ self[:s1] = value
2437
+ end
2438
+ # Sets the s2 member to value
2439
+ def s2=(value)
2440
+ self[:s2] = value
2441
+ end
2442
+ # Sets the s3 member to value
2443
+ def s3=(value)
2444
+ self[:s3] = value
2445
+ end
2446
+ # Sets the s4 member to value
2447
+ def s4=(value)
2448
+ self[:s4] = value
2449
+ end
2450
+ # Sets the s5 member to value
2451
+ def s5=(value)
2452
+ self[:s5] = value
2453
+ end
2454
+ # Sets the s6 member to value
2455
+ def s6=(value)
2456
+ self[:s6] = value
2457
+ end
2458
+ # Sets the s7 member to value
2459
+ def s7=(value)
2460
+ self[:s7] = value
2461
+ end
2462
+ # Sets the s8 member to value
2463
+ def s8=(value)
2464
+ self[:s8] = value
2465
+ end
2466
+ # Sets the s9 member to value
2467
+ def s9=(value)
2468
+ self[:s9] = value
2469
+ end
2470
+ # Sets the sa member to value
2471
+ def sa=(value)
2472
+ self[:sa] = value
2473
+ end
2474
+ # Sets the sb member to value
2475
+ def sb=(value)
2476
+ self[:sb] = value
2477
+ end
2478
+ # Sets the sc member to value
2479
+ def sc=(value)
2480
+ self[:sc] = value
2481
+ end
2482
+ # Sets the sd member to value
2483
+ def sd=(value)
2484
+ self[:sd] = value
2485
+ end
2486
+ # Sets the se member to value
2487
+ def se=(value)
2488
+ self[:se] = value
2489
+ end
2490
+ # Sets the sf member to value
2491
+ def sf=(value)
2492
+ self[:sf] = value
2493
+ end
2494
+ end
2495
+ # Maps the cl_int16 type of OpenCL
2496
+ class Int16 < FFI::Struct
2497
+ @size = FFI.find_type(:cl_int).size * 16
2498
+ @layout = FFI::StructLayout::new([ FFI::StructLayout::Field::new( "s0", FFI.find_type(:cl_int).size * 0, FFI.find_type(:cl_int) ), FFI::StructLayout::Field::new( "s1", FFI.find_type(:cl_int).size * 1, FFI.find_type(:cl_int) ), FFI::StructLayout::Field::new( "s2", FFI.find_type(:cl_int).size * 2, FFI.find_type(:cl_int) ), FFI::StructLayout::Field::new( "s3", FFI.find_type(:cl_int).size * 3, FFI.find_type(:cl_int) ), FFI::StructLayout::Field::new( "s4", FFI.find_type(:cl_int).size * 4, FFI.find_type(:cl_int) ), FFI::StructLayout::Field::new( "s5", FFI.find_type(:cl_int).size * 5, FFI.find_type(:cl_int) ), FFI::StructLayout::Field::new( "s6", FFI.find_type(:cl_int).size * 6, FFI.find_type(:cl_int) ), FFI::StructLayout::Field::new( "s7", FFI.find_type(:cl_int).size * 7, FFI.find_type(:cl_int) ), FFI::StructLayout::Field::new( "s8", FFI.find_type(:cl_int).size * 8, FFI.find_type(:cl_int) ), FFI::StructLayout::Field::new( "s9", FFI.find_type(:cl_int).size * 9, FFI.find_type(:cl_int) ), FFI::StructLayout::Field::new( "sa", FFI.find_type(:cl_int).size * 10, FFI.find_type(:cl_int) ), FFI::StructLayout::Field::new( "sb", FFI.find_type(:cl_int).size * 11, FFI.find_type(:cl_int) ), FFI::StructLayout::Field::new( "sc", FFI.find_type(:cl_int).size * 12, FFI.find_type(:cl_int) ), FFI::StructLayout::Field::new( "sd", FFI.find_type(:cl_int).size * 13, FFI.find_type(:cl_int) ), FFI::StructLayout::Field::new( "se", FFI.find_type(:cl_int).size * 14, FFI.find_type(:cl_int) ), FFI::StructLayout::Field::new( "sf", FFI.find_type(:cl_int).size * 15, FFI.find_type(:cl_int) ) ], FFI.find_type(:cl_int).size * 16, FFI.find_type(:cl_int).size * 16 )
2499
+ # Creates a new Int16 with members set to 0 or to the user specified values
2500
+ def initialize( s0 = 0, s1 = 0, s2 = 0, s3 = 0, s4 = 0, s5 = 0, s6 = 0, s7 = 0, s8 = 0, s9 = 0, sa = 0, sb = 0, sc = 0, sd = 0, se = 0, sf = 0 )
2501
+ super()
2502
+ self[:s0] = s0
2503
+ self[:s1] = s1
2504
+ self[:s2] = s2
2505
+ self[:s3] = s3
2506
+ self[:s4] = s4
2507
+ self[:s5] = s5
2508
+ self[:s6] = s6
2509
+ self[:s7] = s7
2510
+ self[:s8] = s8
2511
+ self[:s9] = s9
2512
+ self[:sa] = sa
2513
+ self[:sb] = sb
2514
+ self[:sc] = sc
2515
+ self[:sd] = sd
2516
+ self[:se] = se
2517
+ self[:sf] = sf
2518
+ end
2519
+ # Reads the s0 member
2520
+ def s0
2521
+ return self[:s0]
2522
+ end
2523
+ # Reads the s1 member
2524
+ def s1
2525
+ return self[:s1]
2526
+ end
2527
+ # Reads the s2 member
2528
+ def s2
2529
+ return self[:s2]
2530
+ end
2531
+ # Reads the s3 member
2532
+ def s3
2533
+ return self[:s3]
2534
+ end
2535
+ # Reads the s4 member
2536
+ def s4
2537
+ return self[:s4]
2538
+ end
2539
+ # Reads the s5 member
2540
+ def s5
2541
+ return self[:s5]
2542
+ end
2543
+ # Reads the s6 member
2544
+ def s6
2545
+ return self[:s6]
2546
+ end
2547
+ # Reads the s7 member
2548
+ def s7
2549
+ return self[:s7]
2550
+ end
2551
+ # Reads the s8 member
2552
+ def s8
2553
+ return self[:s8]
2554
+ end
2555
+ # Reads the s9 member
2556
+ def s9
2557
+ return self[:s9]
2558
+ end
2559
+ # Reads the sa member
2560
+ def sa
2561
+ return self[:sa]
2562
+ end
2563
+ # Reads the sb member
2564
+ def sb
2565
+ return self[:sb]
2566
+ end
2567
+ # Reads the sc member
2568
+ def sc
2569
+ return self[:sc]
2570
+ end
2571
+ # Reads the sd member
2572
+ def sd
2573
+ return self[:sd]
2574
+ end
2575
+ # Reads the se member
2576
+ def se
2577
+ return self[:se]
2578
+ end
2579
+ # Reads the sf member
2580
+ def sf
2581
+ return self[:sf]
2582
+ end
2583
+ # Sets the s0 member to value
2584
+ def s0=(value)
2585
+ self[:s0] = value
2586
+ end
2587
+ # Sets the s1 member to value
2588
+ def s1=(value)
2589
+ self[:s1] = value
2590
+ end
2591
+ # Sets the s2 member to value
2592
+ def s2=(value)
2593
+ self[:s2] = value
2594
+ end
2595
+ # Sets the s3 member to value
2596
+ def s3=(value)
2597
+ self[:s3] = value
2598
+ end
2599
+ # Sets the s4 member to value
2600
+ def s4=(value)
2601
+ self[:s4] = value
2602
+ end
2603
+ # Sets the s5 member to value
2604
+ def s5=(value)
2605
+ self[:s5] = value
2606
+ end
2607
+ # Sets the s6 member to value
2608
+ def s6=(value)
2609
+ self[:s6] = value
2610
+ end
2611
+ # Sets the s7 member to value
2612
+ def s7=(value)
2613
+ self[:s7] = value
2614
+ end
2615
+ # Sets the s8 member to value
2616
+ def s8=(value)
2617
+ self[:s8] = value
2618
+ end
2619
+ # Sets the s9 member to value
2620
+ def s9=(value)
2621
+ self[:s9] = value
2622
+ end
2623
+ # Sets the sa member to value
2624
+ def sa=(value)
2625
+ self[:sa] = value
2626
+ end
2627
+ # Sets the sb member to value
2628
+ def sb=(value)
2629
+ self[:sb] = value
2630
+ end
2631
+ # Sets the sc member to value
2632
+ def sc=(value)
2633
+ self[:sc] = value
2634
+ end
2635
+ # Sets the sd member to value
2636
+ def sd=(value)
2637
+ self[:sd] = value
2638
+ end
2639
+ # Sets the se member to value
2640
+ def se=(value)
2641
+ self[:se] = value
2642
+ end
2643
+ # Sets the sf member to value
2644
+ def sf=(value)
2645
+ self[:sf] = value
2646
+ end
2647
+ end
2648
+ # Maps the cl_uint16 type of OpenCL
2649
+ class UInt16 < FFI::Struct
2650
+ @size = FFI.find_type(:cl_uint).size * 16
2651
+ @layout = FFI::StructLayout::new([ FFI::StructLayout::Field::new( "s0", FFI.find_type(:cl_uint).size * 0, FFI.find_type(:cl_uint) ), FFI::StructLayout::Field::new( "s1", FFI.find_type(:cl_uint).size * 1, FFI.find_type(:cl_uint) ), FFI::StructLayout::Field::new( "s2", FFI.find_type(:cl_uint).size * 2, FFI.find_type(:cl_uint) ), FFI::StructLayout::Field::new( "s3", FFI.find_type(:cl_uint).size * 3, FFI.find_type(:cl_uint) ), FFI::StructLayout::Field::new( "s4", FFI.find_type(:cl_uint).size * 4, FFI.find_type(:cl_uint) ), FFI::StructLayout::Field::new( "s5", FFI.find_type(:cl_uint).size * 5, FFI.find_type(:cl_uint) ), FFI::StructLayout::Field::new( "s6", FFI.find_type(:cl_uint).size * 6, FFI.find_type(:cl_uint) ), FFI::StructLayout::Field::new( "s7", FFI.find_type(:cl_uint).size * 7, FFI.find_type(:cl_uint) ), FFI::StructLayout::Field::new( "s8", FFI.find_type(:cl_uint).size * 8, FFI.find_type(:cl_uint) ), FFI::StructLayout::Field::new( "s9", FFI.find_type(:cl_uint).size * 9, FFI.find_type(:cl_uint) ), FFI::StructLayout::Field::new( "sa", FFI.find_type(:cl_uint).size * 10, FFI.find_type(:cl_uint) ), FFI::StructLayout::Field::new( "sb", FFI.find_type(:cl_uint).size * 11, FFI.find_type(:cl_uint) ), FFI::StructLayout::Field::new( "sc", FFI.find_type(:cl_uint).size * 12, FFI.find_type(:cl_uint) ), FFI::StructLayout::Field::new( "sd", FFI.find_type(:cl_uint).size * 13, FFI.find_type(:cl_uint) ), FFI::StructLayout::Field::new( "se", FFI.find_type(:cl_uint).size * 14, FFI.find_type(:cl_uint) ), FFI::StructLayout::Field::new( "sf", FFI.find_type(:cl_uint).size * 15, FFI.find_type(:cl_uint) ) ], FFI.find_type(:cl_uint).size * 16, FFI.find_type(:cl_uint).size * 16 )
2652
+ # Creates a new UInt16 with members set to 0 or to the user specified values
2653
+ def initialize( s0 = 0, s1 = 0, s2 = 0, s3 = 0, s4 = 0, s5 = 0, s6 = 0, s7 = 0, s8 = 0, s9 = 0, sa = 0, sb = 0, sc = 0, sd = 0, se = 0, sf = 0 )
2654
+ super()
2655
+ self[:s0] = s0
2656
+ self[:s1] = s1
2657
+ self[:s2] = s2
2658
+ self[:s3] = s3
2659
+ self[:s4] = s4
2660
+ self[:s5] = s5
2661
+ self[:s6] = s6
2662
+ self[:s7] = s7
2663
+ self[:s8] = s8
2664
+ self[:s9] = s9
2665
+ self[:sa] = sa
2666
+ self[:sb] = sb
2667
+ self[:sc] = sc
2668
+ self[:sd] = sd
2669
+ self[:se] = se
2670
+ self[:sf] = sf
2671
+ end
2672
+ # Reads the s0 member
2673
+ def s0
2674
+ return self[:s0]
2675
+ end
2676
+ # Reads the s1 member
2677
+ def s1
2678
+ return self[:s1]
2679
+ end
2680
+ # Reads the s2 member
2681
+ def s2
2682
+ return self[:s2]
2683
+ end
2684
+ # Reads the s3 member
2685
+ def s3
2686
+ return self[:s3]
2687
+ end
2688
+ # Reads the s4 member
2689
+ def s4
2690
+ return self[:s4]
2691
+ end
2692
+ # Reads the s5 member
2693
+ def s5
2694
+ return self[:s5]
2695
+ end
2696
+ # Reads the s6 member
2697
+ def s6
2698
+ return self[:s6]
2699
+ end
2700
+ # Reads the s7 member
2701
+ def s7
2702
+ return self[:s7]
2703
+ end
2704
+ # Reads the s8 member
2705
+ def s8
2706
+ return self[:s8]
2707
+ end
2708
+ # Reads the s9 member
2709
+ def s9
2710
+ return self[:s9]
2711
+ end
2712
+ # Reads the sa member
2713
+ def sa
2714
+ return self[:sa]
2715
+ end
2716
+ # Reads the sb member
2717
+ def sb
2718
+ return self[:sb]
2719
+ end
2720
+ # Reads the sc member
2721
+ def sc
2722
+ return self[:sc]
2723
+ end
2724
+ # Reads the sd member
2725
+ def sd
2726
+ return self[:sd]
2727
+ end
2728
+ # Reads the se member
2729
+ def se
2730
+ return self[:se]
2731
+ end
2732
+ # Reads the sf member
2733
+ def sf
2734
+ return self[:sf]
2735
+ end
2736
+ # Sets the s0 member to value
2737
+ def s0=(value)
2738
+ self[:s0] = value
2739
+ end
2740
+ # Sets the s1 member to value
2741
+ def s1=(value)
2742
+ self[:s1] = value
2743
+ end
2744
+ # Sets the s2 member to value
2745
+ def s2=(value)
2746
+ self[:s2] = value
2747
+ end
2748
+ # Sets the s3 member to value
2749
+ def s3=(value)
2750
+ self[:s3] = value
2751
+ end
2752
+ # Sets the s4 member to value
2753
+ def s4=(value)
2754
+ self[:s4] = value
2755
+ end
2756
+ # Sets the s5 member to value
2757
+ def s5=(value)
2758
+ self[:s5] = value
2759
+ end
2760
+ # Sets the s6 member to value
2761
+ def s6=(value)
2762
+ self[:s6] = value
2763
+ end
2764
+ # Sets the s7 member to value
2765
+ def s7=(value)
2766
+ self[:s7] = value
2767
+ end
2768
+ # Sets the s8 member to value
2769
+ def s8=(value)
2770
+ self[:s8] = value
2771
+ end
2772
+ # Sets the s9 member to value
2773
+ def s9=(value)
2774
+ self[:s9] = value
2775
+ end
2776
+ # Sets the sa member to value
2777
+ def sa=(value)
2778
+ self[:sa] = value
2779
+ end
2780
+ # Sets the sb member to value
2781
+ def sb=(value)
2782
+ self[:sb] = value
2783
+ end
2784
+ # Sets the sc member to value
2785
+ def sc=(value)
2786
+ self[:sc] = value
2787
+ end
2788
+ # Sets the sd member to value
2789
+ def sd=(value)
2790
+ self[:sd] = value
2791
+ end
2792
+ # Sets the se member to value
2793
+ def se=(value)
2794
+ self[:se] = value
2795
+ end
2796
+ # Sets the sf member to value
2797
+ def sf=(value)
2798
+ self[:sf] = value
2799
+ end
2800
+ end
2801
+ # Maps the cl_long16 type of OpenCL
2802
+ class Long16 < FFI::Struct
2803
+ @size = FFI.find_type(:cl_long).size * 16
2804
+ @layout = FFI::StructLayout::new([ FFI::StructLayout::Field::new( "s0", FFI.find_type(:cl_long).size * 0, FFI.find_type(:cl_long) ), FFI::StructLayout::Field::new( "s1", FFI.find_type(:cl_long).size * 1, FFI.find_type(:cl_long) ), FFI::StructLayout::Field::new( "s2", FFI.find_type(:cl_long).size * 2, FFI.find_type(:cl_long) ), FFI::StructLayout::Field::new( "s3", FFI.find_type(:cl_long).size * 3, FFI.find_type(:cl_long) ), FFI::StructLayout::Field::new( "s4", FFI.find_type(:cl_long).size * 4, FFI.find_type(:cl_long) ), FFI::StructLayout::Field::new( "s5", FFI.find_type(:cl_long).size * 5, FFI.find_type(:cl_long) ), FFI::StructLayout::Field::new( "s6", FFI.find_type(:cl_long).size * 6, FFI.find_type(:cl_long) ), FFI::StructLayout::Field::new( "s7", FFI.find_type(:cl_long).size * 7, FFI.find_type(:cl_long) ), FFI::StructLayout::Field::new( "s8", FFI.find_type(:cl_long).size * 8, FFI.find_type(:cl_long) ), FFI::StructLayout::Field::new( "s9", FFI.find_type(:cl_long).size * 9, FFI.find_type(:cl_long) ), FFI::StructLayout::Field::new( "sa", FFI.find_type(:cl_long).size * 10, FFI.find_type(:cl_long) ), FFI::StructLayout::Field::new( "sb", FFI.find_type(:cl_long).size * 11, FFI.find_type(:cl_long) ), FFI::StructLayout::Field::new( "sc", FFI.find_type(:cl_long).size * 12, FFI.find_type(:cl_long) ), FFI::StructLayout::Field::new( "sd", FFI.find_type(:cl_long).size * 13, FFI.find_type(:cl_long) ), FFI::StructLayout::Field::new( "se", FFI.find_type(:cl_long).size * 14, FFI.find_type(:cl_long) ), FFI::StructLayout::Field::new( "sf", FFI.find_type(:cl_long).size * 15, FFI.find_type(:cl_long) ) ], FFI.find_type(:cl_long).size * 16, FFI.find_type(:cl_long).size * 16 )
2805
+ # Creates a new Long16 with members set to 0 or to the user specified values
2806
+ def initialize( s0 = 0, s1 = 0, s2 = 0, s3 = 0, s4 = 0, s5 = 0, s6 = 0, s7 = 0, s8 = 0, s9 = 0, sa = 0, sb = 0, sc = 0, sd = 0, se = 0, sf = 0 )
2807
+ super()
2808
+ self[:s0] = s0
2809
+ self[:s1] = s1
2810
+ self[:s2] = s2
2811
+ self[:s3] = s3
2812
+ self[:s4] = s4
2813
+ self[:s5] = s5
2814
+ self[:s6] = s6
2815
+ self[:s7] = s7
2816
+ self[:s8] = s8
2817
+ self[:s9] = s9
2818
+ self[:sa] = sa
2819
+ self[:sb] = sb
2820
+ self[:sc] = sc
2821
+ self[:sd] = sd
2822
+ self[:se] = se
2823
+ self[:sf] = sf
2824
+ end
2825
+ # Reads the s0 member
2826
+ def s0
2827
+ return self[:s0]
2828
+ end
2829
+ # Reads the s1 member
2830
+ def s1
2831
+ return self[:s1]
2832
+ end
2833
+ # Reads the s2 member
2834
+ def s2
2835
+ return self[:s2]
2836
+ end
2837
+ # Reads the s3 member
2838
+ def s3
2839
+ return self[:s3]
2840
+ end
2841
+ # Reads the s4 member
2842
+ def s4
2843
+ return self[:s4]
2844
+ end
2845
+ # Reads the s5 member
2846
+ def s5
2847
+ return self[:s5]
2848
+ end
2849
+ # Reads the s6 member
2850
+ def s6
2851
+ return self[:s6]
2852
+ end
2853
+ # Reads the s7 member
2854
+ def s7
2855
+ return self[:s7]
2856
+ end
2857
+ # Reads the s8 member
2858
+ def s8
2859
+ return self[:s8]
2860
+ end
2861
+ # Reads the s9 member
2862
+ def s9
2863
+ return self[:s9]
2864
+ end
2865
+ # Reads the sa member
2866
+ def sa
2867
+ return self[:sa]
2868
+ end
2869
+ # Reads the sb member
2870
+ def sb
2871
+ return self[:sb]
2872
+ end
2873
+ # Reads the sc member
2874
+ def sc
2875
+ return self[:sc]
2876
+ end
2877
+ # Reads the sd member
2878
+ def sd
2879
+ return self[:sd]
2880
+ end
2881
+ # Reads the se member
2882
+ def se
2883
+ return self[:se]
2884
+ end
2885
+ # Reads the sf member
2886
+ def sf
2887
+ return self[:sf]
2888
+ end
2889
+ # Sets the s0 member to value
2890
+ def s0=(value)
2891
+ self[:s0] = value
2892
+ end
2893
+ # Sets the s1 member to value
2894
+ def s1=(value)
2895
+ self[:s1] = value
2896
+ end
2897
+ # Sets the s2 member to value
2898
+ def s2=(value)
2899
+ self[:s2] = value
2900
+ end
2901
+ # Sets the s3 member to value
2902
+ def s3=(value)
2903
+ self[:s3] = value
2904
+ end
2905
+ # Sets the s4 member to value
2906
+ def s4=(value)
2907
+ self[:s4] = value
2908
+ end
2909
+ # Sets the s5 member to value
2910
+ def s5=(value)
2911
+ self[:s5] = value
2912
+ end
2913
+ # Sets the s6 member to value
2914
+ def s6=(value)
2915
+ self[:s6] = value
2916
+ end
2917
+ # Sets the s7 member to value
2918
+ def s7=(value)
2919
+ self[:s7] = value
2920
+ end
2921
+ # Sets the s8 member to value
2922
+ def s8=(value)
2923
+ self[:s8] = value
2924
+ end
2925
+ # Sets the s9 member to value
2926
+ def s9=(value)
2927
+ self[:s9] = value
2928
+ end
2929
+ # Sets the sa member to value
2930
+ def sa=(value)
2931
+ self[:sa] = value
2932
+ end
2933
+ # Sets the sb member to value
2934
+ def sb=(value)
2935
+ self[:sb] = value
2936
+ end
2937
+ # Sets the sc member to value
2938
+ def sc=(value)
2939
+ self[:sc] = value
2940
+ end
2941
+ # Sets the sd member to value
2942
+ def sd=(value)
2943
+ self[:sd] = value
2944
+ end
2945
+ # Sets the se member to value
2946
+ def se=(value)
2947
+ self[:se] = value
2948
+ end
2949
+ # Sets the sf member to value
2950
+ def sf=(value)
2951
+ self[:sf] = value
2952
+ end
2953
+ end
2954
+ # Maps the cl_ulong16 type of OpenCL
2955
+ class ULong16 < FFI::Struct
2956
+ @size = FFI.find_type(:cl_ulong).size * 16
2957
+ @layout = FFI::StructLayout::new([ FFI::StructLayout::Field::new( "s0", FFI.find_type(:cl_ulong).size * 0, FFI.find_type(:cl_ulong) ), FFI::StructLayout::Field::new( "s1", FFI.find_type(:cl_ulong).size * 1, FFI.find_type(:cl_ulong) ), FFI::StructLayout::Field::new( "s2", FFI.find_type(:cl_ulong).size * 2, FFI.find_type(:cl_ulong) ), FFI::StructLayout::Field::new( "s3", FFI.find_type(:cl_ulong).size * 3, FFI.find_type(:cl_ulong) ), FFI::StructLayout::Field::new( "s4", FFI.find_type(:cl_ulong).size * 4, FFI.find_type(:cl_ulong) ), FFI::StructLayout::Field::new( "s5", FFI.find_type(:cl_ulong).size * 5, FFI.find_type(:cl_ulong) ), FFI::StructLayout::Field::new( "s6", FFI.find_type(:cl_ulong).size * 6, FFI.find_type(:cl_ulong) ), FFI::StructLayout::Field::new( "s7", FFI.find_type(:cl_ulong).size * 7, FFI.find_type(:cl_ulong) ), FFI::StructLayout::Field::new( "s8", FFI.find_type(:cl_ulong).size * 8, FFI.find_type(:cl_ulong) ), FFI::StructLayout::Field::new( "s9", FFI.find_type(:cl_ulong).size * 9, FFI.find_type(:cl_ulong) ), FFI::StructLayout::Field::new( "sa", FFI.find_type(:cl_ulong).size * 10, FFI.find_type(:cl_ulong) ), FFI::StructLayout::Field::new( "sb", FFI.find_type(:cl_ulong).size * 11, FFI.find_type(:cl_ulong) ), FFI::StructLayout::Field::new( "sc", FFI.find_type(:cl_ulong).size * 12, FFI.find_type(:cl_ulong) ), FFI::StructLayout::Field::new( "sd", FFI.find_type(:cl_ulong).size * 13, FFI.find_type(:cl_ulong) ), FFI::StructLayout::Field::new( "se", FFI.find_type(:cl_ulong).size * 14, FFI.find_type(:cl_ulong) ), FFI::StructLayout::Field::new( "sf", FFI.find_type(:cl_ulong).size * 15, FFI.find_type(:cl_ulong) ) ], FFI.find_type(:cl_ulong).size * 16, FFI.find_type(:cl_ulong).size * 16 )
2958
+ # Creates a new ULong16 with members set to 0 or to the user specified values
2959
+ def initialize( s0 = 0, s1 = 0, s2 = 0, s3 = 0, s4 = 0, s5 = 0, s6 = 0, s7 = 0, s8 = 0, s9 = 0, sa = 0, sb = 0, sc = 0, sd = 0, se = 0, sf = 0 )
2960
+ super()
2961
+ self[:s0] = s0
2962
+ self[:s1] = s1
2963
+ self[:s2] = s2
2964
+ self[:s3] = s3
2965
+ self[:s4] = s4
2966
+ self[:s5] = s5
2967
+ self[:s6] = s6
2968
+ self[:s7] = s7
2969
+ self[:s8] = s8
2970
+ self[:s9] = s9
2971
+ self[:sa] = sa
2972
+ self[:sb] = sb
2973
+ self[:sc] = sc
2974
+ self[:sd] = sd
2975
+ self[:se] = se
2976
+ self[:sf] = sf
2977
+ end
2978
+ # Reads the s0 member
2979
+ def s0
2980
+ return self[:s0]
2981
+ end
2982
+ # Reads the s1 member
2983
+ def s1
2984
+ return self[:s1]
2985
+ end
2986
+ # Reads the s2 member
2987
+ def s2
2988
+ return self[:s2]
2989
+ end
2990
+ # Reads the s3 member
2991
+ def s3
2992
+ return self[:s3]
2993
+ end
2994
+ # Reads the s4 member
2995
+ def s4
2996
+ return self[:s4]
2997
+ end
2998
+ # Reads the s5 member
2999
+ def s5
3000
+ return self[:s5]
3001
+ end
3002
+ # Reads the s6 member
3003
+ def s6
3004
+ return self[:s6]
3005
+ end
3006
+ # Reads the s7 member
3007
+ def s7
3008
+ return self[:s7]
3009
+ end
3010
+ # Reads the s8 member
3011
+ def s8
3012
+ return self[:s8]
3013
+ end
3014
+ # Reads the s9 member
3015
+ def s9
3016
+ return self[:s9]
3017
+ end
3018
+ # Reads the sa member
3019
+ def sa
3020
+ return self[:sa]
3021
+ end
3022
+ # Reads the sb member
3023
+ def sb
3024
+ return self[:sb]
3025
+ end
3026
+ # Reads the sc member
3027
+ def sc
3028
+ return self[:sc]
3029
+ end
3030
+ # Reads the sd member
3031
+ def sd
3032
+ return self[:sd]
3033
+ end
3034
+ # Reads the se member
3035
+ def se
3036
+ return self[:se]
3037
+ end
3038
+ # Reads the sf member
3039
+ def sf
3040
+ return self[:sf]
3041
+ end
3042
+ # Sets the s0 member to value
3043
+ def s0=(value)
3044
+ self[:s0] = value
3045
+ end
3046
+ # Sets the s1 member to value
3047
+ def s1=(value)
3048
+ self[:s1] = value
3049
+ end
3050
+ # Sets the s2 member to value
3051
+ def s2=(value)
3052
+ self[:s2] = value
3053
+ end
3054
+ # Sets the s3 member to value
3055
+ def s3=(value)
3056
+ self[:s3] = value
3057
+ end
3058
+ # Sets the s4 member to value
3059
+ def s4=(value)
3060
+ self[:s4] = value
3061
+ end
3062
+ # Sets the s5 member to value
3063
+ def s5=(value)
3064
+ self[:s5] = value
3065
+ end
3066
+ # Sets the s6 member to value
3067
+ def s6=(value)
3068
+ self[:s6] = value
3069
+ end
3070
+ # Sets the s7 member to value
3071
+ def s7=(value)
3072
+ self[:s7] = value
3073
+ end
3074
+ # Sets the s8 member to value
3075
+ def s8=(value)
3076
+ self[:s8] = value
3077
+ end
3078
+ # Sets the s9 member to value
3079
+ def s9=(value)
3080
+ self[:s9] = value
3081
+ end
3082
+ # Sets the sa member to value
3083
+ def sa=(value)
3084
+ self[:sa] = value
3085
+ end
3086
+ # Sets the sb member to value
3087
+ def sb=(value)
3088
+ self[:sb] = value
3089
+ end
3090
+ # Sets the sc member to value
3091
+ def sc=(value)
3092
+ self[:sc] = value
3093
+ end
3094
+ # Sets the sd member to value
3095
+ def sd=(value)
3096
+ self[:sd] = value
3097
+ end
3098
+ # Sets the se member to value
3099
+ def se=(value)
3100
+ self[:se] = value
3101
+ end
3102
+ # Sets the sf member to value
3103
+ def sf=(value)
3104
+ self[:sf] = value
3105
+ end
3106
+ end
3107
+ # Maps the cl_float16 type of OpenCL
3108
+ class Float16 < FFI::Struct
3109
+ @size = FFI.find_type(:cl_float).size * 16
3110
+ @layout = FFI::StructLayout::new([ FFI::StructLayout::Field::new( "s0", FFI.find_type(:cl_float).size * 0, FFI.find_type(:cl_float) ), FFI::StructLayout::Field::new( "s1", FFI.find_type(:cl_float).size * 1, FFI.find_type(:cl_float) ), FFI::StructLayout::Field::new( "s2", FFI.find_type(:cl_float).size * 2, FFI.find_type(:cl_float) ), FFI::StructLayout::Field::new( "s3", FFI.find_type(:cl_float).size * 3, FFI.find_type(:cl_float) ), FFI::StructLayout::Field::new( "s4", FFI.find_type(:cl_float).size * 4, FFI.find_type(:cl_float) ), FFI::StructLayout::Field::new( "s5", FFI.find_type(:cl_float).size * 5, FFI.find_type(:cl_float) ), FFI::StructLayout::Field::new( "s6", FFI.find_type(:cl_float).size * 6, FFI.find_type(:cl_float) ), FFI::StructLayout::Field::new( "s7", FFI.find_type(:cl_float).size * 7, FFI.find_type(:cl_float) ), FFI::StructLayout::Field::new( "s8", FFI.find_type(:cl_float).size * 8, FFI.find_type(:cl_float) ), FFI::StructLayout::Field::new( "s9", FFI.find_type(:cl_float).size * 9, FFI.find_type(:cl_float) ), FFI::StructLayout::Field::new( "sa", FFI.find_type(:cl_float).size * 10, FFI.find_type(:cl_float) ), FFI::StructLayout::Field::new( "sb", FFI.find_type(:cl_float).size * 11, FFI.find_type(:cl_float) ), FFI::StructLayout::Field::new( "sc", FFI.find_type(:cl_float).size * 12, FFI.find_type(:cl_float) ), FFI::StructLayout::Field::new( "sd", FFI.find_type(:cl_float).size * 13, FFI.find_type(:cl_float) ), FFI::StructLayout::Field::new( "se", FFI.find_type(:cl_float).size * 14, FFI.find_type(:cl_float) ), FFI::StructLayout::Field::new( "sf", FFI.find_type(:cl_float).size * 15, FFI.find_type(:cl_float) ) ], FFI.find_type(:cl_float).size * 16, FFI.find_type(:cl_float).size * 16 )
3111
+ # Creates a new Float16 with members set to 0 or to the user specified values
3112
+ def initialize( s0 = 0.0, s1 = 0.0, s2 = 0.0, s3 = 0.0, s4 = 0.0, s5 = 0.0, s6 = 0.0, s7 = 0.0, s8 = 0.0, s9 = 0.0, sa = 0.0, sb = 0.0, sc = 0.0, sd = 0.0, se = 0.0, sf = 0.0 )
3113
+ super()
3114
+ self[:s0] = s0
3115
+ self[:s1] = s1
3116
+ self[:s2] = s2
3117
+ self[:s3] = s3
3118
+ self[:s4] = s4
3119
+ self[:s5] = s5
3120
+ self[:s6] = s6
3121
+ self[:s7] = s7
3122
+ self[:s8] = s8
3123
+ self[:s9] = s9
3124
+ self[:sa] = sa
3125
+ self[:sb] = sb
3126
+ self[:sc] = sc
3127
+ self[:sd] = sd
3128
+ self[:se] = se
3129
+ self[:sf] = sf
3130
+ end
3131
+ # Reads the s0 member
3132
+ def s0
3133
+ return self[:s0]
3134
+ end
3135
+ # Reads the s1 member
3136
+ def s1
3137
+ return self[:s1]
3138
+ end
3139
+ # Reads the s2 member
3140
+ def s2
3141
+ return self[:s2]
3142
+ end
3143
+ # Reads the s3 member
3144
+ def s3
3145
+ return self[:s3]
3146
+ end
3147
+ # Reads the s4 member
3148
+ def s4
3149
+ return self[:s4]
3150
+ end
3151
+ # Reads the s5 member
3152
+ def s5
3153
+ return self[:s5]
3154
+ end
3155
+ # Reads the s6 member
3156
+ def s6
3157
+ return self[:s6]
3158
+ end
3159
+ # Reads the s7 member
3160
+ def s7
3161
+ return self[:s7]
3162
+ end
3163
+ # Reads the s8 member
3164
+ def s8
3165
+ return self[:s8]
3166
+ end
3167
+ # Reads the s9 member
3168
+ def s9
3169
+ return self[:s9]
3170
+ end
3171
+ # Reads the sa member
3172
+ def sa
3173
+ return self[:sa]
3174
+ end
3175
+ # Reads the sb member
3176
+ def sb
3177
+ return self[:sb]
3178
+ end
3179
+ # Reads the sc member
3180
+ def sc
3181
+ return self[:sc]
3182
+ end
3183
+ # Reads the sd member
3184
+ def sd
3185
+ return self[:sd]
3186
+ end
3187
+ # Reads the se member
3188
+ def se
3189
+ return self[:se]
3190
+ end
3191
+ # Reads the sf member
3192
+ def sf
3193
+ return self[:sf]
3194
+ end
3195
+ # Sets the s0 member to value
3196
+ def s0=(value)
3197
+ self[:s0] = value
3198
+ end
3199
+ # Sets the s1 member to value
3200
+ def s1=(value)
3201
+ self[:s1] = value
3202
+ end
3203
+ # Sets the s2 member to value
3204
+ def s2=(value)
3205
+ self[:s2] = value
3206
+ end
3207
+ # Sets the s3 member to value
3208
+ def s3=(value)
3209
+ self[:s3] = value
3210
+ end
3211
+ # Sets the s4 member to value
3212
+ def s4=(value)
3213
+ self[:s4] = value
3214
+ end
3215
+ # Sets the s5 member to value
3216
+ def s5=(value)
3217
+ self[:s5] = value
3218
+ end
3219
+ # Sets the s6 member to value
3220
+ def s6=(value)
3221
+ self[:s6] = value
3222
+ end
3223
+ # Sets the s7 member to value
3224
+ def s7=(value)
3225
+ self[:s7] = value
3226
+ end
3227
+ # Sets the s8 member to value
3228
+ def s8=(value)
3229
+ self[:s8] = value
3230
+ end
3231
+ # Sets the s9 member to value
3232
+ def s9=(value)
3233
+ self[:s9] = value
3234
+ end
3235
+ # Sets the sa member to value
3236
+ def sa=(value)
3237
+ self[:sa] = value
3238
+ end
3239
+ # Sets the sb member to value
3240
+ def sb=(value)
3241
+ self[:sb] = value
3242
+ end
3243
+ # Sets the sc member to value
3244
+ def sc=(value)
3245
+ self[:sc] = value
3246
+ end
3247
+ # Sets the sd member to value
3248
+ def sd=(value)
3249
+ self[:sd] = value
3250
+ end
3251
+ # Sets the se member to value
3252
+ def se=(value)
3253
+ self[:se] = value
3254
+ end
3255
+ # Sets the sf member to value
3256
+ def sf=(value)
3257
+ self[:sf] = value
3258
+ end
3259
+ end
3260
+ # Maps the cl_double16 type of OpenCL
3261
+ class Double16 < FFI::Struct
3262
+ @size = FFI.find_type(:cl_double).size * 16
3263
+ @layout = FFI::StructLayout::new([ FFI::StructLayout::Field::new( "s0", FFI.find_type(:cl_double).size * 0, FFI.find_type(:cl_double) ), FFI::StructLayout::Field::new( "s1", FFI.find_type(:cl_double).size * 1, FFI.find_type(:cl_double) ), FFI::StructLayout::Field::new( "s2", FFI.find_type(:cl_double).size * 2, FFI.find_type(:cl_double) ), FFI::StructLayout::Field::new( "s3", FFI.find_type(:cl_double).size * 3, FFI.find_type(:cl_double) ), FFI::StructLayout::Field::new( "s4", FFI.find_type(:cl_double).size * 4, FFI.find_type(:cl_double) ), FFI::StructLayout::Field::new( "s5", FFI.find_type(:cl_double).size * 5, FFI.find_type(:cl_double) ), FFI::StructLayout::Field::new( "s6", FFI.find_type(:cl_double).size * 6, FFI.find_type(:cl_double) ), FFI::StructLayout::Field::new( "s7", FFI.find_type(:cl_double).size * 7, FFI.find_type(:cl_double) ), FFI::StructLayout::Field::new( "s8", FFI.find_type(:cl_double).size * 8, FFI.find_type(:cl_double) ), FFI::StructLayout::Field::new( "s9", FFI.find_type(:cl_double).size * 9, FFI.find_type(:cl_double) ), FFI::StructLayout::Field::new( "sa", FFI.find_type(:cl_double).size * 10, FFI.find_type(:cl_double) ), FFI::StructLayout::Field::new( "sb", FFI.find_type(:cl_double).size * 11, FFI.find_type(:cl_double) ), FFI::StructLayout::Field::new( "sc", FFI.find_type(:cl_double).size * 12, FFI.find_type(:cl_double) ), FFI::StructLayout::Field::new( "sd", FFI.find_type(:cl_double).size * 13, FFI.find_type(:cl_double) ), FFI::StructLayout::Field::new( "se", FFI.find_type(:cl_double).size * 14, FFI.find_type(:cl_double) ), FFI::StructLayout::Field::new( "sf", FFI.find_type(:cl_double).size * 15, FFI.find_type(:cl_double) ) ], FFI.find_type(:cl_double).size * 16, FFI.find_type(:cl_double).size * 16 )
3264
+ # Creates a new Double16 with members set to 0 or to the user specified values
3265
+ def initialize( s0 = 0.0, s1 = 0.0, s2 = 0.0, s3 = 0.0, s4 = 0.0, s5 = 0.0, s6 = 0.0, s7 = 0.0, s8 = 0.0, s9 = 0.0, sa = 0.0, sb = 0.0, sc = 0.0, sd = 0.0, se = 0.0, sf = 0.0 )
3266
+ super()
3267
+ self[:s0] = s0
3268
+ self[:s1] = s1
3269
+ self[:s2] = s2
3270
+ self[:s3] = s3
3271
+ self[:s4] = s4
3272
+ self[:s5] = s5
3273
+ self[:s6] = s6
3274
+ self[:s7] = s7
3275
+ self[:s8] = s8
3276
+ self[:s9] = s9
3277
+ self[:sa] = sa
3278
+ self[:sb] = sb
3279
+ self[:sc] = sc
3280
+ self[:sd] = sd
3281
+ self[:se] = se
3282
+ self[:sf] = sf
3283
+ end
3284
+ # Reads the s0 member
3285
+ def s0
3286
+ return self[:s0]
3287
+ end
3288
+ # Reads the s1 member
3289
+ def s1
3290
+ return self[:s1]
3291
+ end
3292
+ # Reads the s2 member
3293
+ def s2
3294
+ return self[:s2]
3295
+ end
3296
+ # Reads the s3 member
3297
+ def s3
3298
+ return self[:s3]
3299
+ end
3300
+ # Reads the s4 member
3301
+ def s4
3302
+ return self[:s4]
3303
+ end
3304
+ # Reads the s5 member
3305
+ def s5
3306
+ return self[:s5]
3307
+ end
3308
+ # Reads the s6 member
3309
+ def s6
3310
+ return self[:s6]
3311
+ end
3312
+ # Reads the s7 member
3313
+ def s7
3314
+ return self[:s7]
3315
+ end
3316
+ # Reads the s8 member
3317
+ def s8
3318
+ return self[:s8]
3319
+ end
3320
+ # Reads the s9 member
3321
+ def s9
3322
+ return self[:s9]
3323
+ end
3324
+ # Reads the sa member
3325
+ def sa
3326
+ return self[:sa]
3327
+ end
3328
+ # Reads the sb member
3329
+ def sb
3330
+ return self[:sb]
3331
+ end
3332
+ # Reads the sc member
3333
+ def sc
3334
+ return self[:sc]
3335
+ end
3336
+ # Reads the sd member
3337
+ def sd
3338
+ return self[:sd]
3339
+ end
3340
+ # Reads the se member
3341
+ def se
3342
+ return self[:se]
3343
+ end
3344
+ # Reads the sf member
3345
+ def sf
3346
+ return self[:sf]
3347
+ end
3348
+ # Sets the s0 member to value
3349
+ def s0=(value)
3350
+ self[:s0] = value
3351
+ end
3352
+ # Sets the s1 member to value
3353
+ def s1=(value)
3354
+ self[:s1] = value
3355
+ end
3356
+ # Sets the s2 member to value
3357
+ def s2=(value)
3358
+ self[:s2] = value
3359
+ end
3360
+ # Sets the s3 member to value
3361
+ def s3=(value)
3362
+ self[:s3] = value
3363
+ end
3364
+ # Sets the s4 member to value
3365
+ def s4=(value)
3366
+ self[:s4] = value
3367
+ end
3368
+ # Sets the s5 member to value
3369
+ def s5=(value)
3370
+ self[:s5] = value
3371
+ end
3372
+ # Sets the s6 member to value
3373
+ def s6=(value)
3374
+ self[:s6] = value
3375
+ end
3376
+ # Sets the s7 member to value
3377
+ def s7=(value)
3378
+ self[:s7] = value
3379
+ end
3380
+ # Sets the s8 member to value
3381
+ def s8=(value)
3382
+ self[:s8] = value
3383
+ end
3384
+ # Sets the s9 member to value
3385
+ def s9=(value)
3386
+ self[:s9] = value
3387
+ end
3388
+ # Sets the sa member to value
3389
+ def sa=(value)
3390
+ self[:sa] = value
3391
+ end
3392
+ # Sets the sb member to value
3393
+ def sb=(value)
3394
+ self[:sb] = value
3395
+ end
3396
+ # Sets the sc member to value
3397
+ def sc=(value)
3398
+ self[:sc] = value
3399
+ end
3400
+ # Sets the sd member to value
3401
+ def sd=(value)
3402
+ self[:sd] = value
3403
+ end
3404
+ # Sets the se member to value
3405
+ def se=(value)
3406
+ self[:se] = value
3407
+ end
3408
+ # Sets the sf member to value
3409
+ def sf=(value)
3410
+ self[:sf] = value
3411
+ end
3412
+ end
3413
+ # Maps the cl_half16 type of OpenCL
3414
+ class Half16 < FFI::Struct
3415
+ @size = FFI.find_type(:cl_half).size * 16
3416
+ @layout = FFI::StructLayout::new([ FFI::StructLayout::Field::new( "s0", FFI.find_type(:cl_half).size * 0, FFI.find_type(:cl_half) ), FFI::StructLayout::Field::new( "s1", FFI.find_type(:cl_half).size * 1, FFI.find_type(:cl_half) ), FFI::StructLayout::Field::new( "s2", FFI.find_type(:cl_half).size * 2, FFI.find_type(:cl_half) ), FFI::StructLayout::Field::new( "s3", FFI.find_type(:cl_half).size * 3, FFI.find_type(:cl_half) ), FFI::StructLayout::Field::new( "s4", FFI.find_type(:cl_half).size * 4, FFI.find_type(:cl_half) ), FFI::StructLayout::Field::new( "s5", FFI.find_type(:cl_half).size * 5, FFI.find_type(:cl_half) ), FFI::StructLayout::Field::new( "s6", FFI.find_type(:cl_half).size * 6, FFI.find_type(:cl_half) ), FFI::StructLayout::Field::new( "s7", FFI.find_type(:cl_half).size * 7, FFI.find_type(:cl_half) ), FFI::StructLayout::Field::new( "s8", FFI.find_type(:cl_half).size * 8, FFI.find_type(:cl_half) ), FFI::StructLayout::Field::new( "s9", FFI.find_type(:cl_half).size * 9, FFI.find_type(:cl_half) ), FFI::StructLayout::Field::new( "sa", FFI.find_type(:cl_half).size * 10, FFI.find_type(:cl_half) ), FFI::StructLayout::Field::new( "sb", FFI.find_type(:cl_half).size * 11, FFI.find_type(:cl_half) ), FFI::StructLayout::Field::new( "sc", FFI.find_type(:cl_half).size * 12, FFI.find_type(:cl_half) ), FFI::StructLayout::Field::new( "sd", FFI.find_type(:cl_half).size * 13, FFI.find_type(:cl_half) ), FFI::StructLayout::Field::new( "se", FFI.find_type(:cl_half).size * 14, FFI.find_type(:cl_half) ), FFI::StructLayout::Field::new( "sf", FFI.find_type(:cl_half).size * 15, FFI.find_type(:cl_half) ) ], FFI.find_type(:cl_half).size * 16, FFI.find_type(:cl_half).size * 16 )
3417
+ # Creates a new Half16 with members set to 0 or to the user specified values
3418
+ def initialize( s0 = 0.0, s1 = 0.0, s2 = 0.0, s3 = 0.0, s4 = 0.0, s5 = 0.0, s6 = 0.0, s7 = 0.0, s8 = 0.0, s9 = 0.0, sa = 0.0, sb = 0.0, sc = 0.0, sd = 0.0, se = 0.0, sf = 0.0 )
3419
+ super()
3420
+ self[:s0] = s0
3421
+ self[:s1] = s1
3422
+ self[:s2] = s2
3423
+ self[:s3] = s3
3424
+ self[:s4] = s4
3425
+ self[:s5] = s5
3426
+ self[:s6] = s6
3427
+ self[:s7] = s7
3428
+ self[:s8] = s8
3429
+ self[:s9] = s9
3430
+ self[:sa] = sa
3431
+ self[:sb] = sb
3432
+ self[:sc] = sc
3433
+ self[:sd] = sd
3434
+ self[:se] = se
3435
+ self[:sf] = sf
3436
+ end
3437
+ # Reads the s0 member
3438
+ def s0
3439
+ return self[:s0]
3440
+ end
3441
+ # Reads the s1 member
3442
+ def s1
3443
+ return self[:s1]
3444
+ end
3445
+ # Reads the s2 member
3446
+ def s2
3447
+ return self[:s2]
3448
+ end
3449
+ # Reads the s3 member
3450
+ def s3
3451
+ return self[:s3]
3452
+ end
3453
+ # Reads the s4 member
3454
+ def s4
3455
+ return self[:s4]
3456
+ end
3457
+ # Reads the s5 member
3458
+ def s5
3459
+ return self[:s5]
3460
+ end
3461
+ # Reads the s6 member
3462
+ def s6
3463
+ return self[:s6]
3464
+ end
3465
+ # Reads the s7 member
3466
+ def s7
3467
+ return self[:s7]
3468
+ end
3469
+ # Reads the s8 member
3470
+ def s8
3471
+ return self[:s8]
3472
+ end
3473
+ # Reads the s9 member
3474
+ def s9
3475
+ return self[:s9]
3476
+ end
3477
+ # Reads the sa member
3478
+ def sa
3479
+ return self[:sa]
3480
+ end
3481
+ # Reads the sb member
3482
+ def sb
3483
+ return self[:sb]
3484
+ end
3485
+ # Reads the sc member
3486
+ def sc
3487
+ return self[:sc]
3488
+ end
3489
+ # Reads the sd member
3490
+ def sd
3491
+ return self[:sd]
3492
+ end
3493
+ # Reads the se member
3494
+ def se
3495
+ return self[:se]
3496
+ end
3497
+ # Reads the sf member
3498
+ def sf
3499
+ return self[:sf]
3500
+ end
3501
+ # Sets the s0 member to value
3502
+ def s0=(value)
3503
+ self[:s0] = value
3504
+ end
3505
+ # Sets the s1 member to value
3506
+ def s1=(value)
3507
+ self[:s1] = value
3508
+ end
3509
+ # Sets the s2 member to value
3510
+ def s2=(value)
3511
+ self[:s2] = value
3512
+ end
3513
+ # Sets the s3 member to value
3514
+ def s3=(value)
3515
+ self[:s3] = value
3516
+ end
3517
+ # Sets the s4 member to value
3518
+ def s4=(value)
3519
+ self[:s4] = value
3520
+ end
3521
+ # Sets the s5 member to value
3522
+ def s5=(value)
3523
+ self[:s5] = value
3524
+ end
3525
+ # Sets the s6 member to value
3526
+ def s6=(value)
3527
+ self[:s6] = value
3528
+ end
3529
+ # Sets the s7 member to value
3530
+ def s7=(value)
3531
+ self[:s7] = value
3532
+ end
3533
+ # Sets the s8 member to value
3534
+ def s8=(value)
3535
+ self[:s8] = value
3536
+ end
3537
+ # Sets the s9 member to value
3538
+ def s9=(value)
3539
+ self[:s9] = value
3540
+ end
3541
+ # Sets the sa member to value
3542
+ def sa=(value)
3543
+ self[:sa] = value
3544
+ end
3545
+ # Sets the sb member to value
3546
+ def sb=(value)
3547
+ self[:sb] = value
3548
+ end
3549
+ # Sets the sc member to value
3550
+ def sc=(value)
3551
+ self[:sc] = value
3552
+ end
3553
+ # Sets the sd member to value
3554
+ def sd=(value)
3555
+ self[:sd] = value
3556
+ end
3557
+ # Sets the se member to value
3558
+ def se=(value)
3559
+ self[:se] = value
3560
+ end
3561
+ # Sets the sf member to value
3562
+ def sf=(value)
3563
+ self[:sf] = value
3564
+ end
3565
+ end
3566
+ end