opencl_ruby_ffi 1.3.11 → 1.3.13
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/opencl_ruby_ffi_base.rb +124 -2
- data/opencl_ruby_ffi.gemspec +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e55400fff7a4830d681e0f294d0bdfadddaef46b067dd2392d9642d0a504175c
|
4
|
+
data.tar.gz: 30367bd1440a86e051fb28fade2f130f6064553395d438d9f56c0d94af4bf386
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5ca1dd2749d4bcaba7985eda4bce2c2f85136d9d7d7c18a6c6fdd251859ac1d5aacf870b082604c6fb455c8765f9548d89f66349c512485caa388a93c6f52775
|
7
|
+
data.tar.gz: be9e7f06a40c93ea50e6a4de8c583db23778f31c609d22e17a788a18c6c657cd3a27a0f9ee20a24a4b1308a56c4ee0073f0fe04432a644907b5004fd6c67d03a
|
@@ -79,7 +79,7 @@ module OpenCL
|
|
79
79
|
|
80
80
|
# Returns a String containing a user friendly representation of the ImageFormat
|
81
81
|
def to_s
|
82
|
-
return "{ #{self.channel_order}, #{self.channel_data_type} }"
|
82
|
+
return "{ channel_order: #{self.channel_order}, channel_data_type: #{self.channel_data_type} }"
|
83
83
|
end
|
84
84
|
|
85
85
|
end
|
@@ -95,7 +95,7 @@ module OpenCL
|
|
95
95
|
:image_slice_pitch, :size_t,
|
96
96
|
:num_mip_levels, :cl_uint,
|
97
97
|
:num_samples, :cl_uint,
|
98
|
-
:buffer,
|
98
|
+
:buffer, :pointer
|
99
99
|
|
100
100
|
# Creates anew ImageDesc using the values provided by the user
|
101
101
|
def initialize( image_type = nil, image_width = nil, image_height = nil, image_depth = nil, image_array_size = nil, image_row_pitch = nil, image_slice_pitch = nil, num_mip_levels = nil, num_samples = nil, buffer = nil )
|
@@ -115,6 +115,100 @@ module OpenCL
|
|
115
115
|
self[:buffer] = buffer if buffer
|
116
116
|
end
|
117
117
|
end
|
118
|
+
|
119
|
+
def image_type
|
120
|
+
return Mem::Type.new(self[:image_type])
|
121
|
+
end
|
122
|
+
|
123
|
+
def image_type=(type)
|
124
|
+
return self[:image_type] = type
|
125
|
+
end
|
126
|
+
|
127
|
+
def image_width
|
128
|
+
return self[:image_width]
|
129
|
+
end
|
130
|
+
|
131
|
+
def image_width=(width)
|
132
|
+
return self[:image_width] = width
|
133
|
+
end
|
134
|
+
|
135
|
+
def image_height
|
136
|
+
return self[:image_height]
|
137
|
+
end
|
138
|
+
|
139
|
+
def image_height=(height)
|
140
|
+
return self[:image_height] = height
|
141
|
+
end
|
142
|
+
|
143
|
+
def image_depth
|
144
|
+
return self[:image_depth]
|
145
|
+
end
|
146
|
+
|
147
|
+
def image_depth=(depth)
|
148
|
+
return self[:image_depth] = depth
|
149
|
+
end
|
150
|
+
|
151
|
+
def image_array_size
|
152
|
+
return self[:image_array_size]
|
153
|
+
end
|
154
|
+
|
155
|
+
def image_array_size=(array_size)
|
156
|
+
return self[:image_array_size] = array_size
|
157
|
+
end
|
158
|
+
|
159
|
+
def image_row_pitch
|
160
|
+
return self[:image_row_pitch]
|
161
|
+
end
|
162
|
+
|
163
|
+
def image_row_pitch=(row_pitch)
|
164
|
+
return self[:image_row_pitch] = row_pitch
|
165
|
+
end
|
166
|
+
|
167
|
+
def image_slice_pitch
|
168
|
+
return self[:image_slice_pitch]
|
169
|
+
end
|
170
|
+
|
171
|
+
def image_slice_pitch=(slice_pitch)
|
172
|
+
return self[:image_slice_pitch] = slice_pitch
|
173
|
+
end
|
174
|
+
|
175
|
+
def num_mip_levels
|
176
|
+
return self[:num_mip_levels]
|
177
|
+
end
|
178
|
+
|
179
|
+
def num_mip_levels=(num_mip_levels)
|
180
|
+
return self[:num_mip_levels] = num_mip_levels
|
181
|
+
end
|
182
|
+
|
183
|
+
def num_samples
|
184
|
+
return self[:num_samples]
|
185
|
+
end
|
186
|
+
|
187
|
+
def num_samples=(num_samples)
|
188
|
+
return self[:num_samples] = num_samples
|
189
|
+
end
|
190
|
+
|
191
|
+
def buffer
|
192
|
+
return self[:buffer]
|
193
|
+
end
|
194
|
+
|
195
|
+
def buffer=(buffer)
|
196
|
+
return self[:buffer] = buffer
|
197
|
+
end
|
198
|
+
|
199
|
+
# Returns a String containing a user friendly representation of the ImageDesc
|
200
|
+
def to_s
|
201
|
+
return "{ image_type: #{image_type},"\
|
202
|
+
" image_width: #{self[:image_width]},"\
|
203
|
+
" image_height: #{self[:image_height]},"\
|
204
|
+
" image_depth: #{self[:image_depth]},"\
|
205
|
+
" image_array_size: #{self[:image_array_size]},"\
|
206
|
+
" image_row_pitch: #{self[:image_row_pitch]},"\
|
207
|
+
" image_slice_pitch: #{self[:image_slice_pitch]},"\
|
208
|
+
" num_mip_levels: #{self[:num_mip_levels]},"\
|
209
|
+
" num_samples: #{self[:num_samples]},"\
|
210
|
+
" buffer: #{self[:buffer].to_i.to_s(16)} }"
|
211
|
+
end
|
118
212
|
end
|
119
213
|
|
120
214
|
# Maps the :cl_buffer_region type of OpenCL
|
@@ -132,6 +226,26 @@ module OpenCL
|
|
132
226
|
self[:size] = sz if sz
|
133
227
|
end
|
134
228
|
end
|
229
|
+
|
230
|
+
def origin
|
231
|
+
return self[:origin]
|
232
|
+
end
|
233
|
+
|
234
|
+
def origin=(origin)
|
235
|
+
return self[:origin] = origin
|
236
|
+
end
|
237
|
+
|
238
|
+
def sz
|
239
|
+
return self[:size]
|
240
|
+
end
|
241
|
+
|
242
|
+
def sz=(sz)
|
243
|
+
return self[:size] = sz
|
244
|
+
end
|
245
|
+
|
246
|
+
def to_s
|
247
|
+
return "{ origin: #{self[:origin]}, size: #{self[:size]} }"
|
248
|
+
end
|
135
249
|
end
|
136
250
|
|
137
251
|
class Version
|
@@ -202,6 +316,10 @@ module OpenCL
|
|
202
316
|
def name
|
203
317
|
self[:name].to_s
|
204
318
|
end
|
319
|
+
|
320
|
+
def to_s
|
321
|
+
"{ name: #{name}, version: #{version} }"
|
322
|
+
end
|
205
323
|
end
|
206
324
|
|
207
325
|
module InnerInterface
|
@@ -376,6 +494,10 @@ module OpenCL
|
|
376
494
|
include InnerInterface
|
377
495
|
end
|
378
496
|
|
497
|
+
class ExtendedStruct
|
498
|
+
extend InnerInterface
|
499
|
+
end
|
500
|
+
|
379
501
|
module ExtensionInnerGenerator
|
380
502
|
|
381
503
|
private
|
data/opencl_ruby_ffi.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: opencl_ruby_ffi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brice Videau
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-08-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: narray
|
@@ -133,7 +133,7 @@ homepage: https://github.com/Nanosim-LIG/opencl-ruby
|
|
133
133
|
licenses:
|
134
134
|
- BSD-2-Clause
|
135
135
|
metadata: {}
|
136
|
-
post_install_message:
|
136
|
+
post_install_message:
|
137
137
|
rdoc_options: []
|
138
138
|
require_paths:
|
139
139
|
- lib
|
@@ -148,8 +148,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
148
148
|
- !ruby/object:Gem::Version
|
149
149
|
version: '0'
|
150
150
|
requirements: []
|
151
|
-
rubygems_version: 3.
|
152
|
-
signing_key:
|
151
|
+
rubygems_version: 3.3.15
|
152
|
+
signing_key:
|
153
153
|
specification_version: 4
|
154
154
|
summary: Ruby OpenCL FFI bindings
|
155
155
|
test_files: []
|