30 : device_type(device_type_),
31 memory_type(memory_type_),
32 device_id(device_id_) {}
49 std::ostringstream ostr;
51 <<
"DeviceType:" <<
static_cast<int>(device_type)
52 <<
" MemoryType:" << static_cast<int>(memory_type)
53 <<
" DeviceId:" << device_id
60 auto h = std::hash<int>()(device_type);
68 if (device_type != other.device_type)
69 return device_type < other.device_type;
70 if (memory_type != other.memory_type)
71 return memory_type < other.memory_type;
73 return device_id < other.device_id;
78 int32_t device_type : 8;
81 int32_t memory_type : 8;
84 int32_t device_id : 16;
92 return !(left == other);
GLsizei const GLchar *const * string
static const DeviceType FPGA
size_t operator()(const OrtDevice &i) const
static const MemoryType DEFAULT
bool operator<(const OrtDevice &other) const
void HashCombine(const T &value, size_t &seed)
bool operator!=(const Mat3< T0 > &m0, const Mat3< T1 > &m1)
Inequality operator, does exact floating point comparisons.
constexpr OrtDevice(DeviceType device_type_, MemoryType memory_type_, DeviceId device_id_)
MemoryType MemType() const
static const DeviceType GPU
static const DeviceType CPU
GLfloat GLfloat GLfloat GLfloat h
static const MemoryType CUDA_PINNED
static const MemoryType HIP_PINNED
static const MemoryType CANN_PINNED
static const DeviceType NPU
bool operator==(const Mat3< T0 > &m0, const Mat3< T1 > &m1)
Equality operator, does exact floating point comparisons.
std::string ToString() const