-
Notifications
You must be signed in to change notification settings - Fork 10
/
types.h
58 lines (48 loc) · 1.41 KB
/
types.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#ifndef _TYPES_H_
#define _TYPES_H_
#include "legion.h"
typedef uint32_t V_ID;
typedef uint64_t E_ID;
typedef float DATATYPE;
struct NodeStruct {
E_ID index;
};
struct EdgeStruct {
V_ID src, dst;
};
using namespace Legion;
template<typename FT, int N, typename T = coord_t> using AccessorRO = FieldAccessor<READ_ONLY,FT,N,T,Realm::AffineAccessor<FT,N,T> >;
template<typename FT, int N, typename T = coord_t> using AccessorRW = FieldAccessor<READ_WRITE,FT,N,T,Realm::AffineAccessor<FT,N,T> >;
template<typename FT, int N, typename T = coord_t> using AccessorWO = FieldAccessor<WRITE_ONLY,FT,N,T,Realm::AffineAccessor<FT,N,T> >;
enum FieldIDs {
FID_DATA,
};
class ResourceManager;
template<typename DT, int dim>
struct TensorAccessorR {
TensorAccessorR(PhysicalRegion region,
RegionRequirement req,
FieldID fid,
Context ctx,
Runtime* runtime,
ResourceManager* manager);
Rect<dim> rect;
Memory memory;
const DT *ptr;
DT *fbCache;
};
template<typename DT, int dim>
struct TensorAccessorW {
TensorAccessorW(PhysicalRegion region,
RegionRequirement req,
FieldID fid,
Context ctx,
Runtime* runtime,
ResourceManager* manager,
bool readOutput = false);
Rect<dim> rect;
Memory memory;
DT *ptr;
DT *fbCache;
};
#endif