Cytnx v0.9.1
Loading...
Searching...
No Matches
Device.hpp
Go to the documentation of this file.
1#ifndef _H_Device_
2#define _H_Device_
3#include <vector>
4#include <string>
5
6namespace cytnx {
7
9 struct __device {
10 enum __pybind_device { cpu = -1, cuda = 0 };
11 };
12
13 class Device_class {
14 public:
15 enum : int { cpu = -1, cuda = 0 };
16 int Ngpus;
17 int Ncpus;
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#endif
Definition Accessor.hpp:12
Device_class Device
data on which devices.