3333
3434#define OFFLOAD_DEVICE_DEFAULT -1
3535
36- // Don't format out enums and structs.
37- // clang-format off
38-
3936// / return flags of __tgt_target_XXX public APIs
4037enum __tgt_target_return_t : int {
4138 // / successful offload executed on a target device
@@ -51,39 +48,39 @@ enum __tgt_target_return_t : int {
5148// / Data attributes for each data reference used in an OpenMP target region.
5249enum tgt_map_type {
5350 // No flags
54- OMP_TGT_MAPTYPE_NONE = 0x000 ,
51+ OMP_TGT_MAPTYPE_NONE = 0x000 ,
5552 // copy data from host to device
56- OMP_TGT_MAPTYPE_TO = 0x001 ,
53+ OMP_TGT_MAPTYPE_TO = 0x001 ,
5754 // copy data from device to host
58- OMP_TGT_MAPTYPE_FROM = 0x002 ,
55+ OMP_TGT_MAPTYPE_FROM = 0x002 ,
5956 // copy regardless of the reference count
60- OMP_TGT_MAPTYPE_ALWAYS = 0x004 ,
57+ OMP_TGT_MAPTYPE_ALWAYS = 0x004 ,
6158 // force unmapping of data
62- OMP_TGT_MAPTYPE_DELETE = 0x008 ,
59+ OMP_TGT_MAPTYPE_DELETE = 0x008 ,
6360 // map the pointer as well as the pointee
64- OMP_TGT_MAPTYPE_PTR_AND_OBJ = 0x010 ,
61+ OMP_TGT_MAPTYPE_PTR_AND_OBJ = 0x010 ,
6562 // pass device base address to kernel
66- OMP_TGT_MAPTYPE_TARGET_PARAM = 0x020 ,
63+ OMP_TGT_MAPTYPE_TARGET_PARAM = 0x020 ,
6764 // return base device address of mapped data
68- OMP_TGT_MAPTYPE_RETURN_PARAM = 0x040 ,
65+ OMP_TGT_MAPTYPE_RETURN_PARAM = 0x040 ,
6966 // private variable - not mapped
70- OMP_TGT_MAPTYPE_PRIVATE = 0x080 ,
67+ OMP_TGT_MAPTYPE_PRIVATE = 0x080 ,
7168 // copy by value - not mapped
72- OMP_TGT_MAPTYPE_LITERAL = 0x100 ,
69+ OMP_TGT_MAPTYPE_LITERAL = 0x100 ,
7370 // mapping is implicit
74- OMP_TGT_MAPTYPE_IMPLICIT = 0x200 ,
71+ OMP_TGT_MAPTYPE_IMPLICIT = 0x200 ,
7572 // copy data to device
76- OMP_TGT_MAPTYPE_CLOSE = 0x400 ,
73+ OMP_TGT_MAPTYPE_CLOSE = 0x400 ,
7774 // runtime error if not already allocated
78- OMP_TGT_MAPTYPE_PRESENT = 0x1000 ,
75+ OMP_TGT_MAPTYPE_PRESENT = 0x1000 ,
7976 // use a separate reference counter so that the data cannot be unmapped within
8077 // the structured region
8178 // 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 ,
8380 // descriptor for non-contiguous target-update
84- OMP_TGT_MAPTYPE_NON_CONTIG = 0x100000000000 ,
81+ OMP_TGT_MAPTYPE_NON_CONTIG = 0x100000000000 ,
8582 // member of struct, member given by [16 MSBs] - 1
86- OMP_TGT_MAPTYPE_MEMBER_OF = 0xffff000000000000
83+ OMP_TGT_MAPTYPE_MEMBER_OF = 0xffff000000000000
8784};
8885
8986// / Flags for offload entries.
@@ -105,9 +102,9 @@ enum TargetAllocTy : int32_t {
105102 TARGET_ALLOC_DEVICE_NON_BLOCKING,
106103};
107104
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 };
111108
112109struct DeviceTy ;
113110
@@ -269,8 +266,6 @@ struct __tgt_target_non_contig {
269266 uint64_t Stride;
270267};
271268
272- // clang-format on
273-
274269#ifdef __cplusplus
275270extern " C" {
276271#endif
0 commit comments