Class: SGC::Cuda::CudaThread Deprecated
- Inherits:
-
Object
- Object
- SGC::Cuda::CudaThread
- Defined in:
- lib/cuda/runtime/thread.rb
Overview
Deprecated.
Class Method Summary collapse
- .cache_config ⇒ Object
- .cache_config=(config) ⇒ Object
- .exit ⇒ Object
- .limit(limit) ⇒ Object
- .limit=(*limit_value_pair) ⇒ Object
- .synchronize ⇒ Object
Class Method Details
.cache_config ⇒ Object
43 44 45 46 47 48 |
# File 'lib/cuda/runtime/thread.rb', line 43 def self.cache_config p = FFI::MemoryPointer.new(:int) status = API::cudaThreadGetCacheConfig(p) Pvt::handle_error(status) CudaFunctionCache[p.read_int] end |
.cache_config=(config) ⇒ Object
51 52 53 54 |
# File 'lib/cuda/runtime/thread.rb', line 51 def self.cache_config=(config) status = API::cudaThreadSetCacheConfig(config) Pvt::handle_error(status) end |
.exit ⇒ Object
36 37 38 39 40 |
# File 'lib/cuda/runtime/thread.rb', line 36 def self.exit status = API::cudaThreadExit Pvt::handle_error(status) self end |
.limit(limit) ⇒ Object
57 58 59 60 61 62 |
# File 'lib/cuda/runtime/thread.rb', line 57 def self.limit(limit) p = FFI::MemoryPointer.new(:size_t) status = API::cudaThreadGetLimit(p, limit) Pvt::handle_error(status) p.read_long end |
.limit=(*limit_value_pair) ⇒ Object
65 66 67 68 69 |
# File 'lib/cuda/runtime/thread.rb', line 65 def self.limit=(*limit_value_pair) limit, value = limit_value_pair.flatten status = API::cudaThreadSetLimit(limit, value) Pvt::handle_error(status) end |
.synchronize ⇒ Object
72 73 74 75 76 |
# File 'lib/cuda/runtime/thread.rb', line 72 def self.synchronize status = API::cudaThreadSynchronize Pvt::handle_error(status) self end |