xgboost
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Friends | List of all members
xgboost::GPUSet Class Reference

#include <common.h>

Collaboration diagram for xgboost::GPUSet:
Collaboration graph

Public Types

using GpuIdType = int
 

Public Member Functions

 GPUSet (int start=0, int ndevices=0)
 
size_t Size () const
 
GpuIdType DeviceId (size_t index) const
 
size_t Index (GpuIdType device) const
 
bool IsEmpty () const
 
bool Contains (GpuIdType device) const
 
common::Range::Iterator begin () const
 
common::Range::Iterator end () const
 

Static Public Member Functions

static GPUSet Empty ()
 
static GPUSet Range (GpuIdType start, GpuIdType n_gpus)
 
static GPUSet All (GpuIdType gpu_id, GpuIdType n_gpus, GpuIdType num_rows=std::numeric_limits< GpuIdType >::max())
 n_gpus and num_rows both are upper bounds. More...
 
static GPUSet AllVisible ()
 

Static Public Attributes

static constexpr GpuIdType kAll = -1
 

Friends

bool operator== (const GPUSet &lhs, const GPUSet &rhs)
 
bool operator!= (const GPUSet &lhs, const GPUSet &rhs)
 

Member Typedef Documentation

◆ GpuIdType

Constructor & Destructor Documentation

◆ GPUSet()

xgboost::GPUSet::GPUSet ( int  start = 0,
int  ndevices = 0 
)
inlineexplicit

Member Function Documentation

◆ All()

static GPUSet xgboost::GPUSet::All ( GpuIdType  gpu_id,
GpuIdType  n_gpus,
GpuIdType  num_rows = std::numeric_limits<GpuIdType>::max() 
)
inlinestatic

n_gpus and num_rows both are upper bounds.

◆ AllVisible()

static GPUSet xgboost::GPUSet::AllVisible ( )
inlinestatic

◆ begin()

common::Range::Iterator xgboost::GPUSet::begin ( ) const
inline

◆ Contains()

bool xgboost::GPUSet::Contains ( GpuIdType  device) const
inline

◆ DeviceId()

GpuIdType xgboost::GPUSet::DeviceId ( size_t  index) const
inline

◆ Empty()

static GPUSet xgboost::GPUSet::Empty ( )
inlinestatic

◆ end()

common::Range::Iterator xgboost::GPUSet::end ( ) const
inline

◆ Index()

size_t xgboost::GPUSet::Index ( GpuIdType  device) const
inline

◆ IsEmpty()

bool xgboost::GPUSet::IsEmpty ( ) const
inline

◆ Range()

static GPUSet xgboost::GPUSet::Range ( GpuIdType  start,
GpuIdType  n_gpus 
)
inlinestatic

◆ Size()

size_t xgboost::GPUSet::Size ( ) const
inline

Friends And Related Function Documentation

◆ operator!=

bool operator!= ( const GPUSet lhs,
const GPUSet rhs 
)
friend

◆ operator==

bool operator== ( const GPUSet lhs,
const GPUSet rhs 
)
friend

Member Data Documentation

◆ kAll

constexpr GpuIdType xgboost::GPUSet::kAll = -1
static

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