Class CudaDevice
- Namespace
- NVMathNet
- Assembly
- NVMath.Net.dll
Represents a CUDA device and exposes device-level operations.
public sealed class CudaDeviceInheritance
Inherited Members
Properties
DeviceId
The CUDA device ordinal.
public int DeviceId { get; }Property Value
Methods
Get(int)
Returns a NVMathNet.CudaDevice for the given ordinal.
public static CudaDevice Get(int deviceId = 0)Parameters
deviceIdint
Returns
GetCurrent()
Returns a NVMathNet.CudaDevice that wraps the currently active CUDA device.
public static CudaDevice GetCurrent()Returns
GetDeviceCount()
Returns the number of CUDA-capable devices installed in the system.
public static int GetDeviceCount()Returns
GetDriverVersion()
Returns the CUDA driver version (e.g. 12050 means 12.5).
public static int GetDriverVersion()Returns
GetRuntimeVersion()
Returns the CUDA runtime version.
public static int GetRuntimeVersion()Returns
SetAsCurrent()
Sets this device as the current CUDA device for the calling thread.
public void SetAsCurrent()Synchronize()
Blocks until all operations enqueued on this device are complete. For async alternatives prefer NVMathNet.CudaStream.SynchronizeAsync(System.Threading.CancellationToken).
public void Synchronize()ToString()
Returns a string that represents the current object.
public override string ToString()Returns
- string
-
A string that represents the current object.