RMM
23.12
RAPIDS Memory Manager
|
RAII class that sets the current CUDA device to the specified device on construction and restores the previous device on destruction. More...
#include <cuda_device.hpp>
Public Member Functions | |
cuda_set_device_raii (cuda_device_id dev_id) | |
Construct a new cuda_set_device_raii object and sets the current CUDA device to dev_id More... | |
~cuda_set_device_raii () noexcept | |
Reactivates the previous CUDA device. | |
cuda_set_device_raii (cuda_set_device_raii const &)=delete | |
cuda_set_device_raii & | operator= (cuda_set_device_raii const &)=delete |
cuda_set_device_raii (cuda_set_device_raii &&)=delete | |
cuda_set_device_raii & | operator= (cuda_set_device_raii &&)=delete |
RAII class that sets the current CUDA device to the specified device on construction and restores the previous device on destruction.
|
inlineexplicit |
Construct a new cuda_set_device_raii object and sets the current CUDA device to dev_id
dev_id | The device to set as the current CUDA device |