opencl_ruby_ffi 0.998 → 0.999

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
  SHA1:
3
- metadata.gz: 011d95c065f199af11900e31c3ea7934c05adcec
4
- data.tar.gz: e9f298c20e30f0f7e1cb6491063ca594a7349d78
3
+ metadata.gz: 92a6f2b33174775faad60dfd15bbf1fa8f123b6a
4
+ data.tar.gz: 190aed502e8d393c4624401d00cf46eb93417b5f
5
5
  SHA512:
6
- metadata.gz: ac99570df0bd52c1f0efd2464979bbfdd46b9af25a08d4cdaeab21de6264fce83ee5404625a6ddfdc0f051e6d3e96b8b0132e2f91584b967ed1e78b0267b21c2
7
- data.tar.gz: 08b3062f79979f57ff7f7df0c9a49d5ffe4f3c76b1828879e235b8059945b6d1a8a18f077eb97f4f7585b0ca07a738b38d503aae9b36ca3b9d8b221e2486387a
6
+ metadata.gz: 637ea563607df3b61b046747674f1b9fc4a1291cea9d4dd4c79f198c39b06d49f21a83baf11f4d62f0968d0c255a87b7e37348c47b1b3e7cca269b7f590b7ef0
7
+ data.tar.gz: c623385157246ce35ad2e8c1558ab2761c2728c1de98711ce94bbcb153002cb2f0d0358b390b015db50cb936c89a766d9adf9c1e1eac81400c085954517ce6ab
@@ -69,6 +69,20 @@ module OpenCL
69
69
  eval get_info("Device", :string, prop)
70
70
  }
71
71
 
72
+ # returs a floating point number corresponding to the OpenCL C version of the Device
73
+ def opencl_c_version_number
74
+ ver = self.opencl_c_version
75
+ n = ver.scan(/OpenCL C (\d+\.\d+)/)
76
+ return n.first.first.to_f
77
+ end
78
+
79
+ # returs a floating point number corresponding to the OpenCL version of the Device
80
+ def version_number
81
+ ver = self.version
82
+ n = ver.scan(/OpenCL (\d+\.\d+)/)
83
+ return n.first.first.to_f
84
+ end
85
+
72
86
  %w( MAX_MEM_ALLOC_SIZE MAX_CONSTANT_BUFFER_SIZE LOCAL_MEM_SIZE GLOBAL_MEM_CACHE_SIZE GLOBAL_MEM_SIZE ).each { |prop|
73
87
  eval get_info("Device", :cl_ulong, prop)
74
88
  }
@@ -3765,9 +3765,9 @@ module OpenCL
3765
3765
  attach_function :clEnqueueSVMMap, [CommandQueue,:cl_bool,:cl_map_flags,:pointer,:size_t,:cl_uint,:pointer,:pointer], :cl_int
3766
3766
  attach_function :clEnqueueSVMUnmap, [CommandQueue,:pointer,:cl_uint,:pointer,:pointer], :cl_int
3767
3767
  rescue FFI::NotFoundError => e
3768
- STDERR.puts "Warning OpenCL 1.2 loader detected!"
3768
+ warn "Warning OpenCL 1.2 loader detected!"
3769
3769
  end
3770
3770
  rescue FFI::NotFoundError => e
3771
- STDERR.puts "Warning OpenCL 1.1 loader detected!"
3771
+ warn "Warning OpenCL 1.1 loader detected!"
3772
3772
  end
3773
3773
  end
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'opencl_ruby_ffi'
3
- s.version = "0.998"
3
+ s.version = "0.999"
4
4
  s.author = "Brice Videau"
5
5
  s.email = "brice.videau@imag.fr"
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: '0.998'
4
+ version: '0.999'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brice Videau
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-01-21 00:00:00.000000000 Z
11
+ date: 2015-05-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: narray