A simple device description struct.
More...
#include <ActsPlugins/Gnn/Tensor.hpp>
|
| enum class | Type { eCPU
, eCUDA
} |
| | Device type enumeration.
|
|
| bool | isCpu () const |
| | Check if device is configured for CPU execution.
|
| bool | isCuda () const |
| | Check if device is configured for CUDA execution.
|
| bool | operator== (const Device &) const =default |
| | Compare two device descriptors for equality.
|
|
| static Device | Cpu () |
| | Create a CPU device descriptor.
|
| static Device | Cuda (std::size_t index=0) |
| | Create a CUDA device descriptor.
|
|
|
std::size_t | index = 0 |
| | Device index for multi-GPU systems.
|
|
Type | type = Type::eCPU |
| | Device type (CPU or CUDA).
|
A simple device description struct.
◆ Cpu()
| Device ActsPlugins::Device::Cpu |
( |
| ) |
|
|
static |
Create a CPU device descriptor.
- Returns
- Device object configured for CPU execution
◆ Cuda()
| Device ActsPlugins::Device::Cuda |
( |
std::size_t | index = 0 | ) |
|
|
static |
Create a CUDA device descriptor.
- Parameters
-
| index | GPU device index for multi-GPU systems (default: 0) |
- Returns
- Device object configured for CUDA execution on specified GPU
◆ isCpu()
| bool ActsPlugins::Device::isCpu |
( |
| ) |
const |
Check if device is configured for CPU execution.
- Returns
- True if device type is CPU, false otherwise
◆ isCuda()
| bool ActsPlugins::Device::isCuda |
( |
| ) |
const |
Check if device is configured for CUDA execution.
- Returns
- True if device type is CUDA, false otherwise
◆ operator==()
| bool ActsPlugins::Device::operator== |
( |
const Device & | | ) |
const |
|
default |
Compare two device descriptors for equality.
- Returns
- True if both devices have same type and index