Open3D (C++ API)
|
#include <Device.h>
Public Types | |
enum | DeviceType { DeviceType::CPU = 0, DeviceType::CUDA = 1 } |
Type for device. More... | |
Public Member Functions | |
Device () | |
Defalut constructor. More... | |
Device (DeviceType device_type, int device_id) | |
Constructor with device specified. More... | |
Device (const std::string &device_type, int device_id) | |
Constructor from device type string and device id. More... | |
Device (const std::string &type_colon_id) | |
Constructor from string, e.g. "CUDA:0". More... | |
bool | operator== (const Device &other) const |
bool | operator!= (const Device &other) const |
std::string | ToString () const |
DeviceType | GetType () const |
int | GetID () const |
Protected Member Functions | |
void | AssertCPUDeviceIDIsZero () |
Static Protected Member Functions | |
static DeviceType | StringToDeviceType (const std::string &type_colon_id) |
static int | StringToDeviceId (const std::string &type_colon_id) |
Protected Attributes | |
DeviceType | device_type_ |
int | device_id_ |
Device context specifying device type and device id. For CPU, there is only one device with id 0
|
strong |
|
inline |
Defalut constructor.
|
inline |
Constructor with device specified.
|
inline |
Constructor from device type string and device id.
|
inline |
Constructor from string, e.g. "CUDA:0".
|
inlineprotected |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlinestaticprotected |
|
inlinestaticprotected |
|
inline |
|
protected |
|
protected |