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 +4 -4
- data/lib/opencl_ruby_ffi/Device.rb +14 -0
- data/lib/opencl_ruby_ffi/opencl_ruby_ffi_base_gen.rb +2 -2
- data/opencl_ruby_ffi.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 92a6f2b33174775faad60dfd15bbf1fa8f123b6a
|
4
|
+
data.tar.gz: 190aed502e8d393c4624401d00cf46eb93417b5f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
3768
|
+
warn "Warning OpenCL 1.2 loader detected!"
|
3769
3769
|
end
|
3770
3770
|
rescue FFI::NotFoundError => e
|
3771
|
-
|
3771
|
+
warn "Warning OpenCL 1.1 loader detected!"
|
3772
3772
|
end
|
3773
3773
|
end
|
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: '0.
|
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-
|
11
|
+
date: 2015-05-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: narray
|