opencl_ruby_ffi 1.3.10 → 1.3.11

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: ed02c06ec493e3a80c58182e631294ddeaa05d2f5a2236607a8431dc2684d4ab
4
- data.tar.gz: 6f0404c434de4e4d392b1f3e641acc2e08010aa06c5f3d9cc035c52dead6070f
3
+ metadata.gz: 065ec7c422916ba7d169142533db9bd995454f4ba4f1c15140a9520678a2bfd6
4
+ data.tar.gz: bbc4f7adf1314fc7d52ac0d17f055395f49f0b36cee51a93ccd13ad7463ad99a
5
5
  SHA512:
6
- metadata.gz: 84cb00cb6e7a753eb365e64aac09dcf7fcd488aa5f9de3abf5685ddce81bdee6b44a7ea5548257e441c986ecb0f50ed9023c264cb51eede26100d03f36fbe2b7
7
- data.tar.gz: 89e804309e0e092daacb1e614c9cb79467198c2259051a3ceaab101552bcd49969767920e6db34894bf53b73ec53ad2cd2eb935cb7946c47f2a0c274918c420f
6
+ metadata.gz: cf5f687a27e5366205e978a0040da1f973e543953f286221c8bf0af9a0b2089d42f826039965cdf59bd9c1c7f64dca51b2bc50663818093fe667a5435dc429bf
7
+ data.tar.gz: 249cdaa1aba3ede6812b759c41fe21e468b40c15621f04e759829507dea1597d9fc2e31b85d8c0ef54cc65c0828da683ff0d6ad88414b14b22b87085c477b0f2
@@ -29,9 +29,12 @@ module OpenCL
29
29
  sz = size
30
30
  sz = value.class.size if sz == nil
31
31
  val = value
32
- if value.kind_of?(Mem) then
32
+ if value.kind_of?(Mem)
33
33
  val = MemoryPointer::new( Mem )
34
34
  val.write_pointer(value.to_ptr)
35
+ elsif value.kind_of?(Sampler)
36
+ val = MemoryPointer::new( Sampler )
37
+ val.write_pointer(value.to_ptr)
35
38
  end
36
39
  error = clSetKernelArg( kernel, index, sz, val )
37
40
  error_check(error)
@@ -158,7 +158,7 @@ module OpenCL
158
158
  # ==== Returns
159
159
  #
160
160
  # the Event associated with the command
161
- def self.enqueue_svm_memfill(command_queue, svm_ptr, pattern, size, options = {})
161
+ def self.enqueue_svm_memfill(command_queue, svm_ptr, pattern, options = {})
162
162
  error_check(INVALID_OPERATION) if command_queue.context.platform.version_number < 2.0
163
163
  num_events, events = get_event_wait_list( options )
164
164
  pattern_size = pattern.size
@@ -30,7 +30,7 @@ module OpenCL
30
30
  prop_size += 2 if options[:mip_filter_mode]
31
31
  prop_size += 2 if options[:lod_min]
32
32
  prop_size += 2 if options[:lod_max]
33
- properties = MemoryPointer::new( :cl_sampler_info )
33
+ properties = MemoryPointer::new( :cl_sampler_properties, prop_size )
34
34
  properties[0].write_cl_sampler_info( Sampler::NORMALIZED_COORDS )
35
35
  properties[1].write_cl_bool( normalized_coords )
36
36
  properties[2].write_cl_sampler_info( Sampler::ADDRESSING_MODE )
@@ -240,7 +240,7 @@ module OpenCL
240
240
  def get_global_variable_pointer_intel(program, name)
241
241
  pSize = MemoryPointer::new(:size_t)
242
242
  pAddr = MemoryPointer::new(:pointer)
243
- error = clGetDeviceGlobalVariablePointerINTEL.call(self, program, name, pAddr, pSize)
243
+ error = clGetDeviceGlobalVariablePointerINTEL.call(self, program, name, pSize, pAddr)
244
244
  error_check(error)
245
245
  return USMPointer::new(pAddr.read_pointer.slice(0, pSize.read_size_t), self)
246
246
  end
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'opencl_ruby_ffi'
3
- s.version = "1.3.10"
3
+ s.version = "1.3.11"
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.10
4
+ version: 1.3.11
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-05-12 00:00:00.000000000 Z
11
+ date: 2021-06-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: narray