33
33
34
34
#define OFFLOAD_DEVICE_DEFAULT -1
35
35
36
- // Don't format out enums and structs.
37
- // clang-format off
38
-
39
36
// / return flags of __tgt_target_XXX public APIs
40
37
enum __tgt_target_return_t : int {
41
38
// / successful offload executed on a target device
@@ -51,39 +48,39 @@ enum __tgt_target_return_t : int {
51
48
// / Data attributes for each data reference used in an OpenMP target region.
52
49
enum tgt_map_type {
53
50
// No flags
54
- OMP_TGT_MAPTYPE_NONE = 0x000 ,
51
+ OMP_TGT_MAPTYPE_NONE = 0x000 ,
55
52
// copy data from host to device
56
- OMP_TGT_MAPTYPE_TO = 0x001 ,
53
+ OMP_TGT_MAPTYPE_TO = 0x001 ,
57
54
// copy data from device to host
58
- OMP_TGT_MAPTYPE_FROM = 0x002 ,
55
+ OMP_TGT_MAPTYPE_FROM = 0x002 ,
59
56
// copy regardless of the reference count
60
- OMP_TGT_MAPTYPE_ALWAYS = 0x004 ,
57
+ OMP_TGT_MAPTYPE_ALWAYS = 0x004 ,
61
58
// force unmapping of data
62
- OMP_TGT_MAPTYPE_DELETE = 0x008 ,
59
+ OMP_TGT_MAPTYPE_DELETE = 0x008 ,
63
60
// map the pointer as well as the pointee
64
- OMP_TGT_MAPTYPE_PTR_AND_OBJ = 0x010 ,
61
+ OMP_TGT_MAPTYPE_PTR_AND_OBJ = 0x010 ,
65
62
// pass device base address to kernel
66
- OMP_TGT_MAPTYPE_TARGET_PARAM = 0x020 ,
63
+ OMP_TGT_MAPTYPE_TARGET_PARAM = 0x020 ,
67
64
// return base device address of mapped data
68
- OMP_TGT_MAPTYPE_RETURN_PARAM = 0x040 ,
65
+ OMP_TGT_MAPTYPE_RETURN_PARAM = 0x040 ,
69
66
// private variable - not mapped
70
- OMP_TGT_MAPTYPE_PRIVATE = 0x080 ,
67
+ OMP_TGT_MAPTYPE_PRIVATE = 0x080 ,
71
68
// copy by value - not mapped
72
- OMP_TGT_MAPTYPE_LITERAL = 0x100 ,
69
+ OMP_TGT_MAPTYPE_LITERAL = 0x100 ,
73
70
// mapping is implicit
74
- OMP_TGT_MAPTYPE_IMPLICIT = 0x200 ,
71
+ OMP_TGT_MAPTYPE_IMPLICIT = 0x200 ,
75
72
// copy data to device
76
- OMP_TGT_MAPTYPE_CLOSE = 0x400 ,
73
+ OMP_TGT_MAPTYPE_CLOSE = 0x400 ,
77
74
// runtime error if not already allocated
78
- OMP_TGT_MAPTYPE_PRESENT = 0x1000 ,
75
+ OMP_TGT_MAPTYPE_PRESENT = 0x1000 ,
79
76
// use a separate reference counter so that the data cannot be unmapped within
80
77
// the structured region
81
78
// This is an OpenMP extension for the sake of OpenACC support.
82
- OMP_TGT_MAPTYPE_OMPX_HOLD = 0x2000 ,
79
+ OMP_TGT_MAPTYPE_OMPX_HOLD = 0x2000 ,
83
80
// descriptor for non-contiguous target-update
84
- OMP_TGT_MAPTYPE_NON_CONTIG = 0x100000000000 ,
81
+ OMP_TGT_MAPTYPE_NON_CONTIG = 0x100000000000 ,
85
82
// member of struct, member given by [16 MSBs] - 1
86
- OMP_TGT_MAPTYPE_MEMBER_OF = 0xffff000000000000
83
+ OMP_TGT_MAPTYPE_MEMBER_OF = 0xffff000000000000
87
84
};
88
85
89
86
// / Flags for offload entries.
@@ -105,9 +102,9 @@ enum TargetAllocTy : int32_t {
105
102
TARGET_ALLOC_DEVICE_NON_BLOCKING,
106
103
};
107
104
108
- inline KernelArgsTy CTorDTorKernelArgs = {1 , 0 , nullptr , nullptr ,
109
- nullptr , nullptr , nullptr , nullptr ,
110
- 0 , {0 ,0 , 0 }, {1 , 0 , 0 }, {1 , 0 , 0 }, 0 };
105
+ inline KernelArgsTy CTorDTorKernelArgs = {
106
+ 1 , 0 , nullptr , nullptr , nullptr , nullptr , nullptr ,
107
+ nullptr , 0 , {0 , 0 , 0 }, {1 , 0 , 0 }, {1 , 0 , 0 }, 0 };
111
108
112
109
struct DeviceTy ;
113
110
0 commit comments