Class CudaScopedDevice¶
Defined in File LinearAlg.hpp
Class Documentation¶
-
class CudaScopedDevice¶
CudaScopedDevice
uses RAII to select a CUDA device context.Note
A
CudaScopedDevice
instance cannot be moved or copied.Warning
This class is not thread-safe.
Public Functions
-
inline CudaScopedDevice(int device)¶
Constructs a
CudaScopedDevice
using a CUDA device.- Parameters
device – CUDA device to scope in the guard.
-
inline ~CudaScopedDevice()¶
Destructs a
CudaScopedDevice
, switching back to the previous CUDA device context.
-
CudaScopedDevice() = delete¶
-
CudaScopedDevice(const CudaScopedDevice&) = delete¶
-
CudaScopedDevice(CudaScopedDevice&&) = delete¶
-
inline CudaScopedDevice(int device)¶
api/classPennylane_1_1LightningGPU_1_1Util_1_1CudaScopedDevice
Download Python script
Download Notebook
View on GitHub