Class CudaDeviceScope
Restores the previous CUDA current device when disposed. 在释放时恢复之前的 CUDA 当前设备。
public sealed class CudaDeviceScope : IDisposable
- Inheritance
-
CudaDeviceScope
- Implements
- Inherited Members
Properties
CurrentDevice
Gets the CUDA device that is active inside this scope. 获取该作用域内当前激活的 CUDA 设备。
public int CurrentDevice { get; }
Property Value
PreviousDevice
Gets the CUDA device that was active before the scope was created. 获取创建该作用域之前处于激活状态的 CUDA 设备。
public int PreviousDevice { get; }
Property Value
Methods
Dispose()
Restores the previous CUDA current device. 恢复之前的 CUDA 当前设备。
public void Dispose()