1 /* Data structures for OpenMP context selectors. This is in a separate file
2 from omp-general.h so that it may also be used in the Fortran parser
3 without reference to tree data structures.
5 Copyright (C) 2023-2024 Free Software Foundation, Inc.
7 This file is part of GCC.
9 GCC is free software; you can redistribute it and/or modify it under
10 the terms of the GNU General Public License as published by the Free
11 Software Foundation; either version 3, or (at your option) any later
14 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
15 WARRANTY; without even the implied warranty of MERCHANTABILITY or
16 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19 You should have received a copy of the GNU General Public License
20 along with GCC; see the file COPYING3. If not see
21 <http://www.gnu.org/licenses/>. */
24 #ifndef GCC_OMP_SELECTORS_H
25 #define GCC_OMP_SELECTORS_H
27 /* Trait set selector keywords. */
29 OMP_TRAIT_SET_CONSTRUCT
,
31 OMP_TRAIT_SET_TARGET_DEVICE
,
32 OMP_TRAIT_SET_IMPLEMENTATION
,
35 OMP_TRAIT_SET_INVALID
= -1
38 /* Trait selector keywords. */
40 OMP_TRAIT_DEVICE_KIND
,
42 OMP_TRAIT_DEVICE_ARCH
,
44 OMP_TRAIT_IMPLEMENTATION_VENDOR
,
45 OMP_TRAIT_IMPLEMENTATION_EXTENSION
,
46 OMP_TRAIT_IMPLEMENTATION_ADMO
,
47 OMP_TRAIT_IMPLEMENTATION_REQUIRES
,
48 OMP_TRAIT_IMPLEMENTATION_UNIFIED_ADDRESS
,
49 OMP_TRAIT_IMPLEMENTATION_UNIFIED_SHARED_MEMORY
,
50 OMP_TRAIT_IMPLEMENTATION_DYNAMIC_ALLOCATORS
,
51 OMP_TRAIT_IMPLEMENTATION_REVERSE_OFFLOAD
,
52 OMP_TRAIT_USER_CONDITION
,
53 OMP_TRAIT_CONSTRUCT_TARGET
,
54 OMP_TRAIT_CONSTRUCT_TEAMS
,
55 OMP_TRAIT_CONSTRUCT_PARALLEL
,
56 OMP_TRAIT_CONSTRUCT_FOR
,
57 OMP_TRAIT_CONSTRUCT_SIMD
,
59 OMP_TRAIT_INVALID
= -1
62 /* All trait property forms. */
64 OMP_TRAIT_PROPERTY_NONE
,
65 OMP_TRAIT_PROPERTY_ID
,
66 OMP_TRAIT_PROPERTY_NAME_LIST
,
67 OMP_TRAIT_PROPERTY_EXPR
,
68 OMP_TRAIT_PROPERTY_CLAUSE_LIST
,
69 OMP_TRAIT_PROPERTY_EXTENSION
72 /* Map trait set selector name keywords onto strings. */
73 extern const char *omp_tss_map
[];
75 /* Map trait selector keywords onto strings, allowed contexts, and
76 allowed property names for OMP_TRAIT_PROPERTY_NAME_LIST and
77 OMP_TRAIT_PROPERTY_ID properties. If valid_properties is null,
78 it means that any required checking has to be done explicitly
79 somewhere instead of being driven by the table. Otherwise it's a
80 null-terminated array of strings. */
83 unsigned int tss_mask
;
84 enum omp_tp_type tp_type
;
86 const char * const *valid_properties
;
88 extern struct omp_ts_info omp_ts_map
[];
90 extern enum omp_tss_code
omp_lookup_tss_code (const char *);
91 extern enum omp_ts_code
omp_lookup_ts_code (enum omp_tss_code
, const char *);
93 #endif /* GCC_OMP_SELECTORS_H */