xgboost
公共类型 | 公共成员函数 | 静态公共成员函数 | 公共属性 | 所有成员列表
xgboost::DeviceOrd 结构体参考

设备序号的类型。该类型被打包成 32 位,以便在查看像 linalg::TensorView 这样的类型时高效使用。 更多...

#include <context.h>

xgboost::DeviceOrd 的协作图
Collaboration graph

公共类型

枚举  Type : std::int16_t {
  kCPU = 0 , kCUDA = 1 , kSyclDefault = 2 , kSyclCPU = 3 ,
  kSyclGPU = 4
}
 

公共成员函数

bool IsCUDA () const
 
bool IsCPU () const
 
bool IsSyclDefault () const
 
bool IsSyclCPU () const
 
bool IsSyclGPU () const
 
bool IsSycl () const
 
constexpr DeviceOrd ()=default
 
constexpr DeviceOrd (Type type, bst_d_ordinal_t ord)
 
constexpr DeviceOrd (DeviceOrd const &that)=default
 
constexpr DeviceOrdoperator= (DeviceOrd const &that)=default
 
constexpr DeviceOrd (DeviceOrd &&that)=default
 
constexpr DeviceOrdoperator= (DeviceOrd &&that)=default
 
bool operator== (DeviceOrd const &that) const
 
bool operator!= (DeviceOrd const &that) const
 
std::string Name () const
 获取设备及其序号的字符串表示。 更多...
 

静态公共成员函数

static constexpr bst_d_ordinal_t CPUOrdinal ()
 
static constexpr bst_d_ordinal_t InvalidOrdinal ()
 
constexpr static auto CPU ()
 CPU 的构造函数。 更多...
 
static constexpr auto CUDA (bst_d_ordinal_t ordinal)
 CUDA 设备的构造函数。 更多...
 
constexpr static auto SyclDefault (bst_d_ordinal_t ordinal=-1)
 SYCL 的构造函数。 更多...
 
constexpr static auto SyclCPU (bst_d_ordinal_t ordinal=-1)
 SYCL CPU 的构造函数。 更多...
 
constexpr static auto SyclGPU (bst_d_ordinal_t ordinal=-1)
 SYCL GPU 的构造函数。 更多...
 

公共属性

枚举 xgboost::DeviceOrd::Type kCPU
 
bst_d_ordinal_t ordinal {CPUOrdinal()}
 

详细描述

设备序号的类型。该类型被打包成 32 位,以便在查看像 linalg::TensorView 这样的类型时高效使用。

成员枚举文档

◆ Type

枚举 xgboost::DeviceOrd::Type : std::int16_t
枚举器
kCPU 
kCUDA 
kSyclDefault 
kSyclCPU 
kSyclGPU 

构造函数和析构函数文档

◆ DeviceOrd() [1/4]

constexpr xgboost::DeviceOrd::DeviceOrd ( )
constexprdefault

◆ DeviceOrd() [2/4]

constexpr xgboost::DeviceOrd::DeviceOrd ( Type  type,
bst_d_ordinal_t  ord 
)
inlineconstexpr

◆ DeviceOrd() [3/4]

constexpr xgboost::DeviceOrd::DeviceOrd ( DeviceOrd const &  that)
constexprdefault

◆ DeviceOrd() [4/4]

constexpr xgboost::DeviceOrd::DeviceOrd ( DeviceOrd &&  that)
constexprdefault

成员函数文档

◆ CPU()

constexpr static auto xgboost::DeviceOrd::CPU ( )
inlinestaticconstexpr

CPU 的构造函数。

◆ CPUOrdinal()

static constexpr bst_d_ordinal_t xgboost::DeviceOrd::CPUOrdinal ( )
inlinestaticconstexpr

◆ CUDA()

static constexpr auto xgboost::DeviceOrd::CUDA ( bst_d_ordinal_t  ordinal)
inlinestaticconstexpr

CUDA 设备的构造函数。

参数
ordinalCUDA 设备序号。

◆ InvalidOrdinal()

static constexpr bst_d_ordinal_t xgboost::DeviceOrd::InvalidOrdinal ( )
inlinestaticconstexpr

◆ IsCPU()

bool xgboost::DeviceOrd::IsCPU ( ) const
inline

◆ IsCUDA()

bool xgboost::DeviceOrd::IsCUDA ( ) const
inline

◆ IsSycl()

bool xgboost::DeviceOrd::IsSycl ( ) const
inline

◆ IsSyclCPU()

bool xgboost::DeviceOrd::IsSyclCPU ( ) const
inline

◆ IsSyclDefault()

bool xgboost::DeviceOrd::IsSyclDefault ( ) const
inline

◆ IsSyclGPU()

bool xgboost::DeviceOrd::IsSyclGPU ( ) const
inline

◆ Name()

std::string xgboost::DeviceOrd::Name ( ) const
inline

获取设备及其序号的字符串表示。

◆ operator!=()

bool xgboost::DeviceOrd::operator!= ( DeviceOrd const &  that) const
inline

◆ operator=() [1/2]

constexpr DeviceOrd& xgboost::DeviceOrd::operator= ( DeviceOrd &&  that)
constexprdefault

◆ operator=() [2/2]

constexpr DeviceOrd& xgboost::DeviceOrd::operator= ( DeviceOrd const &  that)
constexprdefault

◆ operator==()

bool xgboost::DeviceOrd::operator== ( DeviceOrd const &  that) const
inline

◆ SyclCPU()

constexpr static auto xgboost::DeviceOrd::SyclCPU ( bst_d_ordinal_t  ordinal = -1)
inlinestaticconstexpr

SYCL CPU 的构造函数。

参数
ordinalSYCL CPU 设备序号。

◆ SyclDefault()

constexpr static auto xgboost::DeviceOrd::SyclDefault ( bst_d_ordinal_t  ordinal = -1)
inlinestaticconstexpr

SYCL 的构造函数。

参数
ordinalSYCL 设备序号。

◆ SyclGPU()

constexpr static auto xgboost::DeviceOrd::SyclGPU ( bst_d_ordinal_t  ordinal = -1)
inlinestaticconstexpr

SYCL GPU 的构造函数。

参数
ordinalSYCL GPU 设备序号。

成员数据文档

◆ kCPU

enum xgboost::DeviceOrd::Type xgboost::DeviceOrd::kCPU

◆ ordinal

bst_d_ordinal_t xgboost::DeviceOrd::ordinal {CPUOrdinal()}

此结构体的文档生成自以下文件: