Cytnx v1.0.0
Loading...
Searching...
No Matches
Device.hpp
Go to the documentation of this file.
1#ifndef CYTNX_DEVICE_H_
2#define CYTNX_DEVICE_H_
3
4#include <vector>
5#include <string>
6
7namespace cytnx {
8
10 struct __device {
11 enum __pybind_device { cpu = -1, cuda = 0 };
12 };
13
14 class Device_class {
15 public:
16 enum : int { cpu = -1, cuda = 0 };
17 int Ngpus;
18 int Ncpus;
19 std::vector<std::vector<bool>> CanAccessPeer;
20 Device_class();
21 void Print_Property();
22 std::string getname(const int &device_id);
23 ~Device_class();
24 // void cudaDeviceSynchronize();
25 };
27
43 extern Device_class Device;
44} // namespace cytnx
45
46#endif // CYTNX_DEVICE_H_
Definition Accessor.hpp:12
Device_class Device
data on which devices.