Caffe2 - C++ API
A deep learning, cross platform ML framework
device.h
1 #pragma once
2 
3 #include <functional>
4 #include <string>
5 
6 namespace caffe2 { namespace onnx {
7 
8 enum class DeviceType {CPU=0, CUDA=1};
9 
10 struct Device {
11  Device(const std::string& spec);
12  DeviceType type;
13  int device_id{-1};
14 };
15 
16 }}
17 
18 namespace std {
19 template <> struct hash<caffe2::onnx::DeviceType> {
20  std::size_t operator()(const caffe2::onnx::DeviceType &k) const {
21  return std::hash<int>()(static_cast<int>(k));
22  }
23 };
24 } // namespace std
A global dictionary that holds information about what Caffe2 modules have been loaded in the current ...
Definition: blob.h:13