All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
Files | Classes | Functions
CUDA Device Management

Files

file  cuda_device.hpp
 

Classes

struct  rmm::cuda_device_id
 Strong type for a CUDA device identifier. More...
 
struct  rmm::cuda_set_device_raii
 RAII class that sets the current CUDA device to the specified device on construction and restores the previous device on destruction. More...
 

Functions

cuda_device_id rmm::get_current_cuda_device ()
 Returns a cuda_device_id for the current device. More...
 
int rmm::get_num_cuda_devices ()
 Returns the number of CUDA devices in the system. More...
 
std::pair< std::size_t, std::size_t > rmm::available_device_memory ()
 Returns the available and total device memory in bytes for the current device. More...
 
std::size_t rmm::percent_of_free_device_memory (int percent)
 Returns the approximate specified percent of available device memory on the current CUDA device, aligned (down) to the nearest CUDA allocation size. More...
 

Detailed Description

Function Documentation

◆ available_device_memory()

std::pair<std::size_t, std::size_t> rmm::available_device_memory ( )
inline

Returns the available and total device memory in bytes for the current device.

Returns
The available and total device memory in bytes for the current device as a std::pair.

◆ get_current_cuda_device()

cuda_device_id rmm::get_current_cuda_device ( )
inline

Returns a cuda_device_id for the current device.

The current device is the device on which the calling thread executes device code.

Returns
cuda_device_id for the current device

◆ get_num_cuda_devices()

int rmm::get_num_cuda_devices ( )
inline

Returns the number of CUDA devices in the system.

Returns
Number of CUDA devices in the system

◆ percent_of_free_device_memory()

std::size_t rmm::percent_of_free_device_memory ( int  percent)
inline

Returns the approximate specified percent of available device memory on the current CUDA device, aligned (down) to the nearest CUDA allocation size.

Parameters
percentThe percent of free memory to return.
Returns
The recommended initial device memory pool size in bytes.