OpenVDB 13.1.0
Loading...
Searching...
No Matches
DeviceStreamMap Class Reference

map from a device ID to an associated cuda stream. Useful for multi-GPU applications. More...

#include <nanovdb/cuda/DeviceStreamMap.h>

Public Types

enum  DeviceType { Any = 0 , PeerToPeer = 1 , Unified = 3 }

Public Member Functions

 DeviceStreamMap (DeviceType t=DeviceType::Unified, std::vector< int > exclude={}, int verbose=0)
 Initiates a map between CUDA device IDs and corresponding streams that satisfy certain constraints. All devices should be able to access memory on all the other devices!
 ~DeviceStreamMap ()
 Destructor.
size_t getMinPageSize () const
 returns the minimum page size of all the devices in this map
void printDevInfo (std::FILE *file=stdout) const
 Print information about all the devices included in this map.
int deviceCount () const
 Returns the number of device associated with this map.

Detailed Description

map from a device ID to an associated cuda stream. Useful for multi-GPU applications.

Member Enumeration Documentation

◆ DeviceType

enum DeviceType
Enumerator
Any 
PeerToPeer 
Unified 

Constructor & Destructor Documentation

◆ DeviceStreamMap()

DeviceStreamMap ( DeviceType t = DeviceType::Unified,
std::vector< int > exclude = {},
int verbose = 0 )

Initiates a map between CUDA device IDs and corresponding streams that satisfy certain constraints. All devices should be able to access memory on all the other devices!

Parameters
tType of device to include in map. Any means all available devices, PeerToPeer means only devices that access all another devices are included, and Unified means all devices support unified memory, concurrent access, and can be access by all other devices.
excludeoptional list of device IDs to exclude from the map
verbose0 means quiet, 1 means print if a device is ignores and 2 means print is a device is included

◆ ~DeviceStreamMap()

Destructor.

Member Function Documentation

◆ deviceCount()

int deviceCount ( ) const
inline

Returns the number of device associated with this map.

◆ getMinPageSize()

size_t getMinPageSize ( ) const
inline

returns the minimum page size of all the devices in this map

◆ printDevInfo()

void printDevInfo ( std::FILE * file = stdout) const
inline

Print information about all the devices included in this map.