|
Uni20
Asynchronous tensor and runtime library.
|
Temporarily select one CUDA device and restore the previous device on destruction. More...
#include <runtime.hpp>
Public Member Functions | |
| int | device () const noexcept |
| Return the selected device ordinal. | |
| ScopedDevice & | operator= (ScopedDevice const &)=delete |
| ScopedDevice (int device) | |
Select device for the lifetime of this guard. | |
| ScopedDevice (ScopedDevice const &)=delete | |
| ~ScopedDevice () | |
Temporarily select one CUDA device and restore the previous device on destruction.
|
explicit |
Select device for the lifetime of this guard.
|
delete |
| uni20::cuda::ScopedDevice::~ScopedDevice | ( | ) |
|
inlinenoexcept |
Return the selected device ordinal.
|
delete |