diff options
Diffstat (limited to 'include/gomp-constants.h')
-rw-r--r-- | include/gomp-constants.h | 44 |
1 files changed, 43 insertions, 1 deletions
diff --git a/include/gomp-constants.h b/include/gomp-constants.h index 7d6b85f..0bcfd2c 100644 --- a/include/gomp-constants.h +++ b/include/gomp-constants.h @@ -176,6 +176,11 @@ enum gomp_map_kind /* Decrement usage count and deallocate if zero. */ GOMP_MAP_RELEASE = (GOMP_MAP_FLAG_SPECIAL_2 | GOMP_MAP_DELETE), + /* Mapping kinds for allocatable arrays. */ + GOMP_MAP_DECLARE_ALLOCATE = (GOMP_MAP_FLAG_SPECIAL_4 + | GOMP_MAP_FORCE_TO), + GOMP_MAP_DECLARE_DEALLOCATE = (GOMP_MAP_FLAG_SPECIAL_4 + | GOMP_MAP_FORCE_FROM), /* The attach/detach mappings below use the OMP_CLAUSE_SIZE field as a bias. This will typically be zero, except when mapping an array slice with a non-zero base. In that case the bias will indicate the @@ -188,6 +193,26 @@ enum gomp_map_kind /* In OpenACC, detach a pointer to a mapped struct field. */ GOMP_MAP_FORCE_DETACH = (GOMP_MAP_DEEP_COPY | GOMP_MAP_FLAG_FORCE | 1), + /* Mapping kinds for non-contiguous arrays. */ + GOMP_MAP_NONCONTIG_ARRAY = (GOMP_MAP_FLAG_SPECIAL_3), + GOMP_MAP_NONCONTIG_ARRAY_TO = (GOMP_MAP_NONCONTIG_ARRAY + | GOMP_MAP_TO), + GOMP_MAP_NONCONTIG_ARRAY_FROM = (GOMP_MAP_NONCONTIG_ARRAY + | GOMP_MAP_FROM), + GOMP_MAP_NONCONTIG_ARRAY_TOFROM = (GOMP_MAP_NONCONTIG_ARRAY + | GOMP_MAP_TOFROM), + GOMP_MAP_NONCONTIG_ARRAY_FORCE_TO = (GOMP_MAP_NONCONTIG_ARRAY_TO + | GOMP_MAP_FLAG_FORCE), + GOMP_MAP_NONCONTIG_ARRAY_FORCE_FROM = (GOMP_MAP_NONCONTIG_ARRAY_FROM + | GOMP_MAP_FLAG_FORCE), + GOMP_MAP_NONCONTIG_ARRAY_FORCE_TOFROM = (GOMP_MAP_NONCONTIG_ARRAY_TOFROM + | GOMP_MAP_FLAG_FORCE), + GOMP_MAP_NONCONTIG_ARRAY_ALLOC = (GOMP_MAP_NONCONTIG_ARRAY + | GOMP_MAP_ALLOC), + GOMP_MAP_NONCONTIG_ARRAY_FORCE_ALLOC = (GOMP_MAP_NONCONTIG_ARRAY + | GOMP_MAP_FORCE_ALLOC), + GOMP_MAP_NONCONTIG_ARRAY_FORCE_PRESENT = (GOMP_MAP_NONCONTIG_ARRAY + | GOMP_MAP_FORCE_PRESENT), /* Like GOMP_MAP_ATTACH, but allow attaching to zero-length array sections (i.e. set to NULL when array section is not mapped) Currently only used @@ -195,6 +220,9 @@ enum gomp_map_kind GOMP_MAP_ATTACH_ZERO_LENGTH_ARRAY_SECTION = (GOMP_MAP_DEEP_COPY | 2), + GOMP_MAP_TO_GRID = (GOMP_MAP_DEEP_COPY | 4), + GOMP_MAP_FROM_GRID = (GOMP_MAP_DEEP_COPY | 5), + /* Internal to GCC, not used in libgomp. */ /* Do not map, but pointer assign a pointer instead. */ GOMP_MAP_FIRSTPRIVATE_POINTER = (GOMP_MAP_LAST | 1), @@ -209,7 +237,18 @@ enum gomp_map_kind GOMP_MAP_PRESENT_ALLOC = (GOMP_MAP_LAST | 4), GOMP_MAP_PRESENT_TO = (GOMP_MAP_LAST | 5), GOMP_MAP_PRESENT_FROM = (GOMP_MAP_LAST | 6), - GOMP_MAP_PRESENT_TOFROM = (GOMP_MAP_LAST | 7) + GOMP_MAP_PRESENT_TOFROM = (GOMP_MAP_LAST | 7), + /* Unset, used for "declare mapper" maps with no explicit data movement + specified. These use the movement specified at the invocation site. */ + GOMP_MAP_UNSET = (GOMP_MAP_LAST | 8), + /* Used to record the name of a named mapper. */ + GOMP_MAP_PUSH_MAPPER_NAME = (GOMP_MAP_LAST | 9), + GOMP_MAP_POP_MAPPER_NAME = (GOMP_MAP_LAST | 10), + /* Used to hold a TREE_LIST of grouped nodes in an 'omp declare mapper' + definition (only for Fortran at present). */ + GOMP_MAP_MAPPING_GROUP = (GOMP_MAP_LAST | 11), + GOMP_MAP_GRID_DIM = (GOMP_MAP_LAST | 12), + GOMP_MAP_GRID_STRIDE = (GOMP_MAP_LAST | 13) }; #define GOMP_MAP_COPY_TO_P(X) \ @@ -250,6 +289,9 @@ enum gomp_map_kind (((X) & GOMP_MAP_FLAG_PRESENT) == GOMP_MAP_FLAG_PRESENT \ || (X) == GOMP_MAP_FORCE_PRESENT) +#define GOMP_MAP_NONCONTIG_ARRAY_P(X) \ + (((X) & GOMP_MAP_NONCONTIG_ARRAY) != 0 \ + && ((X) & GOMP_MAP_FLAG_SPECIAL_4) == 0) /* Asynchronous behavior. Keep in sync with libgomp/{openacc.h,openacc.f90,openacc_lib.h}:acc_async_t. */ |