Cytnx 1.1.2.dev761+ge28145acd
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 std::vector<std::vector<bool>> CanAccessPeer;
19 Device_class();
20 void Print_Property();
21 std::string getname(const int &device_id);
22 ~Device_class();
23 // void cudaDeviceSynchronize();
24 };
26
42 extern Device_class Device;
43} // namespace cytnx
44
45#endif // CYTNX_DEVICE_H_
Definition Accessor.hpp:12
Device_class Device
data on which devices.