opencl_ruby_ffi 1.3.11 → 1.3.12

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 065ec7c422916ba7d169142533db9bd995454f4ba4f1c15140a9520678a2bfd6
4
- data.tar.gz: bbc4f7adf1314fc7d52ac0d17f055395f49f0b36cee51a93ccd13ad7463ad99a
3
+ metadata.gz: fdde36869013e898818c10e84618fc8af7efbfb37f65f0dc420a5cbcfe98e724
4
+ data.tar.gz: a1934b0c7beb47644793083adaa04765dcc8eb7cddf54fc51ee1f203ebf545c7
5
5
  SHA512:
6
- metadata.gz: cf5f687a27e5366205e978a0040da1f973e543953f286221c8bf0af9a0b2089d42f826039965cdf59bd9c1c7f64dca51b2bc50663818093fe667a5435dc429bf
7
- data.tar.gz: 249cdaa1aba3ede6812b759c41fe21e468b40c15621f04e759829507dea1597d9fc2e31b85d8c0ef54cc65c0828da683ff0d6ad88414b14b22b87085c477b0f2
6
+ metadata.gz: f0c9376a0dc33def8c99a553526f77755223ca2592b845713fad3567bd30b8e3c4af8a1630db4f30739ada00119f53b75ab16a5a13c323205c87410565e6d568
7
+ data.tar.gz: ade66f8ccb6bdfbfdd8a3e0a88878e129507317fd710bf52ec0425c96441d5982765e7e222c6c6c154a68ee7812e6cb144fa72aefcc35ada654899c69e2c40ef
@@ -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, Mem.ptr
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
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'opencl_ruby_ffi'
3
- s.version = "1.3.11"
3
+ s.version = "1.3.12"
4
4
  s.author = "Brice Videau"
5
5
  s.email = "bvideau@anl.gov"
6
6
  s.homepage = "https://github.com/Nanosim-LIG/opencl-ruby"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opencl_ruby_ffi
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.11
4
+ version: 1.3.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brice Videau
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-06-30 00:00:00.000000000 Z
11
+ date: 2021-07-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: narray