@@ -11,10 +11,10 @@ const std::string DEVICE_INFO_DELIM = "%";
11
11
12
12
typedef enum { ID_IDX = 0 , SM_MAJOR_IDX, SM_MINOR_IDX, DEVICE_TYPE_IDX, DEVICE_NAME_IDX } SerializedDeviceInfoIndex;
13
13
14
- CudaDevice::CudaDevice () : id{-1 }, major{-1 }, minor{-1 }, device_type{nvinfer1::DeviceType::kGPU } {}
14
+ CUDADevice::CUDADevice () : id{-1 }, major{-1 }, minor{-1 }, device_type{nvinfer1::DeviceType::kGPU } {}
15
15
16
- CudaDevice::CudaDevice (int64_t gpu_id, nvinfer1::DeviceType device_type) {
17
- CudaDevice cuda_device;
16
+ CUDADevice::CUDADevice (int64_t gpu_id, nvinfer1::DeviceType device_type) {
17
+ CUDADevice cuda_device;
18
18
cudaDeviceProp device_prop;
19
19
20
20
// Device ID
@@ -41,7 +41,7 @@ CudaDevice::CudaDevice(int64_t gpu_id, nvinfer1::DeviceType device_type) {
41
41
// NOTE: Serialization Format for Device Info:
42
42
// id%major%minor%(enum)device_type%device_name
43
43
44
- CudaDevice::CudaDevice (std::string device_info) {
44
+ CUDADevice::CUDADevice (std::string device_info) {
45
45
LOG_DEBUG (" Deserializing Device Info: " << device_info);
46
46
47
47
std::vector<std::string> tokens;
@@ -66,7 +66,7 @@ CudaDevice::CudaDevice(std::string device_info) {
66
66
LOG_DEBUG (" Deserialized Device Info: " << *this );
67
67
}
68
68
69
- CudaDevice& CudaDevice ::operator =(const CudaDevice & other) {
69
+ CUDADevice& CUDADevice ::operator =(const CUDADevice & other) {
70
70
id = other.id ;
71
71
major = other.major ;
72
72
minor = other.minor ;
@@ -75,7 +75,7 @@ CudaDevice& CudaDevice::operator=(const CudaDevice& other) {
75
75
return (*this );
76
76
}
77
77
78
- std::string CudaDevice ::serialize () {
78
+ std::string CUDADevice ::serialize () {
79
79
std::vector<std::string> content;
80
80
content.resize (DEVICE_NAME_IDX + 1 );
81
81
@@ -98,13 +98,13 @@ std::string CudaDevice::serialize() {
98
98
return serialized_device_info;
99
99
}
100
100
101
- std::string CudaDevice ::getSMCapability () const {
101
+ std::string CUDADevice ::getSMCapability () const {
102
102
std::stringstream ss;
103
103
ss << major << " ." << minor;
104
104
return ss.str ();
105
105
}
106
106
107
- std::ostream& operator <<(std::ostream& os, const CudaDevice & device) {
107
+ std::ostream& operator <<(std::ostream& os, const CUDADevice & device) {
108
108
os << " Device(ID: " << device.id << " , Name: " << device.device_name << " , SM Capability: " << device.major << ' .'
109
109
<< device.minor << " , Type: " << device.device_type << ' )' ;
110
110
return os;
0 commit comments