opencl_ruby_ffi 1.1.0 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/opencl_ruby_ffi/Buffer.rb +4 -3
- data/lib/opencl_ruby_ffi/CommandQueue.rb +57 -56
- data/lib/opencl_ruby_ffi/Context.rb +18 -17
- data/lib/opencl_ruby_ffi/Device.rb +22 -21
- data/lib/opencl_ruby_ffi/Event.rb +12 -11
- data/lib/opencl_ruby_ffi/GLExt.rb +9 -8
- data/lib/opencl_ruby_ffi/Image.rb +11 -10
- data/lib/opencl_ruby_ffi/Kernel.rb +32 -31
- data/lib/opencl_ruby_ffi/Mem.rb +9 -8
- data/lib/opencl_ruby_ffi/Pipe.rb +2 -1
- data/lib/opencl_ruby_ffi/Platform.rb +20 -19
- data/lib/opencl_ruby_ffi/Program.rb +46 -45
- data/lib/opencl_ruby_ffi/SVM.rb +12 -11
- data/lib/opencl_ruby_ffi/Sampler.rb +4 -3
- data/lib/opencl_ruby_ffi/Stream.rb +127 -0
- data/lib/opencl_ruby_ffi/{Arithmetic_gen.rb → opencl_arithmetic_gen.rb} +737 -836
- data/lib/opencl_ruby_ffi/opencl_ruby_ffi_base.rb +49 -69
- data/lib/opencl_ruby_ffi/opencl_ruby_ffi_base_gen.rb +30 -99
- data/lib/opencl_ruby_ffi/opencl_types.rb +114 -0
- data/lib/opencl_ruby_ffi.rb +2 -1
- data/opencl_ruby_ffi.gemspec +2 -2
- metadata +5 -3
@@ -1,299 +1,28 @@
|
|
1
1
|
module OpenCL
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
return self[:s0]
|
14
|
-
end
|
15
|
-
# Sets the s0 member to value
|
16
|
-
def s0=(value)
|
17
|
-
self[:s0] = value
|
18
|
-
end
|
19
|
-
|
20
|
-
def inspect
|
21
|
-
return "#<#{self.class.name}: #{self[:s0]}>"
|
22
|
-
end
|
23
|
-
|
24
|
-
def to_s
|
25
|
-
return "Char{ #{self[:s0]} }"
|
26
|
-
end
|
27
|
-
end
|
28
|
-
# Maps the cl_uchar type of OpenCL
|
29
|
-
class UChar < FFI::Struct
|
30
|
-
@size = FFI.find_type(:cl_uchar).size * 1
|
31
|
-
@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 )
|
32
|
-
# Creates a new UChar with members set to 0 or to the user specified values
|
33
|
-
def initialize( s0 = 0 )
|
34
|
-
super()
|
35
|
-
self[:s0] = s0
|
36
|
-
end
|
37
|
-
# Reads the s0 member
|
38
|
-
def s0
|
39
|
-
return self[:s0]
|
40
|
-
end
|
41
|
-
# Sets the s0 member to value
|
42
|
-
def s0=(value)
|
43
|
-
self[:s0] = value
|
44
|
-
end
|
45
|
-
|
46
|
-
def inspect
|
47
|
-
return "#<#{self.class.name}: #{self[:s0]}>"
|
48
|
-
end
|
49
|
-
|
50
|
-
def to_s
|
51
|
-
return "UChar{ #{self[:s0]} }"
|
52
|
-
end
|
53
|
-
end
|
54
|
-
# Maps the cl_short type of OpenCL
|
55
|
-
class Short < FFI::Struct
|
56
|
-
@size = FFI.find_type(:cl_short).size * 1
|
57
|
-
@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 )
|
58
|
-
# Creates a new Short with members set to 0 or to the user specified values
|
59
|
-
def initialize( s0 = 0 )
|
60
|
-
super()
|
61
|
-
self[:s0] = s0
|
62
|
-
end
|
63
|
-
# Reads the s0 member
|
64
|
-
def s0
|
65
|
-
return self[:s0]
|
66
|
-
end
|
67
|
-
# Sets the s0 member to value
|
68
|
-
def s0=(value)
|
69
|
-
self[:s0] = value
|
70
|
-
end
|
71
|
-
|
72
|
-
def inspect
|
73
|
-
return "#<#{self.class.name}: #{self[:s0]}>"
|
74
|
-
end
|
75
|
-
|
76
|
-
def to_s
|
77
|
-
return "Short{ #{self[:s0]} }"
|
78
|
-
end
|
79
|
-
end
|
80
|
-
# Maps the cl_ushort type of OpenCL
|
81
|
-
class UShort < FFI::Struct
|
82
|
-
@size = FFI.find_type(:cl_ushort).size * 1
|
83
|
-
@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 )
|
84
|
-
# Creates a new UShort with members set to 0 or to the user specified values
|
85
|
-
def initialize( s0 = 0 )
|
86
|
-
super()
|
87
|
-
self[:s0] = s0
|
88
|
-
end
|
89
|
-
# Reads the s0 member
|
90
|
-
def s0
|
91
|
-
return self[:s0]
|
92
|
-
end
|
93
|
-
# Sets the s0 member to value
|
94
|
-
def s0=(value)
|
95
|
-
self[:s0] = value
|
96
|
-
end
|
97
|
-
|
98
|
-
def inspect
|
99
|
-
return "#<#{self.class.name}: #{self[:s0]}>"
|
100
|
-
end
|
101
|
-
|
102
|
-
def to_s
|
103
|
-
return "UShort{ #{self[:s0]} }"
|
104
|
-
end
|
105
|
-
end
|
106
|
-
# Maps the cl_int type of OpenCL
|
107
|
-
class Int < FFI::Struct
|
108
|
-
@size = FFI.find_type(:cl_int).size * 1
|
109
|
-
@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 )
|
110
|
-
# Creates a new Int with members set to 0 or to the user specified values
|
111
|
-
def initialize( s0 = 0 )
|
112
|
-
super()
|
113
|
-
self[:s0] = s0
|
114
|
-
end
|
115
|
-
# Reads the s0 member
|
116
|
-
def s0
|
117
|
-
return self[:s0]
|
118
|
-
end
|
119
|
-
# Sets the s0 member to value
|
120
|
-
def s0=(value)
|
121
|
-
self[:s0] = value
|
122
|
-
end
|
123
|
-
|
124
|
-
def inspect
|
125
|
-
return "#<#{self.class.name}: #{self[:s0]}>"
|
126
|
-
end
|
127
|
-
|
128
|
-
def to_s
|
129
|
-
return "Int{ #{self[:s0]} }"
|
130
|
-
end
|
131
|
-
end
|
132
|
-
# Maps the cl_uint type of OpenCL
|
133
|
-
class UInt < FFI::Struct
|
134
|
-
@size = FFI.find_type(:cl_uint).size * 1
|
135
|
-
@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 )
|
136
|
-
# Creates a new UInt with members set to 0 or to the user specified values
|
137
|
-
def initialize( s0 = 0 )
|
138
|
-
super()
|
139
|
-
self[:s0] = s0
|
140
|
-
end
|
141
|
-
# Reads the s0 member
|
142
|
-
def s0
|
143
|
-
return self[:s0]
|
144
|
-
end
|
145
|
-
# Sets the s0 member to value
|
146
|
-
def s0=(value)
|
147
|
-
self[:s0] = value
|
148
|
-
end
|
149
|
-
|
150
|
-
def inspect
|
151
|
-
return "#<#{self.class.name}: #{self[:s0]}>"
|
152
|
-
end
|
153
|
-
|
154
|
-
def to_s
|
155
|
-
return "UInt{ #{self[:s0]} }"
|
156
|
-
end
|
157
|
-
end
|
158
|
-
# Maps the cl_long type of OpenCL
|
159
|
-
class Long < FFI::Struct
|
160
|
-
@size = FFI.find_type(:cl_long).size * 1
|
161
|
-
@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 )
|
162
|
-
# Creates a new Long with members set to 0 or to the user specified values
|
163
|
-
def initialize( s0 = 0 )
|
164
|
-
super()
|
165
|
-
self[:s0] = s0
|
166
|
-
end
|
167
|
-
# Reads the s0 member
|
168
|
-
def s0
|
169
|
-
return self[:s0]
|
170
|
-
end
|
171
|
-
# Sets the s0 member to value
|
172
|
-
def s0=(value)
|
173
|
-
self[:s0] = value
|
174
|
-
end
|
175
|
-
|
176
|
-
def inspect
|
177
|
-
return "#<#{self.class.name}: #{self[:s0]}>"
|
178
|
-
end
|
179
|
-
|
180
|
-
def to_s
|
181
|
-
return "Long{ #{self[:s0]} }"
|
182
|
-
end
|
183
|
-
end
|
184
|
-
# Maps the cl_ulong type of OpenCL
|
185
|
-
class ULong < FFI::Struct
|
186
|
-
@size = FFI.find_type(:cl_ulong).size * 1
|
187
|
-
@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 )
|
188
|
-
# Creates a new ULong with members set to 0 or to the user specified values
|
189
|
-
def initialize( s0 = 0 )
|
190
|
-
super()
|
191
|
-
self[:s0] = s0
|
192
|
-
end
|
193
|
-
# Reads the s0 member
|
194
|
-
def s0
|
195
|
-
return self[:s0]
|
196
|
-
end
|
197
|
-
# Sets the s0 member to value
|
198
|
-
def s0=(value)
|
199
|
-
self[:s0] = value
|
200
|
-
end
|
201
|
-
|
202
|
-
def inspect
|
203
|
-
return "#<#{self.class.name}: #{self[:s0]}>"
|
204
|
-
end
|
205
|
-
|
206
|
-
def to_s
|
207
|
-
return "ULong{ #{self[:s0]} }"
|
208
|
-
end
|
209
|
-
end
|
210
|
-
# Maps the cl_float type of OpenCL
|
211
|
-
class Float < FFI::Struct
|
212
|
-
@size = FFI.find_type(:cl_float).size * 1
|
213
|
-
@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 )
|
214
|
-
# Creates a new Float with members set to 0 or to the user specified values
|
215
|
-
def initialize( s0 = 0.0 )
|
216
|
-
super()
|
217
|
-
self[:s0] = s0
|
218
|
-
end
|
219
|
-
# Reads the s0 member
|
220
|
-
def s0
|
221
|
-
return self[:s0]
|
222
|
-
end
|
223
|
-
# Sets the s0 member to value
|
224
|
-
def s0=(value)
|
225
|
-
self[:s0] = value
|
226
|
-
end
|
227
|
-
|
228
|
-
def inspect
|
229
|
-
return "#<#{self.class.name}: #{self[:s0]}>"
|
230
|
-
end
|
231
|
-
|
232
|
-
def to_s
|
233
|
-
return "Float{ #{self[:s0]} }"
|
234
|
-
end
|
235
|
-
end
|
236
|
-
# Maps the cl_double type of OpenCL
|
237
|
-
class Double < FFI::Struct
|
238
|
-
@size = FFI.find_type(:cl_double).size * 1
|
239
|
-
@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 )
|
240
|
-
# Creates a new Double with members set to 0 or to the user specified values
|
241
|
-
def initialize( s0 = 0.0 )
|
242
|
-
super()
|
243
|
-
self[:s0] = s0
|
244
|
-
end
|
245
|
-
# Reads the s0 member
|
246
|
-
def s0
|
247
|
-
return self[:s0]
|
248
|
-
end
|
249
|
-
# Sets the s0 member to value
|
250
|
-
def s0=(value)
|
251
|
-
self[:s0] = value
|
252
|
-
end
|
253
|
-
|
254
|
-
def inspect
|
255
|
-
return "#<#{self.class.name}: #{self[:s0]}>"
|
256
|
-
end
|
257
|
-
|
258
|
-
def to_s
|
259
|
-
return "Double{ #{self[:s0]} }"
|
260
|
-
end
|
261
|
-
end
|
262
|
-
# Maps the cl_half type of OpenCL
|
263
|
-
class Half < FFI::Struct
|
264
|
-
@size = FFI.find_type(:cl_half).size * 1
|
265
|
-
@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 )
|
266
|
-
# Creates a new Half with members set to 0 or to the user specified values
|
267
|
-
def initialize( s0 = 0.0 )
|
268
|
-
super()
|
269
|
-
self[:s0] = s0
|
270
|
-
end
|
271
|
-
# Reads the s0 member
|
272
|
-
def s0
|
273
|
-
return self[:s0]
|
274
|
-
end
|
275
|
-
# Sets the s0 member to value
|
276
|
-
def s0=(value)
|
277
|
-
self[:s0] = value
|
278
|
-
end
|
279
|
-
|
280
|
-
def inspect
|
281
|
-
return "#<#{self.class.name}: #{self[:s0]}>"
|
282
|
-
end
|
283
|
-
|
284
|
-
def to_s
|
285
|
-
return "Half{ #{self[:s0]} }"
|
286
|
-
end
|
287
|
-
end
|
2
|
+
Char = OpenCL.find_type(:cl_char)
|
3
|
+
UChar = OpenCL.find_type(:cl_uchar)
|
4
|
+
Short = OpenCL.find_type(:cl_short)
|
5
|
+
UShort = OpenCL.find_type(:cl_ushort)
|
6
|
+
Int = OpenCL.find_type(:cl_int)
|
7
|
+
UInt = OpenCL.find_type(:cl_uint)
|
8
|
+
Long = OpenCL.find_type(:cl_long)
|
9
|
+
ULong = OpenCL.find_type(:cl_ulong)
|
10
|
+
Float = OpenCL.find_type(:cl_float)
|
11
|
+
Double = OpenCL.find_type(:cl_double)
|
12
|
+
Half = OpenCL.find_type(:cl_half)
|
288
13
|
# Maps the cl_char2 type of OpenCL
|
289
|
-
class Char2 <
|
290
|
-
@size =
|
291
|
-
@layout =
|
292
|
-
# Creates a new Char2 with members set to 0 or to the user specified values
|
14
|
+
class Char2 < Struct
|
15
|
+
@size = OpenCL.find_type(:cl_char).size * 2
|
16
|
+
@layout = OpenCL::StructLayout::new([ OpenCL::StructLayout::Field::new( "s0", OpenCL.find_type(:cl_char).size * 0, OpenCL.find_type(:cl_char) ), OpenCL::StructLayout::Field::new( "s1", OpenCL.find_type(:cl_char).size * 1, OpenCL.find_type(:cl_char) ) ], OpenCL.find_type(:cl_char).size * 2, OpenCL.find_type(:cl_char).size * 2 )
|
17
|
+
# Creates a new Char2 with members set to 0 or to the user specified values. If a Pointer is passed as the first argument, Char2 maps the memory pointed.
|
293
18
|
def initialize( s0 = 0, s1 = 0 )
|
294
|
-
|
295
|
-
|
296
|
-
|
19
|
+
if s0.is_a?(FFI::Pointer) then
|
20
|
+
super(s0)
|
21
|
+
else
|
22
|
+
super()
|
23
|
+
self[:s0] = s0
|
24
|
+
self[:s1] = s1
|
25
|
+
end
|
297
26
|
end
|
298
27
|
# Reads the s0 member
|
299
28
|
def s0
|
@@ -321,14 +50,18 @@ module OpenCL
|
|
321
50
|
end
|
322
51
|
end
|
323
52
|
# Maps the cl_uchar2 type of OpenCL
|
324
|
-
class UChar2 <
|
325
|
-
@size =
|
326
|
-
@layout =
|
327
|
-
# Creates a new UChar2 with members set to 0 or to the user specified values
|
53
|
+
class UChar2 < Struct
|
54
|
+
@size = OpenCL.find_type(:cl_uchar).size * 2
|
55
|
+
@layout = OpenCL::StructLayout::new([ OpenCL::StructLayout::Field::new( "s0", OpenCL.find_type(:cl_uchar).size * 0, OpenCL.find_type(:cl_uchar) ), OpenCL::StructLayout::Field::new( "s1", OpenCL.find_type(:cl_uchar).size * 1, OpenCL.find_type(:cl_uchar) ) ], OpenCL.find_type(:cl_uchar).size * 2, OpenCL.find_type(:cl_uchar).size * 2 )
|
56
|
+
# Creates a new UChar2 with members set to 0 or to the user specified values. If a Pointer is passed as the first argument, UChar2 maps the memory pointed.
|
328
57
|
def initialize( s0 = 0, s1 = 0 )
|
329
|
-
|
330
|
-
|
331
|
-
|
58
|
+
if s0.is_a?(FFI::Pointer) then
|
59
|
+
super(s0)
|
60
|
+
else
|
61
|
+
super()
|
62
|
+
self[:s0] = s0
|
63
|
+
self[:s1] = s1
|
64
|
+
end
|
332
65
|
end
|
333
66
|
# Reads the s0 member
|
334
67
|
def s0
|
@@ -356,14 +89,18 @@ module OpenCL
|
|
356
89
|
end
|
357
90
|
end
|
358
91
|
# Maps the cl_short2 type of OpenCL
|
359
|
-
class Short2 <
|
360
|
-
@size =
|
361
|
-
@layout =
|
362
|
-
# Creates a new Short2 with members set to 0 or to the user specified values
|
92
|
+
class Short2 < Struct
|
93
|
+
@size = OpenCL.find_type(:cl_short).size * 2
|
94
|
+
@layout = OpenCL::StructLayout::new([ OpenCL::StructLayout::Field::new( "s0", OpenCL.find_type(:cl_short).size * 0, OpenCL.find_type(:cl_short) ), OpenCL::StructLayout::Field::new( "s1", OpenCL.find_type(:cl_short).size * 1, OpenCL.find_type(:cl_short) ) ], OpenCL.find_type(:cl_short).size * 2, OpenCL.find_type(:cl_short).size * 2 )
|
95
|
+
# Creates a new Short2 with members set to 0 or to the user specified values. If a Pointer is passed as the first argument, Short2 maps the memory pointed.
|
363
96
|
def initialize( s0 = 0, s1 = 0 )
|
364
|
-
|
365
|
-
|
366
|
-
|
97
|
+
if s0.is_a?(FFI::Pointer) then
|
98
|
+
super(s0)
|
99
|
+
else
|
100
|
+
super()
|
101
|
+
self[:s0] = s0
|
102
|
+
self[:s1] = s1
|
103
|
+
end
|
367
104
|
end
|
368
105
|
# Reads the s0 member
|
369
106
|
def s0
|
@@ -391,14 +128,18 @@ module OpenCL
|
|
391
128
|
end
|
392
129
|
end
|
393
130
|
# Maps the cl_ushort2 type of OpenCL
|
394
|
-
class UShort2 <
|
395
|
-
@size =
|
396
|
-
@layout =
|
397
|
-
# Creates a new UShort2 with members set to 0 or to the user specified values
|
131
|
+
class UShort2 < Struct
|
132
|
+
@size = OpenCL.find_type(:cl_ushort).size * 2
|
133
|
+
@layout = OpenCL::StructLayout::new([ OpenCL::StructLayout::Field::new( "s0", OpenCL.find_type(:cl_ushort).size * 0, OpenCL.find_type(:cl_ushort) ), OpenCL::StructLayout::Field::new( "s1", OpenCL.find_type(:cl_ushort).size * 1, OpenCL.find_type(:cl_ushort) ) ], OpenCL.find_type(:cl_ushort).size * 2, OpenCL.find_type(:cl_ushort).size * 2 )
|
134
|
+
# Creates a new UShort2 with members set to 0 or to the user specified values. If a Pointer is passed as the first argument, UShort2 maps the memory pointed.
|
398
135
|
def initialize( s0 = 0, s1 = 0 )
|
399
|
-
|
400
|
-
|
401
|
-
|
136
|
+
if s0.is_a?(FFI::Pointer) then
|
137
|
+
super(s0)
|
138
|
+
else
|
139
|
+
super()
|
140
|
+
self[:s0] = s0
|
141
|
+
self[:s1] = s1
|
142
|
+
end
|
402
143
|
end
|
403
144
|
# Reads the s0 member
|
404
145
|
def s0
|
@@ -426,14 +167,18 @@ module OpenCL
|
|
426
167
|
end
|
427
168
|
end
|
428
169
|
# Maps the cl_int2 type of OpenCL
|
429
|
-
class Int2 <
|
430
|
-
@size =
|
431
|
-
@layout =
|
432
|
-
# Creates a new Int2 with members set to 0 or to the user specified values
|
170
|
+
class Int2 < Struct
|
171
|
+
@size = OpenCL.find_type(:cl_int).size * 2
|
172
|
+
@layout = OpenCL::StructLayout::new([ OpenCL::StructLayout::Field::new( "s0", OpenCL.find_type(:cl_int).size * 0, OpenCL.find_type(:cl_int) ), OpenCL::StructLayout::Field::new( "s1", OpenCL.find_type(:cl_int).size * 1, OpenCL.find_type(:cl_int) ) ], OpenCL.find_type(:cl_int).size * 2, OpenCL.find_type(:cl_int).size * 2 )
|
173
|
+
# Creates a new Int2 with members set to 0 or to the user specified values. If a Pointer is passed as the first argument, Int2 maps the memory pointed.
|
433
174
|
def initialize( s0 = 0, s1 = 0 )
|
434
|
-
|
435
|
-
|
436
|
-
|
175
|
+
if s0.is_a?(FFI::Pointer) then
|
176
|
+
super(s0)
|
177
|
+
else
|
178
|
+
super()
|
179
|
+
self[:s0] = s0
|
180
|
+
self[:s1] = s1
|
181
|
+
end
|
437
182
|
end
|
438
183
|
# Reads the s0 member
|
439
184
|
def s0
|
@@ -461,14 +206,18 @@ module OpenCL
|
|
461
206
|
end
|
462
207
|
end
|
463
208
|
# Maps the cl_uint2 type of OpenCL
|
464
|
-
class UInt2 <
|
465
|
-
@size =
|
466
|
-
@layout =
|
467
|
-
# Creates a new UInt2 with members set to 0 or to the user specified values
|
209
|
+
class UInt2 < Struct
|
210
|
+
@size = OpenCL.find_type(:cl_uint).size * 2
|
211
|
+
@layout = OpenCL::StructLayout::new([ OpenCL::StructLayout::Field::new( "s0", OpenCL.find_type(:cl_uint).size * 0, OpenCL.find_type(:cl_uint) ), OpenCL::StructLayout::Field::new( "s1", OpenCL.find_type(:cl_uint).size * 1, OpenCL.find_type(:cl_uint) ) ], OpenCL.find_type(:cl_uint).size * 2, OpenCL.find_type(:cl_uint).size * 2 )
|
212
|
+
# Creates a new UInt2 with members set to 0 or to the user specified values. If a Pointer is passed as the first argument, UInt2 maps the memory pointed.
|
468
213
|
def initialize( s0 = 0, s1 = 0 )
|
469
|
-
|
470
|
-
|
471
|
-
|
214
|
+
if s0.is_a?(FFI::Pointer) then
|
215
|
+
super(s0)
|
216
|
+
else
|
217
|
+
super()
|
218
|
+
self[:s0] = s0
|
219
|
+
self[:s1] = s1
|
220
|
+
end
|
472
221
|
end
|
473
222
|
# Reads the s0 member
|
474
223
|
def s0
|
@@ -496,14 +245,18 @@ module OpenCL
|
|
496
245
|
end
|
497
246
|
end
|
498
247
|
# Maps the cl_long2 type of OpenCL
|
499
|
-
class Long2 <
|
500
|
-
@size =
|
501
|
-
@layout =
|
502
|
-
# Creates a new Long2 with members set to 0 or to the user specified values
|
248
|
+
class Long2 < Struct
|
249
|
+
@size = OpenCL.find_type(:cl_long).size * 2
|
250
|
+
@layout = OpenCL::StructLayout::new([ OpenCL::StructLayout::Field::new( "s0", OpenCL.find_type(:cl_long).size * 0, OpenCL.find_type(:cl_long) ), OpenCL::StructLayout::Field::new( "s1", OpenCL.find_type(:cl_long).size * 1, OpenCL.find_type(:cl_long) ) ], OpenCL.find_type(:cl_long).size * 2, OpenCL.find_type(:cl_long).size * 2 )
|
251
|
+
# Creates a new Long2 with members set to 0 or to the user specified values. If a Pointer is passed as the first argument, Long2 maps the memory pointed.
|
503
252
|
def initialize( s0 = 0, s1 = 0 )
|
504
|
-
|
505
|
-
|
506
|
-
|
253
|
+
if s0.is_a?(FFI::Pointer) then
|
254
|
+
super(s0)
|
255
|
+
else
|
256
|
+
super()
|
257
|
+
self[:s0] = s0
|
258
|
+
self[:s1] = s1
|
259
|
+
end
|
507
260
|
end
|
508
261
|
# Reads the s0 member
|
509
262
|
def s0
|
@@ -531,14 +284,18 @@ module OpenCL
|
|
531
284
|
end
|
532
285
|
end
|
533
286
|
# Maps the cl_ulong2 type of OpenCL
|
534
|
-
class ULong2 <
|
535
|
-
@size =
|
536
|
-
@layout =
|
537
|
-
# Creates a new ULong2 with members set to 0 or to the user specified values
|
287
|
+
class ULong2 < Struct
|
288
|
+
@size = OpenCL.find_type(:cl_ulong).size * 2
|
289
|
+
@layout = OpenCL::StructLayout::new([ OpenCL::StructLayout::Field::new( "s0", OpenCL.find_type(:cl_ulong).size * 0, OpenCL.find_type(:cl_ulong) ), OpenCL::StructLayout::Field::new( "s1", OpenCL.find_type(:cl_ulong).size * 1, OpenCL.find_type(:cl_ulong) ) ], OpenCL.find_type(:cl_ulong).size * 2, OpenCL.find_type(:cl_ulong).size * 2 )
|
290
|
+
# Creates a new ULong2 with members set to 0 or to the user specified values. If a Pointer is passed as the first argument, ULong2 maps the memory pointed.
|
538
291
|
def initialize( s0 = 0, s1 = 0 )
|
539
|
-
|
540
|
-
|
541
|
-
|
292
|
+
if s0.is_a?(FFI::Pointer) then
|
293
|
+
super(s0)
|
294
|
+
else
|
295
|
+
super()
|
296
|
+
self[:s0] = s0
|
297
|
+
self[:s1] = s1
|
298
|
+
end
|
542
299
|
end
|
543
300
|
# Reads the s0 member
|
544
301
|
def s0
|
@@ -566,14 +323,18 @@ module OpenCL
|
|
566
323
|
end
|
567
324
|
end
|
568
325
|
# Maps the cl_float2 type of OpenCL
|
569
|
-
class Float2 <
|
570
|
-
@size =
|
571
|
-
@layout =
|
572
|
-
# Creates a new Float2 with members set to 0 or to the user specified values
|
326
|
+
class Float2 < Struct
|
327
|
+
@size = OpenCL.find_type(:cl_float).size * 2
|
328
|
+
@layout = OpenCL::StructLayout::new([ OpenCL::StructLayout::Field::new( "s0", OpenCL.find_type(:cl_float).size * 0, OpenCL.find_type(:cl_float) ), OpenCL::StructLayout::Field::new( "s1", OpenCL.find_type(:cl_float).size * 1, OpenCL.find_type(:cl_float) ) ], OpenCL.find_type(:cl_float).size * 2, OpenCL.find_type(:cl_float).size * 2 )
|
329
|
+
# Creates a new Float2 with members set to 0 or to the user specified values. If a Pointer is passed as the first argument, Float2 maps the memory pointed.
|
573
330
|
def initialize( s0 = 0.0, s1 = 0.0 )
|
574
|
-
|
575
|
-
|
576
|
-
|
331
|
+
if s0.is_a?(FFI::Pointer) then
|
332
|
+
super(s0)
|
333
|
+
else
|
334
|
+
super()
|
335
|
+
self[:s0] = s0
|
336
|
+
self[:s1] = s1
|
337
|
+
end
|
577
338
|
end
|
578
339
|
# Reads the s0 member
|
579
340
|
def s0
|
@@ -601,14 +362,18 @@ module OpenCL
|
|
601
362
|
end
|
602
363
|
end
|
603
364
|
# Maps the cl_double2 type of OpenCL
|
604
|
-
class Double2 <
|
605
|
-
@size =
|
606
|
-
@layout =
|
607
|
-
# Creates a new Double2 with members set to 0 or to the user specified values
|
365
|
+
class Double2 < Struct
|
366
|
+
@size = OpenCL.find_type(:cl_double).size * 2
|
367
|
+
@layout = OpenCL::StructLayout::new([ OpenCL::StructLayout::Field::new( "s0", OpenCL.find_type(:cl_double).size * 0, OpenCL.find_type(:cl_double) ), OpenCL::StructLayout::Field::new( "s1", OpenCL.find_type(:cl_double).size * 1, OpenCL.find_type(:cl_double) ) ], OpenCL.find_type(:cl_double).size * 2, OpenCL.find_type(:cl_double).size * 2 )
|
368
|
+
# Creates a new Double2 with members set to 0 or to the user specified values. If a Pointer is passed as the first argument, Double2 maps the memory pointed.
|
608
369
|
def initialize( s0 = 0.0, s1 = 0.0 )
|
609
|
-
|
610
|
-
|
611
|
-
|
370
|
+
if s0.is_a?(FFI::Pointer) then
|
371
|
+
super(s0)
|
372
|
+
else
|
373
|
+
super()
|
374
|
+
self[:s0] = s0
|
375
|
+
self[:s1] = s1
|
376
|
+
end
|
612
377
|
end
|
613
378
|
# Reads the s0 member
|
614
379
|
def s0
|
@@ -636,14 +401,18 @@ module OpenCL
|
|
636
401
|
end
|
637
402
|
end
|
638
403
|
# Maps the cl_half2 type of OpenCL
|
639
|
-
class Half2 <
|
640
|
-
@size =
|
641
|
-
@layout =
|
642
|
-
# Creates a new Half2 with members set to 0 or to the user specified values
|
404
|
+
class Half2 < Struct
|
405
|
+
@size = OpenCL.find_type(:cl_half).size * 2
|
406
|
+
@layout = OpenCL::StructLayout::new([ OpenCL::StructLayout::Field::new( "s0", OpenCL.find_type(:cl_half).size * 0, OpenCL.find_type(:cl_half) ), OpenCL::StructLayout::Field::new( "s1", OpenCL.find_type(:cl_half).size * 1, OpenCL.find_type(:cl_half) ) ], OpenCL.find_type(:cl_half).size * 2, OpenCL.find_type(:cl_half).size * 2 )
|
407
|
+
# Creates a new Half2 with members set to 0 or to the user specified values. If a Pointer is passed as the first argument, Half2 maps the memory pointed.
|
643
408
|
def initialize( s0 = 0.0, s1 = 0.0 )
|
644
|
-
|
645
|
-
|
646
|
-
|
409
|
+
if s0.is_a?(FFI::Pointer) then
|
410
|
+
super(s0)
|
411
|
+
else
|
412
|
+
super()
|
413
|
+
self[:s0] = s0
|
414
|
+
self[:s1] = s1
|
415
|
+
end
|
647
416
|
end
|
648
417
|
# Reads the s0 member
|
649
418
|
def s0
|
@@ -671,16 +440,20 @@ module OpenCL
|
|
671
440
|
end
|
672
441
|
end
|
673
442
|
# Maps the cl_char4 type of OpenCL
|
674
|
-
class Char4 <
|
675
|
-
@size =
|
676
|
-
@layout =
|
677
|
-
# Creates a new Char4 with members set to 0 or to the user specified values
|
443
|
+
class Char4 < Struct
|
444
|
+
@size = OpenCL.find_type(:cl_char).size * 4
|
445
|
+
@layout = OpenCL::StructLayout::new([ OpenCL::StructLayout::Field::new( "s0", OpenCL.find_type(:cl_char).size * 0, OpenCL.find_type(:cl_char) ), OpenCL::StructLayout::Field::new( "s1", OpenCL.find_type(:cl_char).size * 1, OpenCL.find_type(:cl_char) ), OpenCL::StructLayout::Field::new( "s2", OpenCL.find_type(:cl_char).size * 2, OpenCL.find_type(:cl_char) ), OpenCL::StructLayout::Field::new( "s3", OpenCL.find_type(:cl_char).size * 3, OpenCL.find_type(:cl_char) ) ], OpenCL.find_type(:cl_char).size * 4, OpenCL.find_type(:cl_char).size * 4 )
|
446
|
+
# Creates a new Char4 with members set to 0 or to the user specified values. If a Pointer is passed as the first argument, Char4 maps the memory pointed.
|
678
447
|
def initialize( s0 = 0, s1 = 0, s2 = 0, s3 = 0 )
|
679
|
-
|
680
|
-
|
681
|
-
|
682
|
-
|
683
|
-
|
448
|
+
if s0.is_a?(FFI::Pointer) then
|
449
|
+
super(s0)
|
450
|
+
else
|
451
|
+
super()
|
452
|
+
self[:s0] = s0
|
453
|
+
self[:s1] = s1
|
454
|
+
self[:s2] = s2
|
455
|
+
self[:s3] = s3
|
456
|
+
end
|
684
457
|
end
|
685
458
|
# Reads the s0 member
|
686
459
|
def s0
|
@@ -724,16 +497,20 @@ module OpenCL
|
|
724
497
|
end
|
725
498
|
end
|
726
499
|
# Maps the cl_uchar4 type of OpenCL
|
727
|
-
class UChar4 <
|
728
|
-
@size =
|
729
|
-
@layout =
|
730
|
-
# Creates a new UChar4 with members set to 0 or to the user specified values
|
500
|
+
class UChar4 < Struct
|
501
|
+
@size = OpenCL.find_type(:cl_uchar).size * 4
|
502
|
+
@layout = OpenCL::StructLayout::new([ OpenCL::StructLayout::Field::new( "s0", OpenCL.find_type(:cl_uchar).size * 0, OpenCL.find_type(:cl_uchar) ), OpenCL::StructLayout::Field::new( "s1", OpenCL.find_type(:cl_uchar).size * 1, OpenCL.find_type(:cl_uchar) ), OpenCL::StructLayout::Field::new( "s2", OpenCL.find_type(:cl_uchar).size * 2, OpenCL.find_type(:cl_uchar) ), OpenCL::StructLayout::Field::new( "s3", OpenCL.find_type(:cl_uchar).size * 3, OpenCL.find_type(:cl_uchar) ) ], OpenCL.find_type(:cl_uchar).size * 4, OpenCL.find_type(:cl_uchar).size * 4 )
|
503
|
+
# Creates a new UChar4 with members set to 0 or to the user specified values. If a Pointer is passed as the first argument, UChar4 maps the memory pointed.
|
731
504
|
def initialize( s0 = 0, s1 = 0, s2 = 0, s3 = 0 )
|
732
|
-
|
733
|
-
|
734
|
-
|
735
|
-
|
736
|
-
|
505
|
+
if s0.is_a?(FFI::Pointer) then
|
506
|
+
super(s0)
|
507
|
+
else
|
508
|
+
super()
|
509
|
+
self[:s0] = s0
|
510
|
+
self[:s1] = s1
|
511
|
+
self[:s2] = s2
|
512
|
+
self[:s3] = s3
|
513
|
+
end
|
737
514
|
end
|
738
515
|
# Reads the s0 member
|
739
516
|
def s0
|
@@ -777,16 +554,20 @@ module OpenCL
|
|
777
554
|
end
|
778
555
|
end
|
779
556
|
# Maps the cl_short4 type of OpenCL
|
780
|
-
class Short4 <
|
781
|
-
@size =
|
782
|
-
@layout =
|
783
|
-
# Creates a new Short4 with members set to 0 or to the user specified values
|
557
|
+
class Short4 < Struct
|
558
|
+
@size = OpenCL.find_type(:cl_short).size * 4
|
559
|
+
@layout = OpenCL::StructLayout::new([ OpenCL::StructLayout::Field::new( "s0", OpenCL.find_type(:cl_short).size * 0, OpenCL.find_type(:cl_short) ), OpenCL::StructLayout::Field::new( "s1", OpenCL.find_type(:cl_short).size * 1, OpenCL.find_type(:cl_short) ), OpenCL::StructLayout::Field::new( "s2", OpenCL.find_type(:cl_short).size * 2, OpenCL.find_type(:cl_short) ), OpenCL::StructLayout::Field::new( "s3", OpenCL.find_type(:cl_short).size * 3, OpenCL.find_type(:cl_short) ) ], OpenCL.find_type(:cl_short).size * 4, OpenCL.find_type(:cl_short).size * 4 )
|
560
|
+
# Creates a new Short4 with members set to 0 or to the user specified values. If a Pointer is passed as the first argument, Short4 maps the memory pointed.
|
784
561
|
def initialize( s0 = 0, s1 = 0, s2 = 0, s3 = 0 )
|
785
|
-
|
786
|
-
|
787
|
-
|
788
|
-
|
789
|
-
|
562
|
+
if s0.is_a?(FFI::Pointer) then
|
563
|
+
super(s0)
|
564
|
+
else
|
565
|
+
super()
|
566
|
+
self[:s0] = s0
|
567
|
+
self[:s1] = s1
|
568
|
+
self[:s2] = s2
|
569
|
+
self[:s3] = s3
|
570
|
+
end
|
790
571
|
end
|
791
572
|
# Reads the s0 member
|
792
573
|
def s0
|
@@ -830,16 +611,20 @@ module OpenCL
|
|
830
611
|
end
|
831
612
|
end
|
832
613
|
# Maps the cl_ushort4 type of OpenCL
|
833
|
-
class UShort4 <
|
834
|
-
@size =
|
835
|
-
@layout =
|
836
|
-
# Creates a new UShort4 with members set to 0 or to the user specified values
|
614
|
+
class UShort4 < Struct
|
615
|
+
@size = OpenCL.find_type(:cl_ushort).size * 4
|
616
|
+
@layout = OpenCL::StructLayout::new([ OpenCL::StructLayout::Field::new( "s0", OpenCL.find_type(:cl_ushort).size * 0, OpenCL.find_type(:cl_ushort) ), OpenCL::StructLayout::Field::new( "s1", OpenCL.find_type(:cl_ushort).size * 1, OpenCL.find_type(:cl_ushort) ), OpenCL::StructLayout::Field::new( "s2", OpenCL.find_type(:cl_ushort).size * 2, OpenCL.find_type(:cl_ushort) ), OpenCL::StructLayout::Field::new( "s3", OpenCL.find_type(:cl_ushort).size * 3, OpenCL.find_type(:cl_ushort) ) ], OpenCL.find_type(:cl_ushort).size * 4, OpenCL.find_type(:cl_ushort).size * 4 )
|
617
|
+
# Creates a new UShort4 with members set to 0 or to the user specified values. If a Pointer is passed as the first argument, UShort4 maps the memory pointed.
|
837
618
|
def initialize( s0 = 0, s1 = 0, s2 = 0, s3 = 0 )
|
838
|
-
|
839
|
-
|
840
|
-
|
841
|
-
|
842
|
-
|
619
|
+
if s0.is_a?(FFI::Pointer) then
|
620
|
+
super(s0)
|
621
|
+
else
|
622
|
+
super()
|
623
|
+
self[:s0] = s0
|
624
|
+
self[:s1] = s1
|
625
|
+
self[:s2] = s2
|
626
|
+
self[:s3] = s3
|
627
|
+
end
|
843
628
|
end
|
844
629
|
# Reads the s0 member
|
845
630
|
def s0
|
@@ -883,16 +668,20 @@ module OpenCL
|
|
883
668
|
end
|
884
669
|
end
|
885
670
|
# Maps the cl_int4 type of OpenCL
|
886
|
-
class Int4 <
|
887
|
-
@size =
|
888
|
-
@layout =
|
889
|
-
# Creates a new Int4 with members set to 0 or to the user specified values
|
671
|
+
class Int4 < Struct
|
672
|
+
@size = OpenCL.find_type(:cl_int).size * 4
|
673
|
+
@layout = OpenCL::StructLayout::new([ OpenCL::StructLayout::Field::new( "s0", OpenCL.find_type(:cl_int).size * 0, OpenCL.find_type(:cl_int) ), OpenCL::StructLayout::Field::new( "s1", OpenCL.find_type(:cl_int).size * 1, OpenCL.find_type(:cl_int) ), OpenCL::StructLayout::Field::new( "s2", OpenCL.find_type(:cl_int).size * 2, OpenCL.find_type(:cl_int) ), OpenCL::StructLayout::Field::new( "s3", OpenCL.find_type(:cl_int).size * 3, OpenCL.find_type(:cl_int) ) ], OpenCL.find_type(:cl_int).size * 4, OpenCL.find_type(:cl_int).size * 4 )
|
674
|
+
# Creates a new Int4 with members set to 0 or to the user specified values. If a Pointer is passed as the first argument, Int4 maps the memory pointed.
|
890
675
|
def initialize( s0 = 0, s1 = 0, s2 = 0, s3 = 0 )
|
891
|
-
|
892
|
-
|
893
|
-
|
894
|
-
|
895
|
-
|
676
|
+
if s0.is_a?(FFI::Pointer) then
|
677
|
+
super(s0)
|
678
|
+
else
|
679
|
+
super()
|
680
|
+
self[:s0] = s0
|
681
|
+
self[:s1] = s1
|
682
|
+
self[:s2] = s2
|
683
|
+
self[:s3] = s3
|
684
|
+
end
|
896
685
|
end
|
897
686
|
# Reads the s0 member
|
898
687
|
def s0
|
@@ -936,16 +725,20 @@ module OpenCL
|
|
936
725
|
end
|
937
726
|
end
|
938
727
|
# Maps the cl_uint4 type of OpenCL
|
939
|
-
class UInt4 <
|
940
|
-
@size =
|
941
|
-
@layout =
|
942
|
-
# Creates a new UInt4 with members set to 0 or to the user specified values
|
728
|
+
class UInt4 < Struct
|
729
|
+
@size = OpenCL.find_type(:cl_uint).size * 4
|
730
|
+
@layout = OpenCL::StructLayout::new([ OpenCL::StructLayout::Field::new( "s0", OpenCL.find_type(:cl_uint).size * 0, OpenCL.find_type(:cl_uint) ), OpenCL::StructLayout::Field::new( "s1", OpenCL.find_type(:cl_uint).size * 1, OpenCL.find_type(:cl_uint) ), OpenCL::StructLayout::Field::new( "s2", OpenCL.find_type(:cl_uint).size * 2, OpenCL.find_type(:cl_uint) ), OpenCL::StructLayout::Field::new( "s3", OpenCL.find_type(:cl_uint).size * 3, OpenCL.find_type(:cl_uint) ) ], OpenCL.find_type(:cl_uint).size * 4, OpenCL.find_type(:cl_uint).size * 4 )
|
731
|
+
# Creates a new UInt4 with members set to 0 or to the user specified values. If a Pointer is passed as the first argument, UInt4 maps the memory pointed.
|
943
732
|
def initialize( s0 = 0, s1 = 0, s2 = 0, s3 = 0 )
|
944
|
-
|
945
|
-
|
946
|
-
|
947
|
-
|
948
|
-
|
733
|
+
if s0.is_a?(FFI::Pointer) then
|
734
|
+
super(s0)
|
735
|
+
else
|
736
|
+
super()
|
737
|
+
self[:s0] = s0
|
738
|
+
self[:s1] = s1
|
739
|
+
self[:s2] = s2
|
740
|
+
self[:s3] = s3
|
741
|
+
end
|
949
742
|
end
|
950
743
|
# Reads the s0 member
|
951
744
|
def s0
|
@@ -989,16 +782,20 @@ module OpenCL
|
|
989
782
|
end
|
990
783
|
end
|
991
784
|
# Maps the cl_long4 type of OpenCL
|
992
|
-
class Long4 <
|
993
|
-
@size =
|
994
|
-
@layout =
|
995
|
-
# Creates a new Long4 with members set to 0 or to the user specified values
|
785
|
+
class Long4 < Struct
|
786
|
+
@size = OpenCL.find_type(:cl_long).size * 4
|
787
|
+
@layout = OpenCL::StructLayout::new([ OpenCL::StructLayout::Field::new( "s0", OpenCL.find_type(:cl_long).size * 0, OpenCL.find_type(:cl_long) ), OpenCL::StructLayout::Field::new( "s1", OpenCL.find_type(:cl_long).size * 1, OpenCL.find_type(:cl_long) ), OpenCL::StructLayout::Field::new( "s2", OpenCL.find_type(:cl_long).size * 2, OpenCL.find_type(:cl_long) ), OpenCL::StructLayout::Field::new( "s3", OpenCL.find_type(:cl_long).size * 3, OpenCL.find_type(:cl_long) ) ], OpenCL.find_type(:cl_long).size * 4, OpenCL.find_type(:cl_long).size * 4 )
|
788
|
+
# Creates a new Long4 with members set to 0 or to the user specified values. If a Pointer is passed as the first argument, Long4 maps the memory pointed.
|
996
789
|
def initialize( s0 = 0, s1 = 0, s2 = 0, s3 = 0 )
|
997
|
-
|
998
|
-
|
999
|
-
|
1000
|
-
|
1001
|
-
|
790
|
+
if s0.is_a?(FFI::Pointer) then
|
791
|
+
super(s0)
|
792
|
+
else
|
793
|
+
super()
|
794
|
+
self[:s0] = s0
|
795
|
+
self[:s1] = s1
|
796
|
+
self[:s2] = s2
|
797
|
+
self[:s3] = s3
|
798
|
+
end
|
1002
799
|
end
|
1003
800
|
# Reads the s0 member
|
1004
801
|
def s0
|
@@ -1042,16 +839,20 @@ module OpenCL
|
|
1042
839
|
end
|
1043
840
|
end
|
1044
841
|
# Maps the cl_ulong4 type of OpenCL
|
1045
|
-
class ULong4 <
|
1046
|
-
@size =
|
1047
|
-
@layout =
|
1048
|
-
# Creates a new ULong4 with members set to 0 or to the user specified values
|
842
|
+
class ULong4 < Struct
|
843
|
+
@size = OpenCL.find_type(:cl_ulong).size * 4
|
844
|
+
@layout = OpenCL::StructLayout::new([ OpenCL::StructLayout::Field::new( "s0", OpenCL.find_type(:cl_ulong).size * 0, OpenCL.find_type(:cl_ulong) ), OpenCL::StructLayout::Field::new( "s1", OpenCL.find_type(:cl_ulong).size * 1, OpenCL.find_type(:cl_ulong) ), OpenCL::StructLayout::Field::new( "s2", OpenCL.find_type(:cl_ulong).size * 2, OpenCL.find_type(:cl_ulong) ), OpenCL::StructLayout::Field::new( "s3", OpenCL.find_type(:cl_ulong).size * 3, OpenCL.find_type(:cl_ulong) ) ], OpenCL.find_type(:cl_ulong).size * 4, OpenCL.find_type(:cl_ulong).size * 4 )
|
845
|
+
# Creates a new ULong4 with members set to 0 or to the user specified values. If a Pointer is passed as the first argument, ULong4 maps the memory pointed.
|
1049
846
|
def initialize( s0 = 0, s1 = 0, s2 = 0, s3 = 0 )
|
1050
|
-
|
1051
|
-
|
1052
|
-
|
1053
|
-
|
1054
|
-
|
847
|
+
if s0.is_a?(FFI::Pointer) then
|
848
|
+
super(s0)
|
849
|
+
else
|
850
|
+
super()
|
851
|
+
self[:s0] = s0
|
852
|
+
self[:s1] = s1
|
853
|
+
self[:s2] = s2
|
854
|
+
self[:s3] = s3
|
855
|
+
end
|
1055
856
|
end
|
1056
857
|
# Reads the s0 member
|
1057
858
|
def s0
|
@@ -1095,16 +896,20 @@ module OpenCL
|
|
1095
896
|
end
|
1096
897
|
end
|
1097
898
|
# Maps the cl_float4 type of OpenCL
|
1098
|
-
class Float4 <
|
1099
|
-
@size =
|
1100
|
-
@layout =
|
1101
|
-
# Creates a new Float4 with members set to 0 or to the user specified values
|
899
|
+
class Float4 < Struct
|
900
|
+
@size = OpenCL.find_type(:cl_float).size * 4
|
901
|
+
@layout = OpenCL::StructLayout::new([ OpenCL::StructLayout::Field::new( "s0", OpenCL.find_type(:cl_float).size * 0, OpenCL.find_type(:cl_float) ), OpenCL::StructLayout::Field::new( "s1", OpenCL.find_type(:cl_float).size * 1, OpenCL.find_type(:cl_float) ), OpenCL::StructLayout::Field::new( "s2", OpenCL.find_type(:cl_float).size * 2, OpenCL.find_type(:cl_float) ), OpenCL::StructLayout::Field::new( "s3", OpenCL.find_type(:cl_float).size * 3, OpenCL.find_type(:cl_float) ) ], OpenCL.find_type(:cl_float).size * 4, OpenCL.find_type(:cl_float).size * 4 )
|
902
|
+
# Creates a new Float4 with members set to 0 or to the user specified values. If a Pointer is passed as the first argument, Float4 maps the memory pointed.
|
1102
903
|
def initialize( s0 = 0.0, s1 = 0.0, s2 = 0.0, s3 = 0.0 )
|
1103
|
-
|
1104
|
-
|
1105
|
-
|
1106
|
-
|
1107
|
-
|
904
|
+
if s0.is_a?(FFI::Pointer) then
|
905
|
+
super(s0)
|
906
|
+
else
|
907
|
+
super()
|
908
|
+
self[:s0] = s0
|
909
|
+
self[:s1] = s1
|
910
|
+
self[:s2] = s2
|
911
|
+
self[:s3] = s3
|
912
|
+
end
|
1108
913
|
end
|
1109
914
|
# Reads the s0 member
|
1110
915
|
def s0
|
@@ -1148,16 +953,20 @@ module OpenCL
|
|
1148
953
|
end
|
1149
954
|
end
|
1150
955
|
# Maps the cl_double4 type of OpenCL
|
1151
|
-
class Double4 <
|
1152
|
-
@size =
|
1153
|
-
@layout =
|
1154
|
-
# Creates a new Double4 with members set to 0 or to the user specified values
|
956
|
+
class Double4 < Struct
|
957
|
+
@size = OpenCL.find_type(:cl_double).size * 4
|
958
|
+
@layout = OpenCL::StructLayout::new([ OpenCL::StructLayout::Field::new( "s0", OpenCL.find_type(:cl_double).size * 0, OpenCL.find_type(:cl_double) ), OpenCL::StructLayout::Field::new( "s1", OpenCL.find_type(:cl_double).size * 1, OpenCL.find_type(:cl_double) ), OpenCL::StructLayout::Field::new( "s2", OpenCL.find_type(:cl_double).size * 2, OpenCL.find_type(:cl_double) ), OpenCL::StructLayout::Field::new( "s3", OpenCL.find_type(:cl_double).size * 3, OpenCL.find_type(:cl_double) ) ], OpenCL.find_type(:cl_double).size * 4, OpenCL.find_type(:cl_double).size * 4 )
|
959
|
+
# Creates a new Double4 with members set to 0 or to the user specified values. If a Pointer is passed as the first argument, Double4 maps the memory pointed.
|
1155
960
|
def initialize( s0 = 0.0, s1 = 0.0, s2 = 0.0, s3 = 0.0 )
|
1156
|
-
|
1157
|
-
|
1158
|
-
|
1159
|
-
|
1160
|
-
|
961
|
+
if s0.is_a?(FFI::Pointer) then
|
962
|
+
super(s0)
|
963
|
+
else
|
964
|
+
super()
|
965
|
+
self[:s0] = s0
|
966
|
+
self[:s1] = s1
|
967
|
+
self[:s2] = s2
|
968
|
+
self[:s3] = s3
|
969
|
+
end
|
1161
970
|
end
|
1162
971
|
# Reads the s0 member
|
1163
972
|
def s0
|
@@ -1201,16 +1010,20 @@ module OpenCL
|
|
1201
1010
|
end
|
1202
1011
|
end
|
1203
1012
|
# Maps the cl_half4 type of OpenCL
|
1204
|
-
class Half4 <
|
1205
|
-
@size =
|
1206
|
-
@layout =
|
1207
|
-
# Creates a new Half4 with members set to 0 or to the user specified values
|
1013
|
+
class Half4 < Struct
|
1014
|
+
@size = OpenCL.find_type(:cl_half).size * 4
|
1015
|
+
@layout = OpenCL::StructLayout::new([ OpenCL::StructLayout::Field::new( "s0", OpenCL.find_type(:cl_half).size * 0, OpenCL.find_type(:cl_half) ), OpenCL::StructLayout::Field::new( "s1", OpenCL.find_type(:cl_half).size * 1, OpenCL.find_type(:cl_half) ), OpenCL::StructLayout::Field::new( "s2", OpenCL.find_type(:cl_half).size * 2, OpenCL.find_type(:cl_half) ), OpenCL::StructLayout::Field::new( "s3", OpenCL.find_type(:cl_half).size * 3, OpenCL.find_type(:cl_half) ) ], OpenCL.find_type(:cl_half).size * 4, OpenCL.find_type(:cl_half).size * 4 )
|
1016
|
+
# Creates a new Half4 with members set to 0 or to the user specified values. If a Pointer is passed as the first argument, Half4 maps the memory pointed.
|
1208
1017
|
def initialize( s0 = 0.0, s1 = 0.0, s2 = 0.0, s3 = 0.0 )
|
1209
|
-
|
1210
|
-
|
1211
|
-
|
1212
|
-
|
1213
|
-
|
1018
|
+
if s0.is_a?(FFI::Pointer) then
|
1019
|
+
super(s0)
|
1020
|
+
else
|
1021
|
+
super()
|
1022
|
+
self[:s0] = s0
|
1023
|
+
self[:s1] = s1
|
1024
|
+
self[:s2] = s2
|
1025
|
+
self[:s3] = s3
|
1026
|
+
end
|
1214
1027
|
end
|
1215
1028
|
# Reads the s0 member
|
1216
1029
|
def s0
|
@@ -1254,20 +1067,24 @@ module OpenCL
|
|
1254
1067
|
end
|
1255
1068
|
end
|
1256
1069
|
# Maps the cl_char8 type of OpenCL
|
1257
|
-
class Char8 <
|
1258
|
-
@size =
|
1259
|
-
@layout =
|
1260
|
-
# Creates a new Char8 with members set to 0 or to the user specified values
|
1070
|
+
class Char8 < Struct
|
1071
|
+
@size = OpenCL.find_type(:cl_char).size * 8
|
1072
|
+
@layout = OpenCL::StructLayout::new([ OpenCL::StructLayout::Field::new( "s0", OpenCL.find_type(:cl_char).size * 0, OpenCL.find_type(:cl_char) ), OpenCL::StructLayout::Field::new( "s1", OpenCL.find_type(:cl_char).size * 1, OpenCL.find_type(:cl_char) ), OpenCL::StructLayout::Field::new( "s2", OpenCL.find_type(:cl_char).size * 2, OpenCL.find_type(:cl_char) ), OpenCL::StructLayout::Field::new( "s3", OpenCL.find_type(:cl_char).size * 3, OpenCL.find_type(:cl_char) ), OpenCL::StructLayout::Field::new( "s4", OpenCL.find_type(:cl_char).size * 4, OpenCL.find_type(:cl_char) ), OpenCL::StructLayout::Field::new( "s5", OpenCL.find_type(:cl_char).size * 5, OpenCL.find_type(:cl_char) ), OpenCL::StructLayout::Field::new( "s6", OpenCL.find_type(:cl_char).size * 6, OpenCL.find_type(:cl_char) ), OpenCL::StructLayout::Field::new( "s7", OpenCL.find_type(:cl_char).size * 7, OpenCL.find_type(:cl_char) ) ], OpenCL.find_type(:cl_char).size * 8, OpenCL.find_type(:cl_char).size * 8 )
|
1073
|
+
# Creates a new Char8 with members set to 0 or to the user specified values. If a Pointer is passed as the first argument, Char8 maps the memory pointed.
|
1261
1074
|
def initialize( s0 = 0, s1 = 0, s2 = 0, s3 = 0, s4 = 0, s5 = 0, s6 = 0, s7 = 0 )
|
1262
|
-
|
1263
|
-
|
1264
|
-
|
1265
|
-
|
1266
|
-
|
1267
|
-
|
1268
|
-
|
1269
|
-
|
1270
|
-
|
1075
|
+
if s0.is_a?(FFI::Pointer) then
|
1076
|
+
super(s0)
|
1077
|
+
else
|
1078
|
+
super()
|
1079
|
+
self[:s0] = s0
|
1080
|
+
self[:s1] = s1
|
1081
|
+
self[:s2] = s2
|
1082
|
+
self[:s3] = s3
|
1083
|
+
self[:s4] = s4
|
1084
|
+
self[:s5] = s5
|
1085
|
+
self[:s6] = s6
|
1086
|
+
self[:s7] = s7
|
1087
|
+
end
|
1271
1088
|
end
|
1272
1089
|
# Reads the s0 member
|
1273
1090
|
def s0
|
@@ -1343,20 +1160,24 @@ module OpenCL
|
|
1343
1160
|
end
|
1344
1161
|
end
|
1345
1162
|
# Maps the cl_uchar8 type of OpenCL
|
1346
|
-
class UChar8 <
|
1347
|
-
@size =
|
1348
|
-
@layout =
|
1349
|
-
# Creates a new UChar8 with members set to 0 or to the user specified values
|
1163
|
+
class UChar8 < Struct
|
1164
|
+
@size = OpenCL.find_type(:cl_uchar).size * 8
|
1165
|
+
@layout = OpenCL::StructLayout::new([ OpenCL::StructLayout::Field::new( "s0", OpenCL.find_type(:cl_uchar).size * 0, OpenCL.find_type(:cl_uchar) ), OpenCL::StructLayout::Field::new( "s1", OpenCL.find_type(:cl_uchar).size * 1, OpenCL.find_type(:cl_uchar) ), OpenCL::StructLayout::Field::new( "s2", OpenCL.find_type(:cl_uchar).size * 2, OpenCL.find_type(:cl_uchar) ), OpenCL::StructLayout::Field::new( "s3", OpenCL.find_type(:cl_uchar).size * 3, OpenCL.find_type(:cl_uchar) ), OpenCL::StructLayout::Field::new( "s4", OpenCL.find_type(:cl_uchar).size * 4, OpenCL.find_type(:cl_uchar) ), OpenCL::StructLayout::Field::new( "s5", OpenCL.find_type(:cl_uchar).size * 5, OpenCL.find_type(:cl_uchar) ), OpenCL::StructLayout::Field::new( "s6", OpenCL.find_type(:cl_uchar).size * 6, OpenCL.find_type(:cl_uchar) ), OpenCL::StructLayout::Field::new( "s7", OpenCL.find_type(:cl_uchar).size * 7, OpenCL.find_type(:cl_uchar) ) ], OpenCL.find_type(:cl_uchar).size * 8, OpenCL.find_type(:cl_uchar).size * 8 )
|
1166
|
+
# Creates a new UChar8 with members set to 0 or to the user specified values. If a Pointer is passed as the first argument, UChar8 maps the memory pointed.
|
1350
1167
|
def initialize( s0 = 0, s1 = 0, s2 = 0, s3 = 0, s4 = 0, s5 = 0, s6 = 0, s7 = 0 )
|
1351
|
-
|
1352
|
-
|
1353
|
-
|
1354
|
-
|
1355
|
-
|
1356
|
-
|
1357
|
-
|
1358
|
-
|
1359
|
-
|
1168
|
+
if s0.is_a?(FFI::Pointer) then
|
1169
|
+
super(s0)
|
1170
|
+
else
|
1171
|
+
super()
|
1172
|
+
self[:s0] = s0
|
1173
|
+
self[:s1] = s1
|
1174
|
+
self[:s2] = s2
|
1175
|
+
self[:s3] = s3
|
1176
|
+
self[:s4] = s4
|
1177
|
+
self[:s5] = s5
|
1178
|
+
self[:s6] = s6
|
1179
|
+
self[:s7] = s7
|
1180
|
+
end
|
1360
1181
|
end
|
1361
1182
|
# Reads the s0 member
|
1362
1183
|
def s0
|
@@ -1432,20 +1253,24 @@ module OpenCL
|
|
1432
1253
|
end
|
1433
1254
|
end
|
1434
1255
|
# Maps the cl_short8 type of OpenCL
|
1435
|
-
class Short8 <
|
1436
|
-
@size =
|
1437
|
-
@layout =
|
1438
|
-
# Creates a new Short8 with members set to 0 or to the user specified values
|
1256
|
+
class Short8 < Struct
|
1257
|
+
@size = OpenCL.find_type(:cl_short).size * 8
|
1258
|
+
@layout = OpenCL::StructLayout::new([ OpenCL::StructLayout::Field::new( "s0", OpenCL.find_type(:cl_short).size * 0, OpenCL.find_type(:cl_short) ), OpenCL::StructLayout::Field::new( "s1", OpenCL.find_type(:cl_short).size * 1, OpenCL.find_type(:cl_short) ), OpenCL::StructLayout::Field::new( "s2", OpenCL.find_type(:cl_short).size * 2, OpenCL.find_type(:cl_short) ), OpenCL::StructLayout::Field::new( "s3", OpenCL.find_type(:cl_short).size * 3, OpenCL.find_type(:cl_short) ), OpenCL::StructLayout::Field::new( "s4", OpenCL.find_type(:cl_short).size * 4, OpenCL.find_type(:cl_short) ), OpenCL::StructLayout::Field::new( "s5", OpenCL.find_type(:cl_short).size * 5, OpenCL.find_type(:cl_short) ), OpenCL::StructLayout::Field::new( "s6", OpenCL.find_type(:cl_short).size * 6, OpenCL.find_type(:cl_short) ), OpenCL::StructLayout::Field::new( "s7", OpenCL.find_type(:cl_short).size * 7, OpenCL.find_type(:cl_short) ) ], OpenCL.find_type(:cl_short).size * 8, OpenCL.find_type(:cl_short).size * 8 )
|
1259
|
+
# Creates a new Short8 with members set to 0 or to the user specified values. If a Pointer is passed as the first argument, Short8 maps the memory pointed.
|
1439
1260
|
def initialize( s0 = 0, s1 = 0, s2 = 0, s3 = 0, s4 = 0, s5 = 0, s6 = 0, s7 = 0 )
|
1440
|
-
|
1441
|
-
|
1442
|
-
|
1443
|
-
|
1444
|
-
|
1445
|
-
|
1446
|
-
|
1447
|
-
|
1448
|
-
|
1261
|
+
if s0.is_a?(FFI::Pointer) then
|
1262
|
+
super(s0)
|
1263
|
+
else
|
1264
|
+
super()
|
1265
|
+
self[:s0] = s0
|
1266
|
+
self[:s1] = s1
|
1267
|
+
self[:s2] = s2
|
1268
|
+
self[:s3] = s3
|
1269
|
+
self[:s4] = s4
|
1270
|
+
self[:s5] = s5
|
1271
|
+
self[:s6] = s6
|
1272
|
+
self[:s7] = s7
|
1273
|
+
end
|
1449
1274
|
end
|
1450
1275
|
# Reads the s0 member
|
1451
1276
|
def s0
|
@@ -1521,20 +1346,24 @@ module OpenCL
|
|
1521
1346
|
end
|
1522
1347
|
end
|
1523
1348
|
# Maps the cl_ushort8 type of OpenCL
|
1524
|
-
class UShort8 <
|
1525
|
-
@size =
|
1526
|
-
@layout =
|
1527
|
-
# Creates a new UShort8 with members set to 0 or to the user specified values
|
1349
|
+
class UShort8 < Struct
|
1350
|
+
@size = OpenCL.find_type(:cl_ushort).size * 8
|
1351
|
+
@layout = OpenCL::StructLayout::new([ OpenCL::StructLayout::Field::new( "s0", OpenCL.find_type(:cl_ushort).size * 0, OpenCL.find_type(:cl_ushort) ), OpenCL::StructLayout::Field::new( "s1", OpenCL.find_type(:cl_ushort).size * 1, OpenCL.find_type(:cl_ushort) ), OpenCL::StructLayout::Field::new( "s2", OpenCL.find_type(:cl_ushort).size * 2, OpenCL.find_type(:cl_ushort) ), OpenCL::StructLayout::Field::new( "s3", OpenCL.find_type(:cl_ushort).size * 3, OpenCL.find_type(:cl_ushort) ), OpenCL::StructLayout::Field::new( "s4", OpenCL.find_type(:cl_ushort).size * 4, OpenCL.find_type(:cl_ushort) ), OpenCL::StructLayout::Field::new( "s5", OpenCL.find_type(:cl_ushort).size * 5, OpenCL.find_type(:cl_ushort) ), OpenCL::StructLayout::Field::new( "s6", OpenCL.find_type(:cl_ushort).size * 6, OpenCL.find_type(:cl_ushort) ), OpenCL::StructLayout::Field::new( "s7", OpenCL.find_type(:cl_ushort).size * 7, OpenCL.find_type(:cl_ushort) ) ], OpenCL.find_type(:cl_ushort).size * 8, OpenCL.find_type(:cl_ushort).size * 8 )
|
1352
|
+
# Creates a new UShort8 with members set to 0 or to the user specified values. If a Pointer is passed as the first argument, UShort8 maps the memory pointed.
|
1528
1353
|
def initialize( s0 = 0, s1 = 0, s2 = 0, s3 = 0, s4 = 0, s5 = 0, s6 = 0, s7 = 0 )
|
1529
|
-
|
1530
|
-
|
1531
|
-
|
1532
|
-
|
1533
|
-
|
1534
|
-
|
1535
|
-
|
1536
|
-
|
1537
|
-
|
1354
|
+
if s0.is_a?(FFI::Pointer) then
|
1355
|
+
super(s0)
|
1356
|
+
else
|
1357
|
+
super()
|
1358
|
+
self[:s0] = s0
|
1359
|
+
self[:s1] = s1
|
1360
|
+
self[:s2] = s2
|
1361
|
+
self[:s3] = s3
|
1362
|
+
self[:s4] = s4
|
1363
|
+
self[:s5] = s5
|
1364
|
+
self[:s6] = s6
|
1365
|
+
self[:s7] = s7
|
1366
|
+
end
|
1538
1367
|
end
|
1539
1368
|
# Reads the s0 member
|
1540
1369
|
def s0
|
@@ -1610,20 +1439,24 @@ module OpenCL
|
|
1610
1439
|
end
|
1611
1440
|
end
|
1612
1441
|
# Maps the cl_int8 type of OpenCL
|
1613
|
-
class Int8 <
|
1614
|
-
@size =
|
1615
|
-
@layout =
|
1616
|
-
# Creates a new Int8 with members set to 0 or to the user specified values
|
1442
|
+
class Int8 < Struct
|
1443
|
+
@size = OpenCL.find_type(:cl_int).size * 8
|
1444
|
+
@layout = OpenCL::StructLayout::new([ OpenCL::StructLayout::Field::new( "s0", OpenCL.find_type(:cl_int).size * 0, OpenCL.find_type(:cl_int) ), OpenCL::StructLayout::Field::new( "s1", OpenCL.find_type(:cl_int).size * 1, OpenCL.find_type(:cl_int) ), OpenCL::StructLayout::Field::new( "s2", OpenCL.find_type(:cl_int).size * 2, OpenCL.find_type(:cl_int) ), OpenCL::StructLayout::Field::new( "s3", OpenCL.find_type(:cl_int).size * 3, OpenCL.find_type(:cl_int) ), OpenCL::StructLayout::Field::new( "s4", OpenCL.find_type(:cl_int).size * 4, OpenCL.find_type(:cl_int) ), OpenCL::StructLayout::Field::new( "s5", OpenCL.find_type(:cl_int).size * 5, OpenCL.find_type(:cl_int) ), OpenCL::StructLayout::Field::new( "s6", OpenCL.find_type(:cl_int).size * 6, OpenCL.find_type(:cl_int) ), OpenCL::StructLayout::Field::new( "s7", OpenCL.find_type(:cl_int).size * 7, OpenCL.find_type(:cl_int) ) ], OpenCL.find_type(:cl_int).size * 8, OpenCL.find_type(:cl_int).size * 8 )
|
1445
|
+
# Creates a new Int8 with members set to 0 or to the user specified values. If a Pointer is passed as the first argument, Int8 maps the memory pointed.
|
1617
1446
|
def initialize( s0 = 0, s1 = 0, s2 = 0, s3 = 0, s4 = 0, s5 = 0, s6 = 0, s7 = 0 )
|
1618
|
-
|
1619
|
-
|
1620
|
-
|
1621
|
-
|
1622
|
-
|
1623
|
-
|
1624
|
-
|
1625
|
-
|
1626
|
-
|
1447
|
+
if s0.is_a?(FFI::Pointer) then
|
1448
|
+
super(s0)
|
1449
|
+
else
|
1450
|
+
super()
|
1451
|
+
self[:s0] = s0
|
1452
|
+
self[:s1] = s1
|
1453
|
+
self[:s2] = s2
|
1454
|
+
self[:s3] = s3
|
1455
|
+
self[:s4] = s4
|
1456
|
+
self[:s5] = s5
|
1457
|
+
self[:s6] = s6
|
1458
|
+
self[:s7] = s7
|
1459
|
+
end
|
1627
1460
|
end
|
1628
1461
|
# Reads the s0 member
|
1629
1462
|
def s0
|
@@ -1699,20 +1532,24 @@ module OpenCL
|
|
1699
1532
|
end
|
1700
1533
|
end
|
1701
1534
|
# Maps the cl_uint8 type of OpenCL
|
1702
|
-
class UInt8 <
|
1703
|
-
@size =
|
1704
|
-
@layout =
|
1705
|
-
# Creates a new UInt8 with members set to 0 or to the user specified values
|
1535
|
+
class UInt8 < Struct
|
1536
|
+
@size = OpenCL.find_type(:cl_uint).size * 8
|
1537
|
+
@layout = OpenCL::StructLayout::new([ OpenCL::StructLayout::Field::new( "s0", OpenCL.find_type(:cl_uint).size * 0, OpenCL.find_type(:cl_uint) ), OpenCL::StructLayout::Field::new( "s1", OpenCL.find_type(:cl_uint).size * 1, OpenCL.find_type(:cl_uint) ), OpenCL::StructLayout::Field::new( "s2", OpenCL.find_type(:cl_uint).size * 2, OpenCL.find_type(:cl_uint) ), OpenCL::StructLayout::Field::new( "s3", OpenCL.find_type(:cl_uint).size * 3, OpenCL.find_type(:cl_uint) ), OpenCL::StructLayout::Field::new( "s4", OpenCL.find_type(:cl_uint).size * 4, OpenCL.find_type(:cl_uint) ), OpenCL::StructLayout::Field::new( "s5", OpenCL.find_type(:cl_uint).size * 5, OpenCL.find_type(:cl_uint) ), OpenCL::StructLayout::Field::new( "s6", OpenCL.find_type(:cl_uint).size * 6, OpenCL.find_type(:cl_uint) ), OpenCL::StructLayout::Field::new( "s7", OpenCL.find_type(:cl_uint).size * 7, OpenCL.find_type(:cl_uint) ) ], OpenCL.find_type(:cl_uint).size * 8, OpenCL.find_type(:cl_uint).size * 8 )
|
1538
|
+
# Creates a new UInt8 with members set to 0 or to the user specified values. If a Pointer is passed as the first argument, UInt8 maps the memory pointed.
|
1706
1539
|
def initialize( s0 = 0, s1 = 0, s2 = 0, s3 = 0, s4 = 0, s5 = 0, s6 = 0, s7 = 0 )
|
1707
|
-
|
1708
|
-
|
1709
|
-
|
1710
|
-
|
1711
|
-
|
1712
|
-
|
1713
|
-
|
1714
|
-
|
1715
|
-
|
1540
|
+
if s0.is_a?(FFI::Pointer) then
|
1541
|
+
super(s0)
|
1542
|
+
else
|
1543
|
+
super()
|
1544
|
+
self[:s0] = s0
|
1545
|
+
self[:s1] = s1
|
1546
|
+
self[:s2] = s2
|
1547
|
+
self[:s3] = s3
|
1548
|
+
self[:s4] = s4
|
1549
|
+
self[:s5] = s5
|
1550
|
+
self[:s6] = s6
|
1551
|
+
self[:s7] = s7
|
1552
|
+
end
|
1716
1553
|
end
|
1717
1554
|
# Reads the s0 member
|
1718
1555
|
def s0
|
@@ -1788,20 +1625,24 @@ module OpenCL
|
|
1788
1625
|
end
|
1789
1626
|
end
|
1790
1627
|
# Maps the cl_long8 type of OpenCL
|
1791
|
-
class Long8 <
|
1792
|
-
@size =
|
1793
|
-
@layout =
|
1794
|
-
# Creates a new Long8 with members set to 0 or to the user specified values
|
1628
|
+
class Long8 < Struct
|
1629
|
+
@size = OpenCL.find_type(:cl_long).size * 8
|
1630
|
+
@layout = OpenCL::StructLayout::new([ OpenCL::StructLayout::Field::new( "s0", OpenCL.find_type(:cl_long).size * 0, OpenCL.find_type(:cl_long) ), OpenCL::StructLayout::Field::new( "s1", OpenCL.find_type(:cl_long).size * 1, OpenCL.find_type(:cl_long) ), OpenCL::StructLayout::Field::new( "s2", OpenCL.find_type(:cl_long).size * 2, OpenCL.find_type(:cl_long) ), OpenCL::StructLayout::Field::new( "s3", OpenCL.find_type(:cl_long).size * 3, OpenCL.find_type(:cl_long) ), OpenCL::StructLayout::Field::new( "s4", OpenCL.find_type(:cl_long).size * 4, OpenCL.find_type(:cl_long) ), OpenCL::StructLayout::Field::new( "s5", OpenCL.find_type(:cl_long).size * 5, OpenCL.find_type(:cl_long) ), OpenCL::StructLayout::Field::new( "s6", OpenCL.find_type(:cl_long).size * 6, OpenCL.find_type(:cl_long) ), OpenCL::StructLayout::Field::new( "s7", OpenCL.find_type(:cl_long).size * 7, OpenCL.find_type(:cl_long) ) ], OpenCL.find_type(:cl_long).size * 8, OpenCL.find_type(:cl_long).size * 8 )
|
1631
|
+
# Creates a new Long8 with members set to 0 or to the user specified values. If a Pointer is passed as the first argument, Long8 maps the memory pointed.
|
1795
1632
|
def initialize( s0 = 0, s1 = 0, s2 = 0, s3 = 0, s4 = 0, s5 = 0, s6 = 0, s7 = 0 )
|
1796
|
-
|
1797
|
-
|
1798
|
-
|
1799
|
-
|
1800
|
-
|
1801
|
-
|
1802
|
-
|
1803
|
-
|
1804
|
-
|
1633
|
+
if s0.is_a?(FFI::Pointer) then
|
1634
|
+
super(s0)
|
1635
|
+
else
|
1636
|
+
super()
|
1637
|
+
self[:s0] = s0
|
1638
|
+
self[:s1] = s1
|
1639
|
+
self[:s2] = s2
|
1640
|
+
self[:s3] = s3
|
1641
|
+
self[:s4] = s4
|
1642
|
+
self[:s5] = s5
|
1643
|
+
self[:s6] = s6
|
1644
|
+
self[:s7] = s7
|
1645
|
+
end
|
1805
1646
|
end
|
1806
1647
|
# Reads the s0 member
|
1807
1648
|
def s0
|
@@ -1877,20 +1718,24 @@ module OpenCL
|
|
1877
1718
|
end
|
1878
1719
|
end
|
1879
1720
|
# Maps the cl_ulong8 type of OpenCL
|
1880
|
-
class ULong8 <
|
1881
|
-
@size =
|
1882
|
-
@layout =
|
1883
|
-
# Creates a new ULong8 with members set to 0 or to the user specified values
|
1721
|
+
class ULong8 < Struct
|
1722
|
+
@size = OpenCL.find_type(:cl_ulong).size * 8
|
1723
|
+
@layout = OpenCL::StructLayout::new([ OpenCL::StructLayout::Field::new( "s0", OpenCL.find_type(:cl_ulong).size * 0, OpenCL.find_type(:cl_ulong) ), OpenCL::StructLayout::Field::new( "s1", OpenCL.find_type(:cl_ulong).size * 1, OpenCL.find_type(:cl_ulong) ), OpenCL::StructLayout::Field::new( "s2", OpenCL.find_type(:cl_ulong).size * 2, OpenCL.find_type(:cl_ulong) ), OpenCL::StructLayout::Field::new( "s3", OpenCL.find_type(:cl_ulong).size * 3, OpenCL.find_type(:cl_ulong) ), OpenCL::StructLayout::Field::new( "s4", OpenCL.find_type(:cl_ulong).size * 4, OpenCL.find_type(:cl_ulong) ), OpenCL::StructLayout::Field::new( "s5", OpenCL.find_type(:cl_ulong).size * 5, OpenCL.find_type(:cl_ulong) ), OpenCL::StructLayout::Field::new( "s6", OpenCL.find_type(:cl_ulong).size * 6, OpenCL.find_type(:cl_ulong) ), OpenCL::StructLayout::Field::new( "s7", OpenCL.find_type(:cl_ulong).size * 7, OpenCL.find_type(:cl_ulong) ) ], OpenCL.find_type(:cl_ulong).size * 8, OpenCL.find_type(:cl_ulong).size * 8 )
|
1724
|
+
# Creates a new ULong8 with members set to 0 or to the user specified values. If a Pointer is passed as the first argument, ULong8 maps the memory pointed.
|
1884
1725
|
def initialize( s0 = 0, s1 = 0, s2 = 0, s3 = 0, s4 = 0, s5 = 0, s6 = 0, s7 = 0 )
|
1885
|
-
|
1886
|
-
|
1887
|
-
|
1888
|
-
|
1889
|
-
|
1890
|
-
|
1891
|
-
|
1892
|
-
|
1893
|
-
|
1726
|
+
if s0.is_a?(FFI::Pointer) then
|
1727
|
+
super(s0)
|
1728
|
+
else
|
1729
|
+
super()
|
1730
|
+
self[:s0] = s0
|
1731
|
+
self[:s1] = s1
|
1732
|
+
self[:s2] = s2
|
1733
|
+
self[:s3] = s3
|
1734
|
+
self[:s4] = s4
|
1735
|
+
self[:s5] = s5
|
1736
|
+
self[:s6] = s6
|
1737
|
+
self[:s7] = s7
|
1738
|
+
end
|
1894
1739
|
end
|
1895
1740
|
# Reads the s0 member
|
1896
1741
|
def s0
|
@@ -1966,20 +1811,24 @@ module OpenCL
|
|
1966
1811
|
end
|
1967
1812
|
end
|
1968
1813
|
# Maps the cl_float8 type of OpenCL
|
1969
|
-
class Float8 <
|
1970
|
-
@size =
|
1971
|
-
@layout =
|
1972
|
-
# Creates a new Float8 with members set to 0 or to the user specified values
|
1814
|
+
class Float8 < Struct
|
1815
|
+
@size = OpenCL.find_type(:cl_float).size * 8
|
1816
|
+
@layout = OpenCL::StructLayout::new([ OpenCL::StructLayout::Field::new( "s0", OpenCL.find_type(:cl_float).size * 0, OpenCL.find_type(:cl_float) ), OpenCL::StructLayout::Field::new( "s1", OpenCL.find_type(:cl_float).size * 1, OpenCL.find_type(:cl_float) ), OpenCL::StructLayout::Field::new( "s2", OpenCL.find_type(:cl_float).size * 2, OpenCL.find_type(:cl_float) ), OpenCL::StructLayout::Field::new( "s3", OpenCL.find_type(:cl_float).size * 3, OpenCL.find_type(:cl_float) ), OpenCL::StructLayout::Field::new( "s4", OpenCL.find_type(:cl_float).size * 4, OpenCL.find_type(:cl_float) ), OpenCL::StructLayout::Field::new( "s5", OpenCL.find_type(:cl_float).size * 5, OpenCL.find_type(:cl_float) ), OpenCL::StructLayout::Field::new( "s6", OpenCL.find_type(:cl_float).size * 6, OpenCL.find_type(:cl_float) ), OpenCL::StructLayout::Field::new( "s7", OpenCL.find_type(:cl_float).size * 7, OpenCL.find_type(:cl_float) ) ], OpenCL.find_type(:cl_float).size * 8, OpenCL.find_type(:cl_float).size * 8 )
|
1817
|
+
# Creates a new Float8 with members set to 0 or to the user specified values. If a Pointer is passed as the first argument, Float8 maps the memory pointed.
|
1973
1818
|
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 )
|
1974
|
-
|
1975
|
-
|
1976
|
-
|
1977
|
-
|
1978
|
-
|
1979
|
-
|
1980
|
-
|
1981
|
-
|
1982
|
-
|
1819
|
+
if s0.is_a?(FFI::Pointer) then
|
1820
|
+
super(s0)
|
1821
|
+
else
|
1822
|
+
super()
|
1823
|
+
self[:s0] = s0
|
1824
|
+
self[:s1] = s1
|
1825
|
+
self[:s2] = s2
|
1826
|
+
self[:s3] = s3
|
1827
|
+
self[:s4] = s4
|
1828
|
+
self[:s5] = s5
|
1829
|
+
self[:s6] = s6
|
1830
|
+
self[:s7] = s7
|
1831
|
+
end
|
1983
1832
|
end
|
1984
1833
|
# Reads the s0 member
|
1985
1834
|
def s0
|
@@ -2055,20 +1904,24 @@ module OpenCL
|
|
2055
1904
|
end
|
2056
1905
|
end
|
2057
1906
|
# Maps the cl_double8 type of OpenCL
|
2058
|
-
class Double8 <
|
2059
|
-
@size =
|
2060
|
-
@layout =
|
2061
|
-
# Creates a new Double8 with members set to 0 or to the user specified values
|
1907
|
+
class Double8 < Struct
|
1908
|
+
@size = OpenCL.find_type(:cl_double).size * 8
|
1909
|
+
@layout = OpenCL::StructLayout::new([ OpenCL::StructLayout::Field::new( "s0", OpenCL.find_type(:cl_double).size * 0, OpenCL.find_type(:cl_double) ), OpenCL::StructLayout::Field::new( "s1", OpenCL.find_type(:cl_double).size * 1, OpenCL.find_type(:cl_double) ), OpenCL::StructLayout::Field::new( "s2", OpenCL.find_type(:cl_double).size * 2, OpenCL.find_type(:cl_double) ), OpenCL::StructLayout::Field::new( "s3", OpenCL.find_type(:cl_double).size * 3, OpenCL.find_type(:cl_double) ), OpenCL::StructLayout::Field::new( "s4", OpenCL.find_type(:cl_double).size * 4, OpenCL.find_type(:cl_double) ), OpenCL::StructLayout::Field::new( "s5", OpenCL.find_type(:cl_double).size * 5, OpenCL.find_type(:cl_double) ), OpenCL::StructLayout::Field::new( "s6", OpenCL.find_type(:cl_double).size * 6, OpenCL.find_type(:cl_double) ), OpenCL::StructLayout::Field::new( "s7", OpenCL.find_type(:cl_double).size * 7, OpenCL.find_type(:cl_double) ) ], OpenCL.find_type(:cl_double).size * 8, OpenCL.find_type(:cl_double).size * 8 )
|
1910
|
+
# Creates a new Double8 with members set to 0 or to the user specified values. If a Pointer is passed as the first argument, Double8 maps the memory pointed.
|
2062
1911
|
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 )
|
2063
|
-
|
2064
|
-
|
2065
|
-
|
2066
|
-
|
2067
|
-
|
2068
|
-
|
2069
|
-
|
2070
|
-
|
2071
|
-
|
1912
|
+
if s0.is_a?(FFI::Pointer) then
|
1913
|
+
super(s0)
|
1914
|
+
else
|
1915
|
+
super()
|
1916
|
+
self[:s0] = s0
|
1917
|
+
self[:s1] = s1
|
1918
|
+
self[:s2] = s2
|
1919
|
+
self[:s3] = s3
|
1920
|
+
self[:s4] = s4
|
1921
|
+
self[:s5] = s5
|
1922
|
+
self[:s6] = s6
|
1923
|
+
self[:s7] = s7
|
1924
|
+
end
|
2072
1925
|
end
|
2073
1926
|
# Reads the s0 member
|
2074
1927
|
def s0
|
@@ -2144,20 +1997,24 @@ module OpenCL
|
|
2144
1997
|
end
|
2145
1998
|
end
|
2146
1999
|
# Maps the cl_half8 type of OpenCL
|
2147
|
-
class Half8 <
|
2148
|
-
@size =
|
2149
|
-
@layout =
|
2150
|
-
# Creates a new Half8 with members set to 0 or to the user specified values
|
2000
|
+
class Half8 < Struct
|
2001
|
+
@size = OpenCL.find_type(:cl_half).size * 8
|
2002
|
+
@layout = OpenCL::StructLayout::new([ OpenCL::StructLayout::Field::new( "s0", OpenCL.find_type(:cl_half).size * 0, OpenCL.find_type(:cl_half) ), OpenCL::StructLayout::Field::new( "s1", OpenCL.find_type(:cl_half).size * 1, OpenCL.find_type(:cl_half) ), OpenCL::StructLayout::Field::new( "s2", OpenCL.find_type(:cl_half).size * 2, OpenCL.find_type(:cl_half) ), OpenCL::StructLayout::Field::new( "s3", OpenCL.find_type(:cl_half).size * 3, OpenCL.find_type(:cl_half) ), OpenCL::StructLayout::Field::new( "s4", OpenCL.find_type(:cl_half).size * 4, OpenCL.find_type(:cl_half) ), OpenCL::StructLayout::Field::new( "s5", OpenCL.find_type(:cl_half).size * 5, OpenCL.find_type(:cl_half) ), OpenCL::StructLayout::Field::new( "s6", OpenCL.find_type(:cl_half).size * 6, OpenCL.find_type(:cl_half) ), OpenCL::StructLayout::Field::new( "s7", OpenCL.find_type(:cl_half).size * 7, OpenCL.find_type(:cl_half) ) ], OpenCL.find_type(:cl_half).size * 8, OpenCL.find_type(:cl_half).size * 8 )
|
2003
|
+
# Creates a new Half8 with members set to 0 or to the user specified values. If a Pointer is passed as the first argument, Half8 maps the memory pointed.
|
2151
2004
|
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 )
|
2152
|
-
|
2153
|
-
|
2154
|
-
|
2155
|
-
|
2156
|
-
|
2157
|
-
|
2158
|
-
|
2159
|
-
|
2160
|
-
|
2005
|
+
if s0.is_a?(FFI::Pointer) then
|
2006
|
+
super(s0)
|
2007
|
+
else
|
2008
|
+
super()
|
2009
|
+
self[:s0] = s0
|
2010
|
+
self[:s1] = s1
|
2011
|
+
self[:s2] = s2
|
2012
|
+
self[:s3] = s3
|
2013
|
+
self[:s4] = s4
|
2014
|
+
self[:s5] = s5
|
2015
|
+
self[:s6] = s6
|
2016
|
+
self[:s7] = s7
|
2017
|
+
end
|
2161
2018
|
end
|
2162
2019
|
# Reads the s0 member
|
2163
2020
|
def s0
|
@@ -2233,28 +2090,32 @@ module OpenCL
|
|
2233
2090
|
end
|
2234
2091
|
end
|
2235
2092
|
# Maps the cl_char16 type of OpenCL
|
2236
|
-
class Char16 <
|
2237
|
-
@size =
|
2238
|
-
@layout =
|
2239
|
-
# Creates a new Char16 with members set to 0 or to the user specified values
|
2093
|
+
class Char16 < Struct
|
2094
|
+
@size = OpenCL.find_type(:cl_char).size * 16
|
2095
|
+
@layout = OpenCL::StructLayout::new([ OpenCL::StructLayout::Field::new( "s0", OpenCL.find_type(:cl_char).size * 0, OpenCL.find_type(:cl_char) ), OpenCL::StructLayout::Field::new( "s1", OpenCL.find_type(:cl_char).size * 1, OpenCL.find_type(:cl_char) ), OpenCL::StructLayout::Field::new( "s2", OpenCL.find_type(:cl_char).size * 2, OpenCL.find_type(:cl_char) ), OpenCL::StructLayout::Field::new( "s3", OpenCL.find_type(:cl_char).size * 3, OpenCL.find_type(:cl_char) ), OpenCL::StructLayout::Field::new( "s4", OpenCL.find_type(:cl_char).size * 4, OpenCL.find_type(:cl_char) ), OpenCL::StructLayout::Field::new( "s5", OpenCL.find_type(:cl_char).size * 5, OpenCL.find_type(:cl_char) ), OpenCL::StructLayout::Field::new( "s6", OpenCL.find_type(:cl_char).size * 6, OpenCL.find_type(:cl_char) ), OpenCL::StructLayout::Field::new( "s7", OpenCL.find_type(:cl_char).size * 7, OpenCL.find_type(:cl_char) ), OpenCL::StructLayout::Field::new( "s8", OpenCL.find_type(:cl_char).size * 8, OpenCL.find_type(:cl_char) ), OpenCL::StructLayout::Field::new( "s9", OpenCL.find_type(:cl_char).size * 9, OpenCL.find_type(:cl_char) ), OpenCL::StructLayout::Field::new( "sa", OpenCL.find_type(:cl_char).size * 10, OpenCL.find_type(:cl_char) ), OpenCL::StructLayout::Field::new( "sb", OpenCL.find_type(:cl_char).size * 11, OpenCL.find_type(:cl_char) ), OpenCL::StructLayout::Field::new( "sc", OpenCL.find_type(:cl_char).size * 12, OpenCL.find_type(:cl_char) ), OpenCL::StructLayout::Field::new( "sd", OpenCL.find_type(:cl_char).size * 13, OpenCL.find_type(:cl_char) ), OpenCL::StructLayout::Field::new( "se", OpenCL.find_type(:cl_char).size * 14, OpenCL.find_type(:cl_char) ), OpenCL::StructLayout::Field::new( "sf", OpenCL.find_type(:cl_char).size * 15, OpenCL.find_type(:cl_char) ) ], OpenCL.find_type(:cl_char).size * 16, OpenCL.find_type(:cl_char).size * 16 )
|
2096
|
+
# Creates a new Char16 with members set to 0 or to the user specified values. If a Pointer is passed as the first argument, Char16 maps the memory pointed.
|
2240
2097
|
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 )
|
2241
|
-
|
2242
|
-
|
2243
|
-
|
2244
|
-
|
2245
|
-
|
2246
|
-
|
2247
|
-
|
2248
|
-
|
2249
|
-
|
2250
|
-
|
2251
|
-
|
2252
|
-
|
2253
|
-
|
2254
|
-
|
2255
|
-
|
2256
|
-
|
2257
|
-
|
2098
|
+
if s0.is_a?(FFI::Pointer) then
|
2099
|
+
super(s0)
|
2100
|
+
else
|
2101
|
+
super()
|
2102
|
+
self[:s0] = s0
|
2103
|
+
self[:s1] = s1
|
2104
|
+
self[:s2] = s2
|
2105
|
+
self[:s3] = s3
|
2106
|
+
self[:s4] = s4
|
2107
|
+
self[:s5] = s5
|
2108
|
+
self[:s6] = s6
|
2109
|
+
self[:s7] = s7
|
2110
|
+
self[:s8] = s8
|
2111
|
+
self[:s9] = s9
|
2112
|
+
self[:sa] = sa
|
2113
|
+
self[:sb] = sb
|
2114
|
+
self[:sc] = sc
|
2115
|
+
self[:sd] = sd
|
2116
|
+
self[:se] = se
|
2117
|
+
self[:sf] = sf
|
2118
|
+
end
|
2258
2119
|
end
|
2259
2120
|
# Reads the s0 member
|
2260
2121
|
def s0
|
@@ -2394,28 +2255,32 @@ module OpenCL
|
|
2394
2255
|
end
|
2395
2256
|
end
|
2396
2257
|
# Maps the cl_uchar16 type of OpenCL
|
2397
|
-
class UChar16 <
|
2398
|
-
@size =
|
2399
|
-
@layout =
|
2400
|
-
# Creates a new UChar16 with members set to 0 or to the user specified values
|
2258
|
+
class UChar16 < Struct
|
2259
|
+
@size = OpenCL.find_type(:cl_uchar).size * 16
|
2260
|
+
@layout = OpenCL::StructLayout::new([ OpenCL::StructLayout::Field::new( "s0", OpenCL.find_type(:cl_uchar).size * 0, OpenCL.find_type(:cl_uchar) ), OpenCL::StructLayout::Field::new( "s1", OpenCL.find_type(:cl_uchar).size * 1, OpenCL.find_type(:cl_uchar) ), OpenCL::StructLayout::Field::new( "s2", OpenCL.find_type(:cl_uchar).size * 2, OpenCL.find_type(:cl_uchar) ), OpenCL::StructLayout::Field::new( "s3", OpenCL.find_type(:cl_uchar).size * 3, OpenCL.find_type(:cl_uchar) ), OpenCL::StructLayout::Field::new( "s4", OpenCL.find_type(:cl_uchar).size * 4, OpenCL.find_type(:cl_uchar) ), OpenCL::StructLayout::Field::new( "s5", OpenCL.find_type(:cl_uchar).size * 5, OpenCL.find_type(:cl_uchar) ), OpenCL::StructLayout::Field::new( "s6", OpenCL.find_type(:cl_uchar).size * 6, OpenCL.find_type(:cl_uchar) ), OpenCL::StructLayout::Field::new( "s7", OpenCL.find_type(:cl_uchar).size * 7, OpenCL.find_type(:cl_uchar) ), OpenCL::StructLayout::Field::new( "s8", OpenCL.find_type(:cl_uchar).size * 8, OpenCL.find_type(:cl_uchar) ), OpenCL::StructLayout::Field::new( "s9", OpenCL.find_type(:cl_uchar).size * 9, OpenCL.find_type(:cl_uchar) ), OpenCL::StructLayout::Field::new( "sa", OpenCL.find_type(:cl_uchar).size * 10, OpenCL.find_type(:cl_uchar) ), OpenCL::StructLayout::Field::new( "sb", OpenCL.find_type(:cl_uchar).size * 11, OpenCL.find_type(:cl_uchar) ), OpenCL::StructLayout::Field::new( "sc", OpenCL.find_type(:cl_uchar).size * 12, OpenCL.find_type(:cl_uchar) ), OpenCL::StructLayout::Field::new( "sd", OpenCL.find_type(:cl_uchar).size * 13, OpenCL.find_type(:cl_uchar) ), OpenCL::StructLayout::Field::new( "se", OpenCL.find_type(:cl_uchar).size * 14, OpenCL.find_type(:cl_uchar) ), OpenCL::StructLayout::Field::new( "sf", OpenCL.find_type(:cl_uchar).size * 15, OpenCL.find_type(:cl_uchar) ) ], OpenCL.find_type(:cl_uchar).size * 16, OpenCL.find_type(:cl_uchar).size * 16 )
|
2261
|
+
# Creates a new UChar16 with members set to 0 or to the user specified values. If a Pointer is passed as the first argument, UChar16 maps the memory pointed.
|
2401
2262
|
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 )
|
2402
|
-
|
2403
|
-
|
2404
|
-
|
2405
|
-
|
2406
|
-
|
2407
|
-
|
2408
|
-
|
2409
|
-
|
2410
|
-
|
2411
|
-
|
2412
|
-
|
2413
|
-
|
2414
|
-
|
2415
|
-
|
2416
|
-
|
2417
|
-
|
2418
|
-
|
2263
|
+
if s0.is_a?(FFI::Pointer) then
|
2264
|
+
super(s0)
|
2265
|
+
else
|
2266
|
+
super()
|
2267
|
+
self[:s0] = s0
|
2268
|
+
self[:s1] = s1
|
2269
|
+
self[:s2] = s2
|
2270
|
+
self[:s3] = s3
|
2271
|
+
self[:s4] = s4
|
2272
|
+
self[:s5] = s5
|
2273
|
+
self[:s6] = s6
|
2274
|
+
self[:s7] = s7
|
2275
|
+
self[:s8] = s8
|
2276
|
+
self[:s9] = s9
|
2277
|
+
self[:sa] = sa
|
2278
|
+
self[:sb] = sb
|
2279
|
+
self[:sc] = sc
|
2280
|
+
self[:sd] = sd
|
2281
|
+
self[:se] = se
|
2282
|
+
self[:sf] = sf
|
2283
|
+
end
|
2419
2284
|
end
|
2420
2285
|
# Reads the s0 member
|
2421
2286
|
def s0
|
@@ -2555,28 +2420,32 @@ module OpenCL
|
|
2555
2420
|
end
|
2556
2421
|
end
|
2557
2422
|
# Maps the cl_short16 type of OpenCL
|
2558
|
-
class Short16 <
|
2559
|
-
@size =
|
2560
|
-
@layout =
|
2561
|
-
# Creates a new Short16 with members set to 0 or to the user specified values
|
2423
|
+
class Short16 < Struct
|
2424
|
+
@size = OpenCL.find_type(:cl_short).size * 16
|
2425
|
+
@layout = OpenCL::StructLayout::new([ OpenCL::StructLayout::Field::new( "s0", OpenCL.find_type(:cl_short).size * 0, OpenCL.find_type(:cl_short) ), OpenCL::StructLayout::Field::new( "s1", OpenCL.find_type(:cl_short).size * 1, OpenCL.find_type(:cl_short) ), OpenCL::StructLayout::Field::new( "s2", OpenCL.find_type(:cl_short).size * 2, OpenCL.find_type(:cl_short) ), OpenCL::StructLayout::Field::new( "s3", OpenCL.find_type(:cl_short).size * 3, OpenCL.find_type(:cl_short) ), OpenCL::StructLayout::Field::new( "s4", OpenCL.find_type(:cl_short).size * 4, OpenCL.find_type(:cl_short) ), OpenCL::StructLayout::Field::new( "s5", OpenCL.find_type(:cl_short).size * 5, OpenCL.find_type(:cl_short) ), OpenCL::StructLayout::Field::new( "s6", OpenCL.find_type(:cl_short).size * 6, OpenCL.find_type(:cl_short) ), OpenCL::StructLayout::Field::new( "s7", OpenCL.find_type(:cl_short).size * 7, OpenCL.find_type(:cl_short) ), OpenCL::StructLayout::Field::new( "s8", OpenCL.find_type(:cl_short).size * 8, OpenCL.find_type(:cl_short) ), OpenCL::StructLayout::Field::new( "s9", OpenCL.find_type(:cl_short).size * 9, OpenCL.find_type(:cl_short) ), OpenCL::StructLayout::Field::new( "sa", OpenCL.find_type(:cl_short).size * 10, OpenCL.find_type(:cl_short) ), OpenCL::StructLayout::Field::new( "sb", OpenCL.find_type(:cl_short).size * 11, OpenCL.find_type(:cl_short) ), OpenCL::StructLayout::Field::new( "sc", OpenCL.find_type(:cl_short).size * 12, OpenCL.find_type(:cl_short) ), OpenCL::StructLayout::Field::new( "sd", OpenCL.find_type(:cl_short).size * 13, OpenCL.find_type(:cl_short) ), OpenCL::StructLayout::Field::new( "se", OpenCL.find_type(:cl_short).size * 14, OpenCL.find_type(:cl_short) ), OpenCL::StructLayout::Field::new( "sf", OpenCL.find_type(:cl_short).size * 15, OpenCL.find_type(:cl_short) ) ], OpenCL.find_type(:cl_short).size * 16, OpenCL.find_type(:cl_short).size * 16 )
|
2426
|
+
# Creates a new Short16 with members set to 0 or to the user specified values. If a Pointer is passed as the first argument, Short16 maps the memory pointed.
|
2562
2427
|
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 )
|
2563
|
-
|
2564
|
-
|
2565
|
-
|
2566
|
-
|
2567
|
-
|
2568
|
-
|
2569
|
-
|
2570
|
-
|
2571
|
-
|
2572
|
-
|
2573
|
-
|
2574
|
-
|
2575
|
-
|
2576
|
-
|
2577
|
-
|
2578
|
-
|
2579
|
-
|
2428
|
+
if s0.is_a?(FFI::Pointer) then
|
2429
|
+
super(s0)
|
2430
|
+
else
|
2431
|
+
super()
|
2432
|
+
self[:s0] = s0
|
2433
|
+
self[:s1] = s1
|
2434
|
+
self[:s2] = s2
|
2435
|
+
self[:s3] = s3
|
2436
|
+
self[:s4] = s4
|
2437
|
+
self[:s5] = s5
|
2438
|
+
self[:s6] = s6
|
2439
|
+
self[:s7] = s7
|
2440
|
+
self[:s8] = s8
|
2441
|
+
self[:s9] = s9
|
2442
|
+
self[:sa] = sa
|
2443
|
+
self[:sb] = sb
|
2444
|
+
self[:sc] = sc
|
2445
|
+
self[:sd] = sd
|
2446
|
+
self[:se] = se
|
2447
|
+
self[:sf] = sf
|
2448
|
+
end
|
2580
2449
|
end
|
2581
2450
|
# Reads the s0 member
|
2582
2451
|
def s0
|
@@ -2716,28 +2585,32 @@ module OpenCL
|
|
2716
2585
|
end
|
2717
2586
|
end
|
2718
2587
|
# Maps the cl_ushort16 type of OpenCL
|
2719
|
-
class UShort16 <
|
2720
|
-
@size =
|
2721
|
-
@layout =
|
2722
|
-
# Creates a new UShort16 with members set to 0 or to the user specified values
|
2588
|
+
class UShort16 < Struct
|
2589
|
+
@size = OpenCL.find_type(:cl_ushort).size * 16
|
2590
|
+
@layout = OpenCL::StructLayout::new([ OpenCL::StructLayout::Field::new( "s0", OpenCL.find_type(:cl_ushort).size * 0, OpenCL.find_type(:cl_ushort) ), OpenCL::StructLayout::Field::new( "s1", OpenCL.find_type(:cl_ushort).size * 1, OpenCL.find_type(:cl_ushort) ), OpenCL::StructLayout::Field::new( "s2", OpenCL.find_type(:cl_ushort).size * 2, OpenCL.find_type(:cl_ushort) ), OpenCL::StructLayout::Field::new( "s3", OpenCL.find_type(:cl_ushort).size * 3, OpenCL.find_type(:cl_ushort) ), OpenCL::StructLayout::Field::new( "s4", OpenCL.find_type(:cl_ushort).size * 4, OpenCL.find_type(:cl_ushort) ), OpenCL::StructLayout::Field::new( "s5", OpenCL.find_type(:cl_ushort).size * 5, OpenCL.find_type(:cl_ushort) ), OpenCL::StructLayout::Field::new( "s6", OpenCL.find_type(:cl_ushort).size * 6, OpenCL.find_type(:cl_ushort) ), OpenCL::StructLayout::Field::new( "s7", OpenCL.find_type(:cl_ushort).size * 7, OpenCL.find_type(:cl_ushort) ), OpenCL::StructLayout::Field::new( "s8", OpenCL.find_type(:cl_ushort).size * 8, OpenCL.find_type(:cl_ushort) ), OpenCL::StructLayout::Field::new( "s9", OpenCL.find_type(:cl_ushort).size * 9, OpenCL.find_type(:cl_ushort) ), OpenCL::StructLayout::Field::new( "sa", OpenCL.find_type(:cl_ushort).size * 10, OpenCL.find_type(:cl_ushort) ), OpenCL::StructLayout::Field::new( "sb", OpenCL.find_type(:cl_ushort).size * 11, OpenCL.find_type(:cl_ushort) ), OpenCL::StructLayout::Field::new( "sc", OpenCL.find_type(:cl_ushort).size * 12, OpenCL.find_type(:cl_ushort) ), OpenCL::StructLayout::Field::new( "sd", OpenCL.find_type(:cl_ushort).size * 13, OpenCL.find_type(:cl_ushort) ), OpenCL::StructLayout::Field::new( "se", OpenCL.find_type(:cl_ushort).size * 14, OpenCL.find_type(:cl_ushort) ), OpenCL::StructLayout::Field::new( "sf", OpenCL.find_type(:cl_ushort).size * 15, OpenCL.find_type(:cl_ushort) ) ], OpenCL.find_type(:cl_ushort).size * 16, OpenCL.find_type(:cl_ushort).size * 16 )
|
2591
|
+
# Creates a new UShort16 with members set to 0 or to the user specified values. If a Pointer is passed as the first argument, UShort16 maps the memory pointed.
|
2723
2592
|
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 )
|
2724
|
-
|
2725
|
-
|
2726
|
-
|
2727
|
-
|
2728
|
-
|
2729
|
-
|
2730
|
-
|
2731
|
-
|
2732
|
-
|
2733
|
-
|
2734
|
-
|
2735
|
-
|
2736
|
-
|
2737
|
-
|
2738
|
-
|
2739
|
-
|
2740
|
-
|
2593
|
+
if s0.is_a?(FFI::Pointer) then
|
2594
|
+
super(s0)
|
2595
|
+
else
|
2596
|
+
super()
|
2597
|
+
self[:s0] = s0
|
2598
|
+
self[:s1] = s1
|
2599
|
+
self[:s2] = s2
|
2600
|
+
self[:s3] = s3
|
2601
|
+
self[:s4] = s4
|
2602
|
+
self[:s5] = s5
|
2603
|
+
self[:s6] = s6
|
2604
|
+
self[:s7] = s7
|
2605
|
+
self[:s8] = s8
|
2606
|
+
self[:s9] = s9
|
2607
|
+
self[:sa] = sa
|
2608
|
+
self[:sb] = sb
|
2609
|
+
self[:sc] = sc
|
2610
|
+
self[:sd] = sd
|
2611
|
+
self[:se] = se
|
2612
|
+
self[:sf] = sf
|
2613
|
+
end
|
2741
2614
|
end
|
2742
2615
|
# Reads the s0 member
|
2743
2616
|
def s0
|
@@ -2877,28 +2750,32 @@ module OpenCL
|
|
2877
2750
|
end
|
2878
2751
|
end
|
2879
2752
|
# Maps the cl_int16 type of OpenCL
|
2880
|
-
class Int16 <
|
2881
|
-
@size =
|
2882
|
-
@layout =
|
2883
|
-
# Creates a new Int16 with members set to 0 or to the user specified values
|
2753
|
+
class Int16 < Struct
|
2754
|
+
@size = OpenCL.find_type(:cl_int).size * 16
|
2755
|
+
@layout = OpenCL::StructLayout::new([ OpenCL::StructLayout::Field::new( "s0", OpenCL.find_type(:cl_int).size * 0, OpenCL.find_type(:cl_int) ), OpenCL::StructLayout::Field::new( "s1", OpenCL.find_type(:cl_int).size * 1, OpenCL.find_type(:cl_int) ), OpenCL::StructLayout::Field::new( "s2", OpenCL.find_type(:cl_int).size * 2, OpenCL.find_type(:cl_int) ), OpenCL::StructLayout::Field::new( "s3", OpenCL.find_type(:cl_int).size * 3, OpenCL.find_type(:cl_int) ), OpenCL::StructLayout::Field::new( "s4", OpenCL.find_type(:cl_int).size * 4, OpenCL.find_type(:cl_int) ), OpenCL::StructLayout::Field::new( "s5", OpenCL.find_type(:cl_int).size * 5, OpenCL.find_type(:cl_int) ), OpenCL::StructLayout::Field::new( "s6", OpenCL.find_type(:cl_int).size * 6, OpenCL.find_type(:cl_int) ), OpenCL::StructLayout::Field::new( "s7", OpenCL.find_type(:cl_int).size * 7, OpenCL.find_type(:cl_int) ), OpenCL::StructLayout::Field::new( "s8", OpenCL.find_type(:cl_int).size * 8, OpenCL.find_type(:cl_int) ), OpenCL::StructLayout::Field::new( "s9", OpenCL.find_type(:cl_int).size * 9, OpenCL.find_type(:cl_int) ), OpenCL::StructLayout::Field::new( "sa", OpenCL.find_type(:cl_int).size * 10, OpenCL.find_type(:cl_int) ), OpenCL::StructLayout::Field::new( "sb", OpenCL.find_type(:cl_int).size * 11, OpenCL.find_type(:cl_int) ), OpenCL::StructLayout::Field::new( "sc", OpenCL.find_type(:cl_int).size * 12, OpenCL.find_type(:cl_int) ), OpenCL::StructLayout::Field::new( "sd", OpenCL.find_type(:cl_int).size * 13, OpenCL.find_type(:cl_int) ), OpenCL::StructLayout::Field::new( "se", OpenCL.find_type(:cl_int).size * 14, OpenCL.find_type(:cl_int) ), OpenCL::StructLayout::Field::new( "sf", OpenCL.find_type(:cl_int).size * 15, OpenCL.find_type(:cl_int) ) ], OpenCL.find_type(:cl_int).size * 16, OpenCL.find_type(:cl_int).size * 16 )
|
2756
|
+
# Creates a new Int16 with members set to 0 or to the user specified values. If a Pointer is passed as the first argument, Int16 maps the memory pointed.
|
2884
2757
|
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 )
|
2885
|
-
|
2886
|
-
|
2887
|
-
|
2888
|
-
|
2889
|
-
|
2890
|
-
|
2891
|
-
|
2892
|
-
|
2893
|
-
|
2894
|
-
|
2895
|
-
|
2896
|
-
|
2897
|
-
|
2898
|
-
|
2899
|
-
|
2900
|
-
|
2901
|
-
|
2758
|
+
if s0.is_a?(FFI::Pointer) then
|
2759
|
+
super(s0)
|
2760
|
+
else
|
2761
|
+
super()
|
2762
|
+
self[:s0] = s0
|
2763
|
+
self[:s1] = s1
|
2764
|
+
self[:s2] = s2
|
2765
|
+
self[:s3] = s3
|
2766
|
+
self[:s4] = s4
|
2767
|
+
self[:s5] = s5
|
2768
|
+
self[:s6] = s6
|
2769
|
+
self[:s7] = s7
|
2770
|
+
self[:s8] = s8
|
2771
|
+
self[:s9] = s9
|
2772
|
+
self[:sa] = sa
|
2773
|
+
self[:sb] = sb
|
2774
|
+
self[:sc] = sc
|
2775
|
+
self[:sd] = sd
|
2776
|
+
self[:se] = se
|
2777
|
+
self[:sf] = sf
|
2778
|
+
end
|
2902
2779
|
end
|
2903
2780
|
# Reads the s0 member
|
2904
2781
|
def s0
|
@@ -3038,28 +2915,32 @@ module OpenCL
|
|
3038
2915
|
end
|
3039
2916
|
end
|
3040
2917
|
# Maps the cl_uint16 type of OpenCL
|
3041
|
-
class UInt16 <
|
3042
|
-
@size =
|
3043
|
-
@layout =
|
3044
|
-
# Creates a new UInt16 with members set to 0 or to the user specified values
|
2918
|
+
class UInt16 < Struct
|
2919
|
+
@size = OpenCL.find_type(:cl_uint).size * 16
|
2920
|
+
@layout = OpenCL::StructLayout::new([ OpenCL::StructLayout::Field::new( "s0", OpenCL.find_type(:cl_uint).size * 0, OpenCL.find_type(:cl_uint) ), OpenCL::StructLayout::Field::new( "s1", OpenCL.find_type(:cl_uint).size * 1, OpenCL.find_type(:cl_uint) ), OpenCL::StructLayout::Field::new( "s2", OpenCL.find_type(:cl_uint).size * 2, OpenCL.find_type(:cl_uint) ), OpenCL::StructLayout::Field::new( "s3", OpenCL.find_type(:cl_uint).size * 3, OpenCL.find_type(:cl_uint) ), OpenCL::StructLayout::Field::new( "s4", OpenCL.find_type(:cl_uint).size * 4, OpenCL.find_type(:cl_uint) ), OpenCL::StructLayout::Field::new( "s5", OpenCL.find_type(:cl_uint).size * 5, OpenCL.find_type(:cl_uint) ), OpenCL::StructLayout::Field::new( "s6", OpenCL.find_type(:cl_uint).size * 6, OpenCL.find_type(:cl_uint) ), OpenCL::StructLayout::Field::new( "s7", OpenCL.find_type(:cl_uint).size * 7, OpenCL.find_type(:cl_uint) ), OpenCL::StructLayout::Field::new( "s8", OpenCL.find_type(:cl_uint).size * 8, OpenCL.find_type(:cl_uint) ), OpenCL::StructLayout::Field::new( "s9", OpenCL.find_type(:cl_uint).size * 9, OpenCL.find_type(:cl_uint) ), OpenCL::StructLayout::Field::new( "sa", OpenCL.find_type(:cl_uint).size * 10, OpenCL.find_type(:cl_uint) ), OpenCL::StructLayout::Field::new( "sb", OpenCL.find_type(:cl_uint).size * 11, OpenCL.find_type(:cl_uint) ), OpenCL::StructLayout::Field::new( "sc", OpenCL.find_type(:cl_uint).size * 12, OpenCL.find_type(:cl_uint) ), OpenCL::StructLayout::Field::new( "sd", OpenCL.find_type(:cl_uint).size * 13, OpenCL.find_type(:cl_uint) ), OpenCL::StructLayout::Field::new( "se", OpenCL.find_type(:cl_uint).size * 14, OpenCL.find_type(:cl_uint) ), OpenCL::StructLayout::Field::new( "sf", OpenCL.find_type(:cl_uint).size * 15, OpenCL.find_type(:cl_uint) ) ], OpenCL.find_type(:cl_uint).size * 16, OpenCL.find_type(:cl_uint).size * 16 )
|
2921
|
+
# Creates a new UInt16 with members set to 0 or to the user specified values. If a Pointer is passed as the first argument, UInt16 maps the memory pointed.
|
3045
2922
|
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 )
|
3046
|
-
|
3047
|
-
|
3048
|
-
|
3049
|
-
|
3050
|
-
|
3051
|
-
|
3052
|
-
|
3053
|
-
|
3054
|
-
|
3055
|
-
|
3056
|
-
|
3057
|
-
|
3058
|
-
|
3059
|
-
|
3060
|
-
|
3061
|
-
|
3062
|
-
|
2923
|
+
if s0.is_a?(FFI::Pointer) then
|
2924
|
+
super(s0)
|
2925
|
+
else
|
2926
|
+
super()
|
2927
|
+
self[:s0] = s0
|
2928
|
+
self[:s1] = s1
|
2929
|
+
self[:s2] = s2
|
2930
|
+
self[:s3] = s3
|
2931
|
+
self[:s4] = s4
|
2932
|
+
self[:s5] = s5
|
2933
|
+
self[:s6] = s6
|
2934
|
+
self[:s7] = s7
|
2935
|
+
self[:s8] = s8
|
2936
|
+
self[:s9] = s9
|
2937
|
+
self[:sa] = sa
|
2938
|
+
self[:sb] = sb
|
2939
|
+
self[:sc] = sc
|
2940
|
+
self[:sd] = sd
|
2941
|
+
self[:se] = se
|
2942
|
+
self[:sf] = sf
|
2943
|
+
end
|
3063
2944
|
end
|
3064
2945
|
# Reads the s0 member
|
3065
2946
|
def s0
|
@@ -3199,28 +3080,32 @@ module OpenCL
|
|
3199
3080
|
end
|
3200
3081
|
end
|
3201
3082
|
# Maps the cl_long16 type of OpenCL
|
3202
|
-
class Long16 <
|
3203
|
-
@size =
|
3204
|
-
@layout =
|
3205
|
-
# Creates a new Long16 with members set to 0 or to the user specified values
|
3083
|
+
class Long16 < Struct
|
3084
|
+
@size = OpenCL.find_type(:cl_long).size * 16
|
3085
|
+
@layout = OpenCL::StructLayout::new([ OpenCL::StructLayout::Field::new( "s0", OpenCL.find_type(:cl_long).size * 0, OpenCL.find_type(:cl_long) ), OpenCL::StructLayout::Field::new( "s1", OpenCL.find_type(:cl_long).size * 1, OpenCL.find_type(:cl_long) ), OpenCL::StructLayout::Field::new( "s2", OpenCL.find_type(:cl_long).size * 2, OpenCL.find_type(:cl_long) ), OpenCL::StructLayout::Field::new( "s3", OpenCL.find_type(:cl_long).size * 3, OpenCL.find_type(:cl_long) ), OpenCL::StructLayout::Field::new( "s4", OpenCL.find_type(:cl_long).size * 4, OpenCL.find_type(:cl_long) ), OpenCL::StructLayout::Field::new( "s5", OpenCL.find_type(:cl_long).size * 5, OpenCL.find_type(:cl_long) ), OpenCL::StructLayout::Field::new( "s6", OpenCL.find_type(:cl_long).size * 6, OpenCL.find_type(:cl_long) ), OpenCL::StructLayout::Field::new( "s7", OpenCL.find_type(:cl_long).size * 7, OpenCL.find_type(:cl_long) ), OpenCL::StructLayout::Field::new( "s8", OpenCL.find_type(:cl_long).size * 8, OpenCL.find_type(:cl_long) ), OpenCL::StructLayout::Field::new( "s9", OpenCL.find_type(:cl_long).size * 9, OpenCL.find_type(:cl_long) ), OpenCL::StructLayout::Field::new( "sa", OpenCL.find_type(:cl_long).size * 10, OpenCL.find_type(:cl_long) ), OpenCL::StructLayout::Field::new( "sb", OpenCL.find_type(:cl_long).size * 11, OpenCL.find_type(:cl_long) ), OpenCL::StructLayout::Field::new( "sc", OpenCL.find_type(:cl_long).size * 12, OpenCL.find_type(:cl_long) ), OpenCL::StructLayout::Field::new( "sd", OpenCL.find_type(:cl_long).size * 13, OpenCL.find_type(:cl_long) ), OpenCL::StructLayout::Field::new( "se", OpenCL.find_type(:cl_long).size * 14, OpenCL.find_type(:cl_long) ), OpenCL::StructLayout::Field::new( "sf", OpenCL.find_type(:cl_long).size * 15, OpenCL.find_type(:cl_long) ) ], OpenCL.find_type(:cl_long).size * 16, OpenCL.find_type(:cl_long).size * 16 )
|
3086
|
+
# Creates a new Long16 with members set to 0 or to the user specified values. If a Pointer is passed as the first argument, Long16 maps the memory pointed.
|
3206
3087
|
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 )
|
3207
|
-
|
3208
|
-
|
3209
|
-
|
3210
|
-
|
3211
|
-
|
3212
|
-
|
3213
|
-
|
3214
|
-
|
3215
|
-
|
3216
|
-
|
3217
|
-
|
3218
|
-
|
3219
|
-
|
3220
|
-
|
3221
|
-
|
3222
|
-
|
3223
|
-
|
3088
|
+
if s0.is_a?(FFI::Pointer) then
|
3089
|
+
super(s0)
|
3090
|
+
else
|
3091
|
+
super()
|
3092
|
+
self[:s0] = s0
|
3093
|
+
self[:s1] = s1
|
3094
|
+
self[:s2] = s2
|
3095
|
+
self[:s3] = s3
|
3096
|
+
self[:s4] = s4
|
3097
|
+
self[:s5] = s5
|
3098
|
+
self[:s6] = s6
|
3099
|
+
self[:s7] = s7
|
3100
|
+
self[:s8] = s8
|
3101
|
+
self[:s9] = s9
|
3102
|
+
self[:sa] = sa
|
3103
|
+
self[:sb] = sb
|
3104
|
+
self[:sc] = sc
|
3105
|
+
self[:sd] = sd
|
3106
|
+
self[:se] = se
|
3107
|
+
self[:sf] = sf
|
3108
|
+
end
|
3224
3109
|
end
|
3225
3110
|
# Reads the s0 member
|
3226
3111
|
def s0
|
@@ -3360,28 +3245,32 @@ module OpenCL
|
|
3360
3245
|
end
|
3361
3246
|
end
|
3362
3247
|
# Maps the cl_ulong16 type of OpenCL
|
3363
|
-
class ULong16 <
|
3364
|
-
@size =
|
3365
|
-
@layout =
|
3366
|
-
# Creates a new ULong16 with members set to 0 or to the user specified values
|
3248
|
+
class ULong16 < Struct
|
3249
|
+
@size = OpenCL.find_type(:cl_ulong).size * 16
|
3250
|
+
@layout = OpenCL::StructLayout::new([ OpenCL::StructLayout::Field::new( "s0", OpenCL.find_type(:cl_ulong).size * 0, OpenCL.find_type(:cl_ulong) ), OpenCL::StructLayout::Field::new( "s1", OpenCL.find_type(:cl_ulong).size * 1, OpenCL.find_type(:cl_ulong) ), OpenCL::StructLayout::Field::new( "s2", OpenCL.find_type(:cl_ulong).size * 2, OpenCL.find_type(:cl_ulong) ), OpenCL::StructLayout::Field::new( "s3", OpenCL.find_type(:cl_ulong).size * 3, OpenCL.find_type(:cl_ulong) ), OpenCL::StructLayout::Field::new( "s4", OpenCL.find_type(:cl_ulong).size * 4, OpenCL.find_type(:cl_ulong) ), OpenCL::StructLayout::Field::new( "s5", OpenCL.find_type(:cl_ulong).size * 5, OpenCL.find_type(:cl_ulong) ), OpenCL::StructLayout::Field::new( "s6", OpenCL.find_type(:cl_ulong).size * 6, OpenCL.find_type(:cl_ulong) ), OpenCL::StructLayout::Field::new( "s7", OpenCL.find_type(:cl_ulong).size * 7, OpenCL.find_type(:cl_ulong) ), OpenCL::StructLayout::Field::new( "s8", OpenCL.find_type(:cl_ulong).size * 8, OpenCL.find_type(:cl_ulong) ), OpenCL::StructLayout::Field::new( "s9", OpenCL.find_type(:cl_ulong).size * 9, OpenCL.find_type(:cl_ulong) ), OpenCL::StructLayout::Field::new( "sa", OpenCL.find_type(:cl_ulong).size * 10, OpenCL.find_type(:cl_ulong) ), OpenCL::StructLayout::Field::new( "sb", OpenCL.find_type(:cl_ulong).size * 11, OpenCL.find_type(:cl_ulong) ), OpenCL::StructLayout::Field::new( "sc", OpenCL.find_type(:cl_ulong).size * 12, OpenCL.find_type(:cl_ulong) ), OpenCL::StructLayout::Field::new( "sd", OpenCL.find_type(:cl_ulong).size * 13, OpenCL.find_type(:cl_ulong) ), OpenCL::StructLayout::Field::new( "se", OpenCL.find_type(:cl_ulong).size * 14, OpenCL.find_type(:cl_ulong) ), OpenCL::StructLayout::Field::new( "sf", OpenCL.find_type(:cl_ulong).size * 15, OpenCL.find_type(:cl_ulong) ) ], OpenCL.find_type(:cl_ulong).size * 16, OpenCL.find_type(:cl_ulong).size * 16 )
|
3251
|
+
# Creates a new ULong16 with members set to 0 or to the user specified values. If a Pointer is passed as the first argument, ULong16 maps the memory pointed.
|
3367
3252
|
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 )
|
3368
|
-
|
3369
|
-
|
3370
|
-
|
3371
|
-
|
3372
|
-
|
3373
|
-
|
3374
|
-
|
3375
|
-
|
3376
|
-
|
3377
|
-
|
3378
|
-
|
3379
|
-
|
3380
|
-
|
3381
|
-
|
3382
|
-
|
3383
|
-
|
3384
|
-
|
3253
|
+
if s0.is_a?(FFI::Pointer) then
|
3254
|
+
super(s0)
|
3255
|
+
else
|
3256
|
+
super()
|
3257
|
+
self[:s0] = s0
|
3258
|
+
self[:s1] = s1
|
3259
|
+
self[:s2] = s2
|
3260
|
+
self[:s3] = s3
|
3261
|
+
self[:s4] = s4
|
3262
|
+
self[:s5] = s5
|
3263
|
+
self[:s6] = s6
|
3264
|
+
self[:s7] = s7
|
3265
|
+
self[:s8] = s8
|
3266
|
+
self[:s9] = s9
|
3267
|
+
self[:sa] = sa
|
3268
|
+
self[:sb] = sb
|
3269
|
+
self[:sc] = sc
|
3270
|
+
self[:sd] = sd
|
3271
|
+
self[:se] = se
|
3272
|
+
self[:sf] = sf
|
3273
|
+
end
|
3385
3274
|
end
|
3386
3275
|
# Reads the s0 member
|
3387
3276
|
def s0
|
@@ -3521,28 +3410,32 @@ module OpenCL
|
|
3521
3410
|
end
|
3522
3411
|
end
|
3523
3412
|
# Maps the cl_float16 type of OpenCL
|
3524
|
-
class Float16 <
|
3525
|
-
@size =
|
3526
|
-
@layout =
|
3527
|
-
# Creates a new Float16 with members set to 0 or to the user specified values
|
3413
|
+
class Float16 < Struct
|
3414
|
+
@size = OpenCL.find_type(:cl_float).size * 16
|
3415
|
+
@layout = OpenCL::StructLayout::new([ OpenCL::StructLayout::Field::new( "s0", OpenCL.find_type(:cl_float).size * 0, OpenCL.find_type(:cl_float) ), OpenCL::StructLayout::Field::new( "s1", OpenCL.find_type(:cl_float).size * 1, OpenCL.find_type(:cl_float) ), OpenCL::StructLayout::Field::new( "s2", OpenCL.find_type(:cl_float).size * 2, OpenCL.find_type(:cl_float) ), OpenCL::StructLayout::Field::new( "s3", OpenCL.find_type(:cl_float).size * 3, OpenCL.find_type(:cl_float) ), OpenCL::StructLayout::Field::new( "s4", OpenCL.find_type(:cl_float).size * 4, OpenCL.find_type(:cl_float) ), OpenCL::StructLayout::Field::new( "s5", OpenCL.find_type(:cl_float).size * 5, OpenCL.find_type(:cl_float) ), OpenCL::StructLayout::Field::new( "s6", OpenCL.find_type(:cl_float).size * 6, OpenCL.find_type(:cl_float) ), OpenCL::StructLayout::Field::new( "s7", OpenCL.find_type(:cl_float).size * 7, OpenCL.find_type(:cl_float) ), OpenCL::StructLayout::Field::new( "s8", OpenCL.find_type(:cl_float).size * 8, OpenCL.find_type(:cl_float) ), OpenCL::StructLayout::Field::new( "s9", OpenCL.find_type(:cl_float).size * 9, OpenCL.find_type(:cl_float) ), OpenCL::StructLayout::Field::new( "sa", OpenCL.find_type(:cl_float).size * 10, OpenCL.find_type(:cl_float) ), OpenCL::StructLayout::Field::new( "sb", OpenCL.find_type(:cl_float).size * 11, OpenCL.find_type(:cl_float) ), OpenCL::StructLayout::Field::new( "sc", OpenCL.find_type(:cl_float).size * 12, OpenCL.find_type(:cl_float) ), OpenCL::StructLayout::Field::new( "sd", OpenCL.find_type(:cl_float).size * 13, OpenCL.find_type(:cl_float) ), OpenCL::StructLayout::Field::new( "se", OpenCL.find_type(:cl_float).size * 14, OpenCL.find_type(:cl_float) ), OpenCL::StructLayout::Field::new( "sf", OpenCL.find_type(:cl_float).size * 15, OpenCL.find_type(:cl_float) ) ], OpenCL.find_type(:cl_float).size * 16, OpenCL.find_type(:cl_float).size * 16 )
|
3416
|
+
# Creates a new Float16 with members set to 0 or to the user specified values. If a Pointer is passed as the first argument, Float16 maps the memory pointed.
|
3528
3417
|
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 )
|
3529
|
-
|
3530
|
-
|
3531
|
-
|
3532
|
-
|
3533
|
-
|
3534
|
-
|
3535
|
-
|
3536
|
-
|
3537
|
-
|
3538
|
-
|
3539
|
-
|
3540
|
-
|
3541
|
-
|
3542
|
-
|
3543
|
-
|
3544
|
-
|
3545
|
-
|
3418
|
+
if s0.is_a?(FFI::Pointer) then
|
3419
|
+
super(s0)
|
3420
|
+
else
|
3421
|
+
super()
|
3422
|
+
self[:s0] = s0
|
3423
|
+
self[:s1] = s1
|
3424
|
+
self[:s2] = s2
|
3425
|
+
self[:s3] = s3
|
3426
|
+
self[:s4] = s4
|
3427
|
+
self[:s5] = s5
|
3428
|
+
self[:s6] = s6
|
3429
|
+
self[:s7] = s7
|
3430
|
+
self[:s8] = s8
|
3431
|
+
self[:s9] = s9
|
3432
|
+
self[:sa] = sa
|
3433
|
+
self[:sb] = sb
|
3434
|
+
self[:sc] = sc
|
3435
|
+
self[:sd] = sd
|
3436
|
+
self[:se] = se
|
3437
|
+
self[:sf] = sf
|
3438
|
+
end
|
3546
3439
|
end
|
3547
3440
|
# Reads the s0 member
|
3548
3441
|
def s0
|
@@ -3682,28 +3575,32 @@ module OpenCL
|
|
3682
3575
|
end
|
3683
3576
|
end
|
3684
3577
|
# Maps the cl_double16 type of OpenCL
|
3685
|
-
class Double16 <
|
3686
|
-
@size =
|
3687
|
-
@layout =
|
3688
|
-
# Creates a new Double16 with members set to 0 or to the user specified values
|
3578
|
+
class Double16 < Struct
|
3579
|
+
@size = OpenCL.find_type(:cl_double).size * 16
|
3580
|
+
@layout = OpenCL::StructLayout::new([ OpenCL::StructLayout::Field::new( "s0", OpenCL.find_type(:cl_double).size * 0, OpenCL.find_type(:cl_double) ), OpenCL::StructLayout::Field::new( "s1", OpenCL.find_type(:cl_double).size * 1, OpenCL.find_type(:cl_double) ), OpenCL::StructLayout::Field::new( "s2", OpenCL.find_type(:cl_double).size * 2, OpenCL.find_type(:cl_double) ), OpenCL::StructLayout::Field::new( "s3", OpenCL.find_type(:cl_double).size * 3, OpenCL.find_type(:cl_double) ), OpenCL::StructLayout::Field::new( "s4", OpenCL.find_type(:cl_double).size * 4, OpenCL.find_type(:cl_double) ), OpenCL::StructLayout::Field::new( "s5", OpenCL.find_type(:cl_double).size * 5, OpenCL.find_type(:cl_double) ), OpenCL::StructLayout::Field::new( "s6", OpenCL.find_type(:cl_double).size * 6, OpenCL.find_type(:cl_double) ), OpenCL::StructLayout::Field::new( "s7", OpenCL.find_type(:cl_double).size * 7, OpenCL.find_type(:cl_double) ), OpenCL::StructLayout::Field::new( "s8", OpenCL.find_type(:cl_double).size * 8, OpenCL.find_type(:cl_double) ), OpenCL::StructLayout::Field::new( "s9", OpenCL.find_type(:cl_double).size * 9, OpenCL.find_type(:cl_double) ), OpenCL::StructLayout::Field::new( "sa", OpenCL.find_type(:cl_double).size * 10, OpenCL.find_type(:cl_double) ), OpenCL::StructLayout::Field::new( "sb", OpenCL.find_type(:cl_double).size * 11, OpenCL.find_type(:cl_double) ), OpenCL::StructLayout::Field::new( "sc", OpenCL.find_type(:cl_double).size * 12, OpenCL.find_type(:cl_double) ), OpenCL::StructLayout::Field::new( "sd", OpenCL.find_type(:cl_double).size * 13, OpenCL.find_type(:cl_double) ), OpenCL::StructLayout::Field::new( "se", OpenCL.find_type(:cl_double).size * 14, OpenCL.find_type(:cl_double) ), OpenCL::StructLayout::Field::new( "sf", OpenCL.find_type(:cl_double).size * 15, OpenCL.find_type(:cl_double) ) ], OpenCL.find_type(:cl_double).size * 16, OpenCL.find_type(:cl_double).size * 16 )
|
3581
|
+
# Creates a new Double16 with members set to 0 or to the user specified values. If a Pointer is passed as the first argument, Double16 maps the memory pointed.
|
3689
3582
|
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 )
|
3690
|
-
|
3691
|
-
|
3692
|
-
|
3693
|
-
|
3694
|
-
|
3695
|
-
|
3696
|
-
|
3697
|
-
|
3698
|
-
|
3699
|
-
|
3700
|
-
|
3701
|
-
|
3702
|
-
|
3703
|
-
|
3704
|
-
|
3705
|
-
|
3706
|
-
|
3583
|
+
if s0.is_a?(FFI::Pointer) then
|
3584
|
+
super(s0)
|
3585
|
+
else
|
3586
|
+
super()
|
3587
|
+
self[:s0] = s0
|
3588
|
+
self[:s1] = s1
|
3589
|
+
self[:s2] = s2
|
3590
|
+
self[:s3] = s3
|
3591
|
+
self[:s4] = s4
|
3592
|
+
self[:s5] = s5
|
3593
|
+
self[:s6] = s6
|
3594
|
+
self[:s7] = s7
|
3595
|
+
self[:s8] = s8
|
3596
|
+
self[:s9] = s9
|
3597
|
+
self[:sa] = sa
|
3598
|
+
self[:sb] = sb
|
3599
|
+
self[:sc] = sc
|
3600
|
+
self[:sd] = sd
|
3601
|
+
self[:se] = se
|
3602
|
+
self[:sf] = sf
|
3603
|
+
end
|
3707
3604
|
end
|
3708
3605
|
# Reads the s0 member
|
3709
3606
|
def s0
|
@@ -3843,28 +3740,32 @@ module OpenCL
|
|
3843
3740
|
end
|
3844
3741
|
end
|
3845
3742
|
# Maps the cl_half16 type of OpenCL
|
3846
|
-
class Half16 <
|
3847
|
-
@size =
|
3848
|
-
@layout =
|
3849
|
-
# Creates a new Half16 with members set to 0 or to the user specified values
|
3743
|
+
class Half16 < Struct
|
3744
|
+
@size = OpenCL.find_type(:cl_half).size * 16
|
3745
|
+
@layout = OpenCL::StructLayout::new([ OpenCL::StructLayout::Field::new( "s0", OpenCL.find_type(:cl_half).size * 0, OpenCL.find_type(:cl_half) ), OpenCL::StructLayout::Field::new( "s1", OpenCL.find_type(:cl_half).size * 1, OpenCL.find_type(:cl_half) ), OpenCL::StructLayout::Field::new( "s2", OpenCL.find_type(:cl_half).size * 2, OpenCL.find_type(:cl_half) ), OpenCL::StructLayout::Field::new( "s3", OpenCL.find_type(:cl_half).size * 3, OpenCL.find_type(:cl_half) ), OpenCL::StructLayout::Field::new( "s4", OpenCL.find_type(:cl_half).size * 4, OpenCL.find_type(:cl_half) ), OpenCL::StructLayout::Field::new( "s5", OpenCL.find_type(:cl_half).size * 5, OpenCL.find_type(:cl_half) ), OpenCL::StructLayout::Field::new( "s6", OpenCL.find_type(:cl_half).size * 6, OpenCL.find_type(:cl_half) ), OpenCL::StructLayout::Field::new( "s7", OpenCL.find_type(:cl_half).size * 7, OpenCL.find_type(:cl_half) ), OpenCL::StructLayout::Field::new( "s8", OpenCL.find_type(:cl_half).size * 8, OpenCL.find_type(:cl_half) ), OpenCL::StructLayout::Field::new( "s9", OpenCL.find_type(:cl_half).size * 9, OpenCL.find_type(:cl_half) ), OpenCL::StructLayout::Field::new( "sa", OpenCL.find_type(:cl_half).size * 10, OpenCL.find_type(:cl_half) ), OpenCL::StructLayout::Field::new( "sb", OpenCL.find_type(:cl_half).size * 11, OpenCL.find_type(:cl_half) ), OpenCL::StructLayout::Field::new( "sc", OpenCL.find_type(:cl_half).size * 12, OpenCL.find_type(:cl_half) ), OpenCL::StructLayout::Field::new( "sd", OpenCL.find_type(:cl_half).size * 13, OpenCL.find_type(:cl_half) ), OpenCL::StructLayout::Field::new( "se", OpenCL.find_type(:cl_half).size * 14, OpenCL.find_type(:cl_half) ), OpenCL::StructLayout::Field::new( "sf", OpenCL.find_type(:cl_half).size * 15, OpenCL.find_type(:cl_half) ) ], OpenCL.find_type(:cl_half).size * 16, OpenCL.find_type(:cl_half).size * 16 )
|
3746
|
+
# Creates a new Half16 with members set to 0 or to the user specified values. If a Pointer is passed as the first argument, Half16 maps the memory pointed.
|
3850
3747
|
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 )
|
3851
|
-
|
3852
|
-
|
3853
|
-
|
3854
|
-
|
3855
|
-
|
3856
|
-
|
3857
|
-
|
3858
|
-
|
3859
|
-
|
3860
|
-
|
3861
|
-
|
3862
|
-
|
3863
|
-
|
3864
|
-
|
3865
|
-
|
3866
|
-
|
3867
|
-
|
3748
|
+
if s0.is_a?(FFI::Pointer) then
|
3749
|
+
super(s0)
|
3750
|
+
else
|
3751
|
+
super()
|
3752
|
+
self[:s0] = s0
|
3753
|
+
self[:s1] = s1
|
3754
|
+
self[:s2] = s2
|
3755
|
+
self[:s3] = s3
|
3756
|
+
self[:s4] = s4
|
3757
|
+
self[:s5] = s5
|
3758
|
+
self[:s6] = s6
|
3759
|
+
self[:s7] = s7
|
3760
|
+
self[:s8] = s8
|
3761
|
+
self[:s9] = s9
|
3762
|
+
self[:sa] = sa
|
3763
|
+
self[:sb] = sb
|
3764
|
+
self[:sc] = sc
|
3765
|
+
self[:sd] = sd
|
3766
|
+
self[:se] = se
|
3767
|
+
self[:sf] = sf
|
3768
|
+
end
|
3868
3769
|
end
|
3869
3770
|
# Reads the s0 member
|
3870
3771
|
def s0
|