Table of Contents

Class CudaDevice

Namespace
NVMathNet
Assembly
NVMath.Net.dll

Represents a CUDA device and exposes device-level operations.

public sealed class CudaDevice

Inheritance

Inherited Members

Properties

DeviceId

The CUDA device ordinal.

public int DeviceId { get; }

Property Value

int

Methods

Get(int)

Returns a NVMathNet.CudaDevice for the given ordinal.

public static CudaDevice Get(int deviceId = 0)

Parameters

deviceId int

Returns

CudaDevice

GetCurrent()

Returns a NVMathNet.CudaDevice that wraps the currently active CUDA device.

public static CudaDevice GetCurrent()

Returns

CudaDevice

GetDeviceCount()

Returns the number of CUDA-capable devices installed in the system.

public static int GetDeviceCount()

Returns

int

GetDriverVersion()

Returns the CUDA driver version (e.g. 12050 means 12.5).

public static int GetDriverVersion()

Returns

int

GetRuntimeVersion()

Returns the CUDA runtime version.

public static int GetRuntimeVersion()

Returns

int

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.