Module: SGC::CU

Includes:
Memory
Defined in:
lib/cuda/driver/cu.rb,
lib/cuda/driver/init.rb,
lib/cuda/driver/error.rb,
lib/cuda/driver/event.rb,
lib/cuda/driver/device.rb,
lib/cuda/driver/ffi-cu.rb,
lib/cuda/driver/memory.rb,
lib/cuda/driver/module.rb,
lib/cuda/driver/stream.rb,
lib/cuda/driver/context.rb,
lib/cuda/driver/version.rb,
lib/cuda/driver/function.rb,
lib/cuda/driver/deviceptr.rb

Defined Under Namespace

Modules: API, CUMemory, Error Classes: CUAddressMode, CUArrayFormat, CUComputeMode, CUContext, CUContextFlags, CUDevProp, CUDevice, CUDeviceAttribute, CUDevicePtr, CUEvent, CUEventFlags, CUFilterMode, CUFunction, CUFunctionAttribute, CUFunctionCache, CUInit, CUJitFallBack, CUJitOption, CUJitTarget, CULimit, CUMemoryType, CUModule, CUPointerAttribute, CUResult, CUStream, CUTexRefFlags, CudaArray3DDescriptor, CudaArrayDescriptor, CudaMemcpy2D, CudaMemcpy3D, CudaMemcpy3DPeer

Class Method Summary collapse

Class Method Details

.driver_versionInteger

Returns The CUDA driver version.

Returns:

  • (Integer)

    The CUDA driver version.



33
34
35
36
37
38
# File 'lib/cuda/driver/version.rb', line 33

def driver_version
    p = FFI::MemoryPointer.new(:int)
    status = API::cuDriverGetVersion(p)
    Pvt::handle_error(status, "Failed to get the CUDA driver version.")
    p.read_int
end