Module: SGC::Cuda
- Includes:
- Memory
- Defined in:
- lib/cuda/runtime/cuda.rb,
lib/cuda/runtime/error.rb,
lib/cuda/runtime/event.rb,
lib/cuda/runtime/device.rb,
lib/cuda/runtime/memory.rb,
lib/cuda/runtime/stream.rb,
lib/cuda/runtime/thread.rb,
lib/cuda/runtime/version.rb,
lib/cuda/runtime/ffi-cuda.rb,
lib/cuda/runtime/function.rb
Defined Under Namespace
Modules: API, CudaMemory, Error Classes: CudaArrayFlags, CudaChannelFormatDesc, CudaChannelFormatKind, CudaComputeMode, CudaDevice, CudaDeviceFlags, CudaDeviceMemory, CudaDeviceProp, CudaError, CudaEvent, CudaEventFlags, CudaExtent, CudaFunction, CudaFunctionAttributes, CudaFunctionCache, CudaHostAllocFlags, CudaHostRegisterFlags, CudaLimit, CudaMemcpy3DParms, CudaMemcpyKind, CudaMemoryType, CudaOutputMode, CudaPitchedPtr, CudaPos, CudaStream, CudaSurfaceBoundaryMode, CudaSurfaceFormatMode, CudaTextureAddressMode, CudaTextureFilterMode, CudaTextureReadMode, CudaThread, Dim3, SurfaceReference, TextureReference
Class Method Summary collapse
-
.driver_version ⇒ Integer
The CUDA driver version.
-
.get_error_string(e) ⇒ String
The error string of e.
-
.get_last_error ⇒ Integer
The error value of the last CUDA error.
-
.peek_at_last_error ⇒ Integer
Return the last CUDA error, but do not reset the error.
-
.runtime_version ⇒ Integer
The CUDA Runtime version.
Class Method Details
.driver_version ⇒ Integer
Returns The CUDA driver version.
32 33 34 35 36 37 |
# File 'lib/cuda/runtime/version.rb', line 32 def driver_version p = FFI::MemoryPointer.new(:int) status = API::cudaDriverGetVersion(p) Pvt::handle_error(status, "Failed to query the CUDA driver version.") p.read_int end |
.get_error_string(e) ⇒ String
Returns The error string of e.
98 99 100 |
# File 'lib/cuda/runtime/error.rb', line 98 def get_error_string(e) API::cudaGetErrorString(e) end |
.get_last_error ⇒ Integer
Returns The error value of the last CUDA error.
105 106 107 |
# File 'lib/cuda/runtime/error.rb', line 105 def get_last_error API::cudaGetLastError end |
.peek_at_last_error ⇒ Integer
Return the last CUDA error, but do not reset the error.
113 114 115 |
# File 'lib/cuda/runtime/error.rb', line 113 def peek_at_last_error API::cudaPeekAtLastError end |
.runtime_version ⇒ Integer
Returns The CUDA Runtime version.
42 43 44 45 46 47 |
# File 'lib/cuda/runtime/version.rb', line 42 def runtime_version p = FFI::MemoryPointer.new(:int) status = API::cudaRuntimeGetVersion(p) Pvt::handle_error(status, "Failed to query the CUDA Runtime version.") p.read_int end |