Cytnx v0.7.4
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{
11 cpu=-1,
12 cuda=0
13 };
14 };
15
16
17 class Device_class{
18 public:
19 enum:int{
20 cpu=-1,
21 cuda=0
22 };
23 int Ngpus;
24 int Ncpus;
25 std::vector<std::vector<bool> > CanAccessPeer;
26 Device_class();
27 void Print_Property();
28 std::string getname(const int &device_id);
29 //void cudaDeviceSynchronize();
30
31 };
33
34 extern Device_class Device;
35}//namespace cytnx
36#endif
Definition Accessor.hpp:12
Device_class Device
Definition Device.cpp:105