34 explicit Device(
const std::string& device_type,
int device_id);
37 explicit Device(
const std::string& type_colon_id);
115 return std::hash<std::string>{}(device.
ToString());
bool IsCUDA() const
Returns true iff device type is CUDA.
static std::vector< Device > GetAvailableSYCLDevices()
Returns a vector of available SYCL device.
DeviceType GetType() const
Returns type of the device, e.g. DeviceType::CPU, DeviceType::CUDA.
Device()=default
Default constructor -> "CPU:0".
static std::vector< Device > GetAvailableCUDADevices()
Returns a vector of available CUDA device.
bool IsCPU() const
Returns true iff device type is CPU.
static std::vector< Device > GetAvailableDevices()
Returns a vector of available devices.
DeviceType
Type for device.
bool operator==(const Device &other) const
static std::vector< Device > GetAvailableCPUDevices()
Returns a vector of available CPU device.
std::string ToString() const
Returns string representation of device, e.g. "CPU:0", "CUDA:0".
int GetID() const
Returns the device index (within the same device type).
bool operator!=(const Device &other) const
static void PrintAvailableDevices()
Print all available devices.
bool IsSYCL() const
Returns true iff device type is SYCL GPU.
bool operator<(const Device &other) const
bool IsAvailable() const
Returns true if the device is available.
virtual ~IsDevice()=default
virtual core::Device GetDevice() const =0
Generic file read and write utility for python interface.
std::size_t operator()(const cloudViewer::core::Device &device) const
bool operator()(const cloudViewer::core::Device &lhs, const cloudViewer::core::Device &rhs) const