RMM  23.12
RAPIDS Memory Manager
Public Member Functions | List of all members
rmm::cuda_set_device_raii Struct Reference

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_raiioperator= (cuda_set_device_raii const &)=delete
 
 cuda_set_device_raii (cuda_set_device_raii &&)=delete
 
cuda_set_device_raiioperator= (cuda_set_device_raii &&)=delete
 

Detailed Description

RAII class that sets the current CUDA device to the specified device on construction and restores the previous device on destruction.

Constructor & Destructor Documentation

◆ cuda_set_device_raii()

rmm::cuda_set_device_raii::cuda_set_device_raii ( cuda_device_id  dev_id)
inlineexplicit

Construct a new cuda_set_device_raii object and sets the current CUDA device to dev_id

Parameters
dev_idThe device to set as the current CUDA device

The documentation for this struct was generated from the following file: