A type for device ordinal.
More...
#include <context.h>
|
| enum | Type : std::int16_t { kCPU = 0
, kCUDA = 1
} |
| |
|
|
bool | IsCUDA () const |
| |
|
bool | IsCPU () const |
| |
|
constexpr | DeviceOrd (Type type, bst_d_ordinal_t ord) |
| |
|
| DeviceOrd (DeviceOrd const &that)=default |
| |
|
DeviceOrd & | operator= (DeviceOrd const &that)=default |
| |
|
| DeviceOrd (DeviceOrd &&that)=default |
| |
|
DeviceOrd & | operator= (DeviceOrd &&that)=default |
| |
|
bool | operator== (DeviceOrd const &that) const |
| |
|
bool | operator!= (DeviceOrd const &that) const |
| |
|
std::string | Name () const |
| | Get a string representation of the device and the ordinal.
|
| |
|
|
static constexpr auto | CPU () |
| | Constructor for CPU.
|
| |
| static auto | CUDA (bst_d_ordinal_t ordinal) |
| | Constructor for CUDA device.
|
| |
A type for device ordinal.
The type is packed into 32-bit for efficient use in viewing types like linalg::TensorView.
◆ CUDA()
Constructor for CUDA device.
- Parameters
-
| ordinal | CUDA device ordinal. |
The documentation for this struct was generated from the following file: