George Rokos | 0dd6ed7 | 2018-01-29 13:59:35 +0000 | [diff] [blame] | 1 | //===------- interface.h - NVPTX OpenMP interface definitions ---- CUDA -*-===// |
| 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
| 5 | // This file is dual licensed under the MIT and the University of Illinois Open |
| 6 | // Source Licenses. See LICENSE.txt for details. |
| 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | // |
| 10 | // This file contains debug macros to be used in the application. |
| 11 | // |
| 12 | // This file contains all the definitions that are relevant to |
| 13 | // the interface. The first section contains the interface as |
| 14 | // declared by OpenMP. A second section includes library private calls |
| 15 | // (mostly debug, temporary?) The third section includes the compiler |
| 16 | // specific interfaces. |
| 17 | // |
| 18 | //===----------------------------------------------------------------------===// |
| 19 | |
| 20 | #ifndef _INTERFACES_H_ |
| 21 | #define _INTERFACES_H_ |
| 22 | |
Jonas Hahnfeld | 82d2020 | 2018-09-04 15:13:17 +0000 | [diff] [blame] | 23 | #include "option.h" |
| 24 | |
George Rokos | 0dd6ed7 | 2018-01-29 13:59:35 +0000 | [diff] [blame] | 25 | //////////////////////////////////////////////////////////////////////////////// |
| 26 | // OpenMP interface |
| 27 | //////////////////////////////////////////////////////////////////////////////// |
| 28 | |
| 29 | typedef uint32_t omp_lock_t; /* arbitrary type of the right length */ |
| 30 | typedef uint64_t omp_nest_lock_t; /* arbitrary type of the right length */ |
| 31 | |
| 32 | typedef enum omp_sched_t { |
| 33 | omp_sched_static = 1, /* chunkSize >0 */ |
| 34 | omp_sched_dynamic = 2, /* chunkSize >0 */ |
| 35 | omp_sched_guided = 3, /* chunkSize >0 */ |
| 36 | omp_sched_auto = 4, /* no chunkSize */ |
| 37 | } omp_sched_t; |
| 38 | |
| 39 | typedef enum omp_proc_bind_t { |
| 40 | omp_proc_bind_false = 0, |
| 41 | omp_proc_bind_true = 1, |
| 42 | omp_proc_bind_master = 2, |
| 43 | omp_proc_bind_close = 3, |
| 44 | omp_proc_bind_spread = 4 |
| 45 | } omp_proc_bind_t; |
| 46 | |
| 47 | EXTERN double omp_get_wtick(void); |
| 48 | EXTERN double omp_get_wtime(void); |
| 49 | |
| 50 | EXTERN void omp_set_num_threads(int num); |
| 51 | EXTERN int omp_get_num_threads(void); |
| 52 | EXTERN int omp_get_max_threads(void); |
| 53 | EXTERN int omp_get_thread_limit(void); |
| 54 | EXTERN int omp_get_thread_num(void); |
| 55 | EXTERN int omp_get_num_procs(void); |
| 56 | EXTERN int omp_in_parallel(void); |
| 57 | EXTERN int omp_in_final(void); |
| 58 | EXTERN void omp_set_dynamic(int flag); |
| 59 | EXTERN int omp_get_dynamic(void); |
| 60 | EXTERN void omp_set_nested(int flag); |
| 61 | EXTERN int omp_get_nested(void); |
| 62 | EXTERN void omp_set_max_active_levels(int level); |
| 63 | EXTERN int omp_get_max_active_levels(void); |
| 64 | EXTERN int omp_get_level(void); |
| 65 | EXTERN int omp_get_active_level(void); |
| 66 | EXTERN int omp_get_ancestor_thread_num(int level); |
| 67 | EXTERN int omp_get_team_size(int level); |
| 68 | |
| 69 | EXTERN void omp_init_lock(omp_lock_t *lock); |
| 70 | EXTERN void omp_init_nest_lock(omp_nest_lock_t *lock); |
| 71 | EXTERN void omp_destroy_lock(omp_lock_t *lock); |
| 72 | EXTERN void omp_destroy_nest_lock(omp_nest_lock_t *lock); |
| 73 | EXTERN void omp_set_lock(omp_lock_t *lock); |
| 74 | EXTERN void omp_set_nest_lock(omp_nest_lock_t *lock); |
| 75 | EXTERN void omp_unset_lock(omp_lock_t *lock); |
| 76 | EXTERN void omp_unset_nest_lock(omp_nest_lock_t *lock); |
| 77 | EXTERN int omp_test_lock(omp_lock_t *lock); |
| 78 | EXTERN int omp_test_nest_lock(omp_nest_lock_t *lock); |
| 79 | |
| 80 | EXTERN void omp_get_schedule(omp_sched_t *kind, int *modifier); |
| 81 | EXTERN void omp_set_schedule(omp_sched_t kind, int modifier); |
| 82 | EXTERN omp_proc_bind_t omp_get_proc_bind(void); |
| 83 | EXTERN int omp_get_cancellation(void); |
| 84 | EXTERN void omp_set_default_device(int deviceId); |
| 85 | EXTERN int omp_get_default_device(void); |
| 86 | EXTERN int omp_get_num_devices(void); |
| 87 | EXTERN int omp_get_num_teams(void); |
| 88 | EXTERN int omp_get_team_num(void); |
| 89 | EXTERN int omp_is_initial_device(void); |
| 90 | EXTERN int omp_get_initial_device(void); |
| 91 | EXTERN int omp_get_max_task_priority(void); |
| 92 | |
| 93 | //////////////////////////////////////////////////////////////////////////////// |
George Rokos | 0dd6ed7 | 2018-01-29 13:59:35 +0000 | [diff] [blame] | 94 | // file below is swiped from kmpc host interface |
| 95 | //////////////////////////////////////////////////////////////////////////////// |
| 96 | |
| 97 | //////////////////////////////////////////////////////////////////////////////// |
| 98 | // kmp specifc types |
| 99 | //////////////////////////////////////////////////////////////////////////////// |
| 100 | |
| 101 | typedef enum kmp_sched_t { |
| 102 | kmp_sched_static_chunk = 33, |
| 103 | kmp_sched_static_nochunk = 34, |
| 104 | kmp_sched_dynamic = 35, |
| 105 | kmp_sched_guided = 36, |
| 106 | kmp_sched_runtime = 37, |
| 107 | kmp_sched_auto = 38, |
| 108 | |
Alexey Bataev | b7a5d38 | 2018-08-29 17:35:09 +0000 | [diff] [blame] | 109 | kmp_sched_static_balanced_chunk = 45, |
| 110 | |
George Rokos | 0dd6ed7 | 2018-01-29 13:59:35 +0000 | [diff] [blame] | 111 | kmp_sched_static_ordered = 65, |
| 112 | kmp_sched_static_nochunk_ordered = 66, |
| 113 | kmp_sched_dynamic_ordered = 67, |
| 114 | kmp_sched_guided_ordered = 68, |
| 115 | kmp_sched_runtime_ordered = 69, |
| 116 | kmp_sched_auto_ordered = 70, |
| 117 | |
| 118 | kmp_sched_distr_static_chunk = 91, |
| 119 | kmp_sched_distr_static_nochunk = 92, |
| 120 | kmp_sched_distr_static_chunk_sched_static_chunkone = 93, |
| 121 | |
| 122 | kmp_sched_default = kmp_sched_static_nochunk, |
| 123 | kmp_sched_unordered_first = kmp_sched_static_chunk, |
| 124 | kmp_sched_unordered_last = kmp_sched_auto, |
| 125 | kmp_sched_ordered_first = kmp_sched_static_ordered, |
| 126 | kmp_sched_ordered_last = kmp_sched_auto_ordered, |
| 127 | kmp_sched_distribute_first = kmp_sched_distr_static_chunk, |
| 128 | kmp_sched_distribute_last = |
| 129 | kmp_sched_distr_static_chunk_sched_static_chunkone, |
| 130 | |
| 131 | /* Support for OpenMP 4.5 monotonic and nonmonotonic schedule modifiers. |
| 132 | * Since we need to distinguish the three possible cases (no modifier, |
| 133 | * monotonic modifier, nonmonotonic modifier), we need separate bits for |
| 134 | * each modifier. The absence of monotonic does not imply nonmonotonic, |
| 135 | * especially since 4.5 says that the behaviour of the "no modifier" case |
| 136 | * is implementation defined in 4.5, but will become "nonmonotonic" in 5.0. |
| 137 | * |
| 138 | * Since we're passing a full 32 bit value, we can use a couple of high |
| 139 | * bits for these flags; out of paranoia we avoid the sign bit. |
| 140 | * |
| 141 | * These modifiers can be or-ed into non-static schedules by the compiler |
| 142 | * to pass the additional information. They will be stripped early in the |
| 143 | * processing in __kmp_dispatch_init when setting up schedules, so |
| 144 | * most of the code won't ever see schedules with these bits set. |
| 145 | */ |
| 146 | kmp_sched_modifier_monotonic = (1 << 29), |
| 147 | /**< Set if the monotonic schedule modifier was present */ |
| 148 | kmp_sched_modifier_nonmonotonic = (1 << 30), |
| 149 | /**< Set if the nonmonotonic schedule modifier was present */ |
| 150 | |
| 151 | #define SCHEDULE_WITHOUT_MODIFIERS(s) \ |
| 152 | (enum kmp_sched_t)( \ |
| 153 | (s) & ~(kmp_sched_modifier_nonmonotonic | kmp_sched_modifier_monotonic)) |
| 154 | #define SCHEDULE_HAS_MONOTONIC(s) (((s)&kmp_sched_modifier_monotonic) != 0) |
| 155 | #define SCHEDULE_HAS_NONMONOTONIC(s) \ |
| 156 | (((s)&kmp_sched_modifier_nonmonotonic) != 0) |
| 157 | #define SCHEDULE_HAS_NO_MODIFIERS(s) \ |
| 158 | (((s) & (kmp_sched_modifier_nonmonotonic | kmp_sched_modifier_monotonic)) == \ |
| 159 | 0) |
| 160 | |
| 161 | } kmp_sched_t; |
| 162 | |
Gheorghe-Teodor Bercea | ad8632a | 2018-11-27 19:45:10 +0000 | [diff] [blame] | 163 | /*! |
| 164 | * Enum for accesseing the reserved_2 field of the ident_t struct below. |
| 165 | */ |
| 166 | enum { |
| 167 | /*! Bit set to 1 when in SPMD mode. */ |
| 168 | KMP_IDENT_SPMD_MODE = 0x01, |
| 169 | /*! Bit set to 1 when a simplified runtime is used. */ |
| 170 | KMP_IDENT_SIMPLE_RT_MODE = 0x02, |
| 171 | }; |
| 172 | |
| 173 | /*! |
| 174 | * The ident structure that describes a source location. |
| 175 | * The struct is identical to the one in the kmp.h file. |
| 176 | * We maintain the same data structure for compatibility. |
| 177 | */ |
| 178 | typedef int kmp_int32; |
| 179 | typedef struct ident { |
| 180 | kmp_int32 reserved_1; /**< might be used in Fortran; see above */ |
| 181 | kmp_int32 flags; /**< also f.flags; KMP_IDENT_xxx flags; KMP_IDENT_KMPC |
| 182 | identifies this union member */ |
| 183 | kmp_int32 reserved_2; /**< not really used in Fortran any more; see above */ |
| 184 | kmp_int32 reserved_3; /**< source[4] in Fortran, do not use for C++ */ |
| 185 | char const *psource; /**< String describing the source location. |
| 186 | The string is composed of semi-colon separated fields |
| 187 | which describe the source file, the function and a pair |
| 188 | of line numbers that delimit the construct. */ |
| 189 | } ident_t; |
| 190 | |
George Rokos | 0dd6ed7 | 2018-01-29 13:59:35 +0000 | [diff] [blame] | 191 | // parallel defs |
Gheorghe-Teodor Bercea | ad8632a | 2018-11-27 19:45:10 +0000 | [diff] [blame] | 192 | typedef ident_t kmp_Ident; |
George Rokos | 0dd6ed7 | 2018-01-29 13:59:35 +0000 | [diff] [blame] | 193 | typedef void (*kmp_ParFctPtr)(int32_t *global_tid, int32_t *bound_tid, ...); |
| 194 | typedef void (*kmp_ReductFctPtr)(void *lhsData, void *rhsData); |
| 195 | typedef void (*kmp_InterWarpCopyFctPtr)(void *src, int32_t warp_num); |
| 196 | typedef void (*kmp_ShuffleReductFctPtr)(void *rhsData, int16_t lane_id, |
| 197 | int16_t lane_offset, |
| 198 | int16_t shortCircuit); |
| 199 | typedef void (*kmp_CopyToScratchpadFctPtr)(void *reduceData, void *scratchpad, |
| 200 | int32_t index, int32_t width); |
| 201 | typedef void (*kmp_LoadReduceFctPtr)(void *reduceData, void *scratchpad, |
| 202 | int32_t index, int32_t width, |
| 203 | int32_t reduce); |
| 204 | |
| 205 | // task defs |
| 206 | typedef struct kmp_TaskDescr kmp_TaskDescr; |
| 207 | typedef int32_t (*kmp_TaskFctPtr)(int32_t global_tid, kmp_TaskDescr *taskDescr); |
| 208 | typedef struct kmp_TaskDescr { |
| 209 | void *sharedPointerTable; // ptr to a table of shared var ptrs |
| 210 | kmp_TaskFctPtr sub; // task subroutine |
| 211 | int32_t partId; // unused |
| 212 | kmp_TaskFctPtr destructors; // destructor of c++ first private |
| 213 | } kmp_TaskDescr; |
| 214 | // task dep defs |
| 215 | #define KMP_TASKDEP_IN 0x1u |
| 216 | #define KMP_TASKDEP_OUT 0x2u |
| 217 | typedef struct kmp_TaskDep_Public { |
| 218 | void *addr; |
| 219 | size_t len; |
| 220 | uint8_t flags; // bit 0: in, bit 1: out |
| 221 | } kmp_TaskDep_Public; |
| 222 | |
| 223 | // flags that interpret the interface part of tasking flags |
| 224 | #define KMP_TASK_IS_TIED 0x1 |
| 225 | #define KMP_TASK_FINAL 0x2 |
| 226 | #define KMP_TASK_MERGED_IF0 0x4 /* unused */ |
| 227 | #define KMP_TASK_DESTRUCTOR_THUNK 0x8 |
| 228 | |
| 229 | // flags for task setup return |
| 230 | #define KMP_CURRENT_TASK_NOT_SUSPENDED 0 |
| 231 | #define KMP_CURRENT_TASK_SUSPENDED 1 |
| 232 | |
| 233 | // sync defs |
| 234 | typedef int32_t kmp_CriticalName[8]; |
| 235 | |
| 236 | //////////////////////////////////////////////////////////////////////////////// |
| 237 | // flags for kstate (all bits initially off) |
| 238 | //////////////////////////////////////////////////////////////////////////////// |
| 239 | |
| 240 | // first 2 bits used by kmp_Reduction (defined in kmp_reduction.cpp) |
| 241 | #define KMP_REDUCTION_MASK 0x3 |
| 242 | #define KMP_SKIP_NEXT_CALL 0x4 |
| 243 | #define KMP_SKIP_NEXT_CANCEL_BARRIER 0x8 |
| 244 | |
| 245 | //////////////////////////////////////////////////////////////////////////////// |
| 246 | // data |
| 247 | //////////////////////////////////////////////////////////////////////////////// |
| 248 | |
| 249 | //////////////////////////////////////////////////////////////////////////////// |
| 250 | // external interface |
| 251 | //////////////////////////////////////////////////////////////////////////////// |
| 252 | |
| 253 | // query |
Gheorghe-Teodor Bercea | ad8632a | 2018-11-27 19:45:10 +0000 | [diff] [blame] | 254 | EXTERN int32_t __kmpc_global_num_threads(kmp_Ident *loc); // missing |
| 255 | EXTERN int32_t __kmpc_bound_thread_num(kmp_Ident *loc); // missing |
| 256 | EXTERN int32_t __kmpc_bound_num_threads(kmp_Ident *loc); // missing |
| 257 | EXTERN int32_t __kmpc_in_parallel(kmp_Ident *loc); // missing |
George Rokos | 0dd6ed7 | 2018-01-29 13:59:35 +0000 | [diff] [blame] | 258 | |
| 259 | // parallel |
Gheorghe-Teodor Bercea | ad8632a | 2018-11-27 19:45:10 +0000 | [diff] [blame] | 260 | EXTERN int32_t __kmpc_global_thread_num(kmp_Ident *loc); |
| 261 | EXTERN void __kmpc_push_num_threads(kmp_Ident *loc, int32_t global_tid, |
George Rokos | 0dd6ed7 | 2018-01-29 13:59:35 +0000 | [diff] [blame] | 262 | int32_t num_threads); |
| 263 | // simd |
Gheorghe-Teodor Bercea | ad8632a | 2018-11-27 19:45:10 +0000 | [diff] [blame] | 264 | EXTERN void __kmpc_push_simd_limit(kmp_Ident *loc, int32_t global_tid, |
George Rokos | 0dd6ed7 | 2018-01-29 13:59:35 +0000 | [diff] [blame] | 265 | int32_t simd_limit); |
| 266 | // aee ... not supported |
Gheorghe-Teodor Bercea | ad8632a | 2018-11-27 19:45:10 +0000 | [diff] [blame] | 267 | // EXTERN void __kmpc_fork_call(kmp_Ident *loc, int32_t argc, kmp_ParFctPtr |
George Rokos | 0dd6ed7 | 2018-01-29 13:59:35 +0000 | [diff] [blame] | 268 | // microtask, ...); |
Gheorghe-Teodor Bercea | ad8632a | 2018-11-27 19:45:10 +0000 | [diff] [blame] | 269 | EXTERN void __kmpc_serialized_parallel(kmp_Ident *loc, uint32_t global_tid); |
| 270 | EXTERN void __kmpc_end_serialized_parallel(kmp_Ident *loc, |
George Rokos | 0dd6ed7 | 2018-01-29 13:59:35 +0000 | [diff] [blame] | 271 | uint32_t global_tid); |
Gheorghe-Teodor Bercea | ad8632a | 2018-11-27 19:45:10 +0000 | [diff] [blame] | 272 | EXTERN uint16_t __kmpc_parallel_level(kmp_Ident *loc, uint32_t global_tid); |
George Rokos | 0dd6ed7 | 2018-01-29 13:59:35 +0000 | [diff] [blame] | 273 | |
| 274 | // proc bind |
Gheorghe-Teodor Bercea | ad8632a | 2018-11-27 19:45:10 +0000 | [diff] [blame] | 275 | EXTERN void __kmpc_push_proc_bind(kmp_Ident *loc, uint32_t global_tid, |
George Rokos | 0dd6ed7 | 2018-01-29 13:59:35 +0000 | [diff] [blame] | 276 | int proc_bind); |
| 277 | EXTERN int omp_get_num_places(void); |
| 278 | EXTERN int omp_get_place_num_procs(int place_num); |
| 279 | EXTERN void omp_get_place_proc_ids(int place_num, int *ids); |
| 280 | EXTERN int omp_get_place_num(void); |
| 281 | EXTERN int omp_get_partition_num_places(void); |
| 282 | EXTERN void omp_get_partition_place_nums(int *place_nums); |
| 283 | |
| 284 | // for static (no chunk or chunk) |
Gheorghe-Teodor Bercea | ad8632a | 2018-11-27 19:45:10 +0000 | [diff] [blame] | 285 | EXTERN void __kmpc_for_static_init_4(kmp_Ident *loc, int32_t global_tid, |
George Rokos | 0dd6ed7 | 2018-01-29 13:59:35 +0000 | [diff] [blame] | 286 | int32_t sched, int32_t *plastiter, |
| 287 | int32_t *plower, int32_t *pupper, |
| 288 | int32_t *pstride, int32_t incr, |
| 289 | int32_t chunk); |
Gheorghe-Teodor Bercea | ad8632a | 2018-11-27 19:45:10 +0000 | [diff] [blame] | 290 | EXTERN void __kmpc_for_static_init_4u(kmp_Ident *loc, int32_t global_tid, |
George Rokos | 0dd6ed7 | 2018-01-29 13:59:35 +0000 | [diff] [blame] | 291 | int32_t sched, int32_t *plastiter, |
| 292 | uint32_t *plower, uint32_t *pupper, |
| 293 | int32_t *pstride, int32_t incr, |
| 294 | int32_t chunk); |
Gheorghe-Teodor Bercea | ad8632a | 2018-11-27 19:45:10 +0000 | [diff] [blame] | 295 | EXTERN void __kmpc_for_static_init_8(kmp_Ident *loc, int32_t global_tid, |
George Rokos | 0dd6ed7 | 2018-01-29 13:59:35 +0000 | [diff] [blame] | 296 | int32_t sched, int32_t *plastiter, |
| 297 | int64_t *plower, int64_t *pupper, |
| 298 | int64_t *pstride, int64_t incr, |
| 299 | int64_t chunk); |
Gheorghe-Teodor Bercea | ad8632a | 2018-11-27 19:45:10 +0000 | [diff] [blame] | 300 | EXTERN void __kmpc_for_static_init_8u(kmp_Ident *loc, int32_t global_tid, |
George Rokos | 0dd6ed7 | 2018-01-29 13:59:35 +0000 | [diff] [blame] | 301 | int32_t sched, int32_t *plastiter1, |
| 302 | uint64_t *plower, uint64_t *pupper, |
| 303 | int64_t *pstride, int64_t incr, |
| 304 | int64_t chunk); |
| 305 | EXTERN |
Gheorghe-Teodor Bercea | ad8632a | 2018-11-27 19:45:10 +0000 | [diff] [blame] | 306 | void __kmpc_for_static_init_4_simple_spmd(kmp_Ident *loc, int32_t global_tid, |
George Rokos | 0dd6ed7 | 2018-01-29 13:59:35 +0000 | [diff] [blame] | 307 | int32_t sched, int32_t *plastiter, |
| 308 | int32_t *plower, int32_t *pupper, |
| 309 | int32_t *pstride, int32_t incr, |
| 310 | int32_t chunk); |
| 311 | EXTERN |
Gheorghe-Teodor Bercea | ad8632a | 2018-11-27 19:45:10 +0000 | [diff] [blame] | 312 | void __kmpc_for_static_init_4u_simple_spmd(kmp_Ident *loc, int32_t global_tid, |
George Rokos | 0dd6ed7 | 2018-01-29 13:59:35 +0000 | [diff] [blame] | 313 | int32_t sched, int32_t *plastiter, |
| 314 | uint32_t *plower, uint32_t *pupper, |
| 315 | int32_t *pstride, int32_t incr, |
| 316 | int32_t chunk); |
| 317 | EXTERN |
Gheorghe-Teodor Bercea | ad8632a | 2018-11-27 19:45:10 +0000 | [diff] [blame] | 318 | void __kmpc_for_static_init_8_simple_spmd(kmp_Ident *loc, int32_t global_tid, |
George Rokos | 0dd6ed7 | 2018-01-29 13:59:35 +0000 | [diff] [blame] | 319 | int32_t sched, int32_t *plastiter, |
| 320 | int64_t *plower, int64_t *pupper, |
| 321 | int64_t *pstride, int64_t incr, |
| 322 | int64_t chunk); |
| 323 | EXTERN |
Gheorghe-Teodor Bercea | ad8632a | 2018-11-27 19:45:10 +0000 | [diff] [blame] | 324 | void __kmpc_for_static_init_8u_simple_spmd(kmp_Ident *loc, int32_t global_tid, |
George Rokos | 0dd6ed7 | 2018-01-29 13:59:35 +0000 | [diff] [blame] | 325 | int32_t sched, int32_t *plastiter1, |
| 326 | uint64_t *plower, uint64_t *pupper, |
| 327 | int64_t *pstride, int64_t incr, |
| 328 | int64_t chunk); |
| 329 | EXTERN |
Gheorghe-Teodor Bercea | ad8632a | 2018-11-27 19:45:10 +0000 | [diff] [blame] | 330 | void __kmpc_for_static_init_4_simple_generic(kmp_Ident *loc, |
George Rokos | 0dd6ed7 | 2018-01-29 13:59:35 +0000 | [diff] [blame] | 331 | int32_t global_tid, int32_t sched, |
| 332 | int32_t *plastiter, |
| 333 | int32_t *plower, int32_t *pupper, |
| 334 | int32_t *pstride, int32_t incr, |
| 335 | int32_t chunk); |
| 336 | EXTERN |
| 337 | void __kmpc_for_static_init_4u_simple_generic( |
Gheorghe-Teodor Bercea | ad8632a | 2018-11-27 19:45:10 +0000 | [diff] [blame] | 338 | kmp_Ident *loc, int32_t global_tid, int32_t sched, int32_t *plastiter, |
George Rokos | 0dd6ed7 | 2018-01-29 13:59:35 +0000 | [diff] [blame] | 339 | uint32_t *plower, uint32_t *pupper, int32_t *pstride, int32_t incr, |
| 340 | int32_t chunk); |
| 341 | EXTERN |
Gheorghe-Teodor Bercea | ad8632a | 2018-11-27 19:45:10 +0000 | [diff] [blame] | 342 | void __kmpc_for_static_init_8_simple_generic(kmp_Ident *loc, |
George Rokos | 0dd6ed7 | 2018-01-29 13:59:35 +0000 | [diff] [blame] | 343 | int32_t global_tid, int32_t sched, |
| 344 | int32_t *plastiter, |
| 345 | int64_t *plower, int64_t *pupper, |
| 346 | int64_t *pstride, int64_t incr, |
| 347 | int64_t chunk); |
| 348 | EXTERN |
| 349 | void __kmpc_for_static_init_8u_simple_generic( |
Gheorghe-Teodor Bercea | ad8632a | 2018-11-27 19:45:10 +0000 | [diff] [blame] | 350 | kmp_Ident *loc, int32_t global_tid, int32_t sched, int32_t *plastiter1, |
George Rokos | 0dd6ed7 | 2018-01-29 13:59:35 +0000 | [diff] [blame] | 351 | uint64_t *plower, uint64_t *pupper, int64_t *pstride, int64_t incr, |
| 352 | int64_t chunk); |
| 353 | |
Gheorghe-Teodor Bercea | ad8632a | 2018-11-27 19:45:10 +0000 | [diff] [blame] | 354 | EXTERN void __kmpc_for_static_fini(kmp_Ident *loc, int32_t global_tid); |
George Rokos | 0dd6ed7 | 2018-01-29 13:59:35 +0000 | [diff] [blame] | 355 | |
| 356 | // for dynamic |
Gheorghe-Teodor Bercea | ad8632a | 2018-11-27 19:45:10 +0000 | [diff] [blame] | 357 | EXTERN void __kmpc_dispatch_init_4(kmp_Ident *loc, int32_t global_tid, |
George Rokos | 0dd6ed7 | 2018-01-29 13:59:35 +0000 | [diff] [blame] | 358 | int32_t sched, int32_t lower, int32_t upper, |
| 359 | int32_t incr, int32_t chunk); |
Gheorghe-Teodor Bercea | ad8632a | 2018-11-27 19:45:10 +0000 | [diff] [blame] | 360 | EXTERN void __kmpc_dispatch_init_4u(kmp_Ident *loc, int32_t global_tid, |
George Rokos | 0dd6ed7 | 2018-01-29 13:59:35 +0000 | [diff] [blame] | 361 | int32_t sched, uint32_t lower, |
| 362 | uint32_t upper, int32_t incr, |
| 363 | int32_t chunk); |
Gheorghe-Teodor Bercea | ad8632a | 2018-11-27 19:45:10 +0000 | [diff] [blame] | 364 | EXTERN void __kmpc_dispatch_init_8(kmp_Ident *loc, int32_t global_tid, |
George Rokos | 0dd6ed7 | 2018-01-29 13:59:35 +0000 | [diff] [blame] | 365 | int32_t sched, int64_t lower, int64_t upper, |
| 366 | int64_t incr, int64_t chunk); |
Gheorghe-Teodor Bercea | ad8632a | 2018-11-27 19:45:10 +0000 | [diff] [blame] | 367 | EXTERN void __kmpc_dispatch_init_8u(kmp_Ident *loc, int32_t global_tid, |
George Rokos | 0dd6ed7 | 2018-01-29 13:59:35 +0000 | [diff] [blame] | 368 | int32_t sched, uint64_t lower, |
| 369 | uint64_t upper, int64_t incr, |
| 370 | int64_t chunk); |
| 371 | |
Gheorghe-Teodor Bercea | ad8632a | 2018-11-27 19:45:10 +0000 | [diff] [blame] | 372 | EXTERN int __kmpc_dispatch_next_4(kmp_Ident *loc, int32_t global_tid, |
George Rokos | 0dd6ed7 | 2018-01-29 13:59:35 +0000 | [diff] [blame] | 373 | int32_t *plastiter, int32_t *plower, |
| 374 | int32_t *pupper, int32_t *pstride); |
Gheorghe-Teodor Bercea | ad8632a | 2018-11-27 19:45:10 +0000 | [diff] [blame] | 375 | EXTERN int __kmpc_dispatch_next_4u(kmp_Ident *loc, int32_t global_tid, |
George Rokos | 0dd6ed7 | 2018-01-29 13:59:35 +0000 | [diff] [blame] | 376 | int32_t *plastiter, uint32_t *plower, |
| 377 | uint32_t *pupper, int32_t *pstride); |
Gheorghe-Teodor Bercea | ad8632a | 2018-11-27 19:45:10 +0000 | [diff] [blame] | 378 | EXTERN int __kmpc_dispatch_next_8(kmp_Ident *loc, int32_t global_tid, |
George Rokos | 0dd6ed7 | 2018-01-29 13:59:35 +0000 | [diff] [blame] | 379 | int32_t *plastiter, int64_t *plower, |
| 380 | int64_t *pupper, int64_t *pstride); |
Gheorghe-Teodor Bercea | ad8632a | 2018-11-27 19:45:10 +0000 | [diff] [blame] | 381 | EXTERN int __kmpc_dispatch_next_8u(kmp_Ident *loc, int32_t global_tid, |
George Rokos | 0dd6ed7 | 2018-01-29 13:59:35 +0000 | [diff] [blame] | 382 | int32_t *plastiter, uint64_t *plower, |
| 383 | uint64_t *pupper, int64_t *pstride); |
| 384 | |
Gheorghe-Teodor Bercea | ad8632a | 2018-11-27 19:45:10 +0000 | [diff] [blame] | 385 | EXTERN void __kmpc_dispatch_fini_4(kmp_Ident *loc, int32_t global_tid); |
| 386 | EXTERN void __kmpc_dispatch_fini_4u(kmp_Ident *loc, int32_t global_tid); |
| 387 | EXTERN void __kmpc_dispatch_fini_8(kmp_Ident *loc, int32_t global_tid); |
| 388 | EXTERN void __kmpc_dispatch_fini_8u(kmp_Ident *loc, int32_t global_tid); |
George Rokos | 0dd6ed7 | 2018-01-29 13:59:35 +0000 | [diff] [blame] | 389 | |
| 390 | // Support for reducing conditional lastprivate variables |
Gheorghe-Teodor Bercea | ad8632a | 2018-11-27 19:45:10 +0000 | [diff] [blame] | 391 | EXTERN void __kmpc_reduce_conditional_lastprivate(kmp_Ident *loc, |
George Rokos | 0dd6ed7 | 2018-01-29 13:59:35 +0000 | [diff] [blame] | 392 | int32_t global_tid, |
| 393 | int32_t varNum, void *array); |
| 394 | |
| 395 | // reduction |
| 396 | EXTERN void __kmpc_nvptx_end_reduce(int32_t global_tid); |
| 397 | EXTERN void __kmpc_nvptx_end_reduce_nowait(int32_t global_tid); |
Alexey Bataev | dcf2edc | 2019-01-04 17:09:12 +0000 | [diff] [blame] | 398 | EXTERN __attribute__((deprecated)) int32_t __kmpc_nvptx_parallel_reduce_nowait( |
George Rokos | 0dd6ed7 | 2018-01-29 13:59:35 +0000 | [diff] [blame] | 399 | int32_t global_tid, int32_t num_vars, size_t reduce_size, void *reduce_data, |
| 400 | kmp_ShuffleReductFctPtr shflFct, kmp_InterWarpCopyFctPtr cpyFct); |
Alexey Bataev | dcf2edc | 2019-01-04 17:09:12 +0000 | [diff] [blame] | 401 | EXTERN int32_t __kmpc_nvptx_parallel_reduce_nowait_v2( |
| 402 | kmp_Ident *loc, int32_t global_tid, int32_t num_vars, size_t reduce_size, |
| 403 | void *reduce_data, kmp_ShuffleReductFctPtr shflFct, |
| 404 | kmp_InterWarpCopyFctPtr cpyFct); |
George Rokos | 0dd6ed7 | 2018-01-29 13:59:35 +0000 | [diff] [blame] | 405 | EXTERN int32_t __kmpc_nvptx_parallel_reduce_nowait_simple_spmd( |
| 406 | int32_t global_tid, int32_t num_vars, size_t reduce_size, void *reduce_data, |
| 407 | kmp_ShuffleReductFctPtr shflFct, kmp_InterWarpCopyFctPtr cpyFct); |
| 408 | EXTERN int32_t __kmpc_nvptx_parallel_reduce_nowait_simple_generic( |
| 409 | int32_t global_tid, int32_t num_vars, size_t reduce_size, void *reduce_data, |
| 410 | kmp_ShuffleReductFctPtr shflFct, kmp_InterWarpCopyFctPtr cpyFct); |
| 411 | EXTERN int32_t __kmpc_nvptx_simd_reduce_nowait( |
| 412 | int32_t global_tid, int32_t num_vars, size_t reduce_size, void *reduce_data, |
| 413 | kmp_ShuffleReductFctPtr shflFct, kmp_InterWarpCopyFctPtr cpyFct); |
| 414 | EXTERN int32_t __kmpc_nvptx_teams_reduce_nowait( |
| 415 | int32_t global_tid, int32_t num_vars, size_t reduce_size, void *reduce_data, |
| 416 | kmp_ShuffleReductFctPtr shflFct, kmp_InterWarpCopyFctPtr cpyFct, |
| 417 | kmp_CopyToScratchpadFctPtr sratchFct, kmp_LoadReduceFctPtr ldFct); |
| 418 | EXTERN int32_t __kmpc_nvptx_teams_reduce_nowait_simple_spmd( |
| 419 | int32_t global_tid, int32_t num_vars, size_t reduce_size, void *reduce_data, |
| 420 | kmp_ShuffleReductFctPtr shflFct, kmp_InterWarpCopyFctPtr cpyFct, |
| 421 | kmp_CopyToScratchpadFctPtr sratchFct, kmp_LoadReduceFctPtr ldFct); |
| 422 | EXTERN int32_t __kmpc_nvptx_teams_reduce_nowait_simple_generic( |
| 423 | int32_t global_tid, int32_t num_vars, size_t reduce_size, void *reduce_data, |
| 424 | kmp_ShuffleReductFctPtr shflFct, kmp_InterWarpCopyFctPtr cpyFct, |
| 425 | kmp_CopyToScratchpadFctPtr sratchFct, kmp_LoadReduceFctPtr ldFct); |
Alexey Bataev | d4de439 | 2018-11-27 21:06:09 +0000 | [diff] [blame] | 426 | EXTERN int32_t __kmpc_nvptx_teams_reduce_nowait_simple(kmp_Ident *loc, |
| 427 | int32_t global_tid, |
| 428 | kmp_CriticalName *crit); |
| 429 | EXTERN void __kmpc_nvptx_teams_end_reduce_nowait_simple(kmp_Ident *loc, |
| 430 | int32_t global_tid, |
| 431 | kmp_CriticalName *crit); |
George Rokos | 0dd6ed7 | 2018-01-29 13:59:35 +0000 | [diff] [blame] | 432 | EXTERN int32_t __kmpc_shuffle_int32(int32_t val, int16_t delta, int16_t size); |
| 433 | EXTERN int64_t __kmpc_shuffle_int64(int64_t val, int16_t delta, int16_t size); |
| 434 | |
| 435 | // sync barrier |
Gheorghe-Teodor Bercea | ad8632a | 2018-11-27 19:45:10 +0000 | [diff] [blame] | 436 | EXTERN void __kmpc_barrier(kmp_Ident *loc_ref, int32_t tid); |
| 437 | EXTERN void __kmpc_barrier_simple_spmd(kmp_Ident *loc_ref, int32_t tid); |
| 438 | EXTERN void __kmpc_barrier_simple_generic(kmp_Ident *loc_ref, int32_t tid); |
| 439 | EXTERN int32_t __kmpc_cancel_barrier(kmp_Ident *loc, int32_t global_tid); |
George Rokos | 0dd6ed7 | 2018-01-29 13:59:35 +0000 | [diff] [blame] | 440 | |
| 441 | // single |
Gheorghe-Teodor Bercea | ad8632a | 2018-11-27 19:45:10 +0000 | [diff] [blame] | 442 | EXTERN int32_t __kmpc_single(kmp_Ident *loc, int32_t global_tid); |
| 443 | EXTERN void __kmpc_end_single(kmp_Ident *loc, int32_t global_tid); |
George Rokos | 0dd6ed7 | 2018-01-29 13:59:35 +0000 | [diff] [blame] | 444 | |
| 445 | // sync |
Gheorghe-Teodor Bercea | ad8632a | 2018-11-27 19:45:10 +0000 | [diff] [blame] | 446 | EXTERN int32_t __kmpc_master(kmp_Ident *loc, int32_t global_tid); |
| 447 | EXTERN void __kmpc_end_master(kmp_Ident *loc, int32_t global_tid); |
| 448 | EXTERN void __kmpc_ordered(kmp_Ident *loc, int32_t global_tid); |
| 449 | EXTERN void __kmpc_end_ordered(kmp_Ident *loc, int32_t global_tid); |
| 450 | EXTERN void __kmpc_critical(kmp_Ident *loc, int32_t global_tid, |
George Rokos | 0dd6ed7 | 2018-01-29 13:59:35 +0000 | [diff] [blame] | 451 | kmp_CriticalName *crit); |
Gheorghe-Teodor Bercea | ad8632a | 2018-11-27 19:45:10 +0000 | [diff] [blame] | 452 | EXTERN void __kmpc_end_critical(kmp_Ident *loc, int32_t global_tid, |
George Rokos | 0dd6ed7 | 2018-01-29 13:59:35 +0000 | [diff] [blame] | 453 | kmp_CriticalName *crit); |
Gheorghe-Teodor Bercea | ad8632a | 2018-11-27 19:45:10 +0000 | [diff] [blame] | 454 | EXTERN void __kmpc_flush(kmp_Ident *loc); |
George Rokos | 0dd6ed7 | 2018-01-29 13:59:35 +0000 | [diff] [blame] | 455 | |
| 456 | // vote |
| 457 | EXTERN int32_t __kmpc_warp_active_thread_mask(); |
| 458 | |
| 459 | // tasks |
Gheorghe-Teodor Bercea | ad8632a | 2018-11-27 19:45:10 +0000 | [diff] [blame] | 460 | EXTERN kmp_TaskDescr *__kmpc_omp_task_alloc(kmp_Ident *loc, |
George Rokos | 0dd6ed7 | 2018-01-29 13:59:35 +0000 | [diff] [blame] | 461 | uint32_t global_tid, int32_t flag, |
| 462 | size_t sizeOfTaskInclPrivate, |
| 463 | size_t sizeOfSharedTable, |
| 464 | kmp_TaskFctPtr sub); |
Gheorghe-Teodor Bercea | ad8632a | 2018-11-27 19:45:10 +0000 | [diff] [blame] | 465 | EXTERN int32_t __kmpc_omp_task(kmp_Ident *loc, uint32_t global_tid, |
George Rokos | 0dd6ed7 | 2018-01-29 13:59:35 +0000 | [diff] [blame] | 466 | kmp_TaskDescr *newLegacyTaskDescr); |
Gheorghe-Teodor Bercea | ad8632a | 2018-11-27 19:45:10 +0000 | [diff] [blame] | 467 | EXTERN int32_t __kmpc_omp_task_with_deps(kmp_Ident *loc, uint32_t global_tid, |
George Rokos | 0dd6ed7 | 2018-01-29 13:59:35 +0000 | [diff] [blame] | 468 | kmp_TaskDescr *newLegacyTaskDescr, |
| 469 | int32_t depNum, void *depList, |
| 470 | int32_t noAliasDepNum, |
| 471 | void *noAliasDepList); |
Gheorghe-Teodor Bercea | ad8632a | 2018-11-27 19:45:10 +0000 | [diff] [blame] | 472 | EXTERN void __kmpc_omp_task_begin_if0(kmp_Ident *loc, uint32_t global_tid, |
George Rokos | 0dd6ed7 | 2018-01-29 13:59:35 +0000 | [diff] [blame] | 473 | kmp_TaskDescr *newLegacyTaskDescr); |
Gheorghe-Teodor Bercea | ad8632a | 2018-11-27 19:45:10 +0000 | [diff] [blame] | 474 | EXTERN void __kmpc_omp_task_complete_if0(kmp_Ident *loc, uint32_t global_tid, |
George Rokos | 0dd6ed7 | 2018-01-29 13:59:35 +0000 | [diff] [blame] | 475 | kmp_TaskDescr *newLegacyTaskDescr); |
Gheorghe-Teodor Bercea | ad8632a | 2018-11-27 19:45:10 +0000 | [diff] [blame] | 476 | EXTERN void __kmpc_omp_wait_deps(kmp_Ident *loc, uint32_t global_tid, |
George Rokos | 0dd6ed7 | 2018-01-29 13:59:35 +0000 | [diff] [blame] | 477 | int32_t depNum, void *depList, |
| 478 | int32_t noAliasDepNum, void *noAliasDepList); |
Gheorghe-Teodor Bercea | ad8632a | 2018-11-27 19:45:10 +0000 | [diff] [blame] | 479 | EXTERN void __kmpc_taskgroup(kmp_Ident *loc, uint32_t global_tid); |
| 480 | EXTERN void __kmpc_end_taskgroup(kmp_Ident *loc, uint32_t global_tid); |
| 481 | EXTERN int32_t __kmpc_omp_taskyield(kmp_Ident *loc, uint32_t global_tid, |
George Rokos | 0dd6ed7 | 2018-01-29 13:59:35 +0000 | [diff] [blame] | 482 | int end_part); |
Gheorghe-Teodor Bercea | ad8632a | 2018-11-27 19:45:10 +0000 | [diff] [blame] | 483 | EXTERN int32_t __kmpc_omp_taskwait(kmp_Ident *loc, uint32_t global_tid); |
| 484 | EXTERN void __kmpc_taskloop(kmp_Ident *loc, uint32_t global_tid, |
George Rokos | 0dd6ed7 | 2018-01-29 13:59:35 +0000 | [diff] [blame] | 485 | kmp_TaskDescr *newKmpTaskDescr, int if_val, |
| 486 | uint64_t *lb, uint64_t *ub, int64_t st, int nogroup, |
| 487 | int32_t sched, uint64_t grainsize, void *task_dup); |
| 488 | |
| 489 | // cancel |
Gheorghe-Teodor Bercea | ad8632a | 2018-11-27 19:45:10 +0000 | [diff] [blame] | 490 | EXTERN int32_t __kmpc_cancellationpoint(kmp_Ident *loc, int32_t global_tid, |
George Rokos | 0dd6ed7 | 2018-01-29 13:59:35 +0000 | [diff] [blame] | 491 | int32_t cancelVal); |
Gheorghe-Teodor Bercea | ad8632a | 2018-11-27 19:45:10 +0000 | [diff] [blame] | 492 | EXTERN int32_t __kmpc_cancel(kmp_Ident *loc, int32_t global_tid, |
George Rokos | 0dd6ed7 | 2018-01-29 13:59:35 +0000 | [diff] [blame] | 493 | int32_t cancelVal); |
| 494 | |
| 495 | // non standard |
| 496 | EXTERN void __kmpc_kernel_init_params(void *ReductionScratchpadPtr); |
| 497 | EXTERN void __kmpc_kernel_init(int ThreadLimit, int16_t RequiresOMPRuntime); |
| 498 | EXTERN void __kmpc_kernel_deinit(int16_t IsOMPRuntimeInitialized); |
| 499 | EXTERN void __kmpc_spmd_kernel_init(int ThreadLimit, int16_t RequiresOMPRuntime, |
| 500 | int16_t RequiresDataSharing); |
Gheorghe-Teodor Bercea | 31c1589 | 2018-11-27 21:23:40 +0000 | [diff] [blame] | 501 | EXTERN __attribute__((deprecated)) void __kmpc_spmd_kernel_deinit(); |
| 502 | EXTERN void __kmpc_spmd_kernel_deinit_v2(int16_t RequiresOMPRuntime); |
George Rokos | 0dd6ed7 | 2018-01-29 13:59:35 +0000 | [diff] [blame] | 503 | EXTERN void __kmpc_kernel_prepare_parallel(void *WorkFn, |
| 504 | int16_t IsOMPRuntimeInitialized); |
Gheorghe-Teodor Bercea | 7a5fa21 | 2018-03-07 22:10:10 +0000 | [diff] [blame] | 505 | EXTERN bool __kmpc_kernel_parallel(void **WorkFn, |
George Rokos | 0dd6ed7 | 2018-01-29 13:59:35 +0000 | [diff] [blame] | 506 | int16_t IsOMPRuntimeInitialized); |
| 507 | EXTERN void __kmpc_kernel_end_parallel(); |
| 508 | EXTERN bool __kmpc_kernel_convergent_parallel(void *buffer, uint32_t Mask, |
| 509 | bool *IsFinal, |
| 510 | int32_t *LaneSource); |
| 511 | EXTERN void __kmpc_kernel_end_convergent_parallel(void *buffer); |
| 512 | EXTERN bool __kmpc_kernel_convergent_simd(void *buffer, uint32_t Mask, |
| 513 | bool *IsFinal, int32_t *LaneSource, |
| 514 | int32_t *LaneId, int32_t *NumLanes); |
| 515 | EXTERN void __kmpc_kernel_end_convergent_simd(void *buffer); |
| 516 | |
Gheorghe-Teodor Bercea | 49b6264 | 2018-03-13 19:44:53 +0000 | [diff] [blame] | 517 | |
| 518 | EXTERN void __kmpc_data_sharing_init_stack(); |
Gheorghe-Teodor Bercea | 9e94326 | 2018-07-13 16:14:22 +0000 | [diff] [blame] | 519 | EXTERN void __kmpc_data_sharing_init_stack_spmd(); |
Gheorghe-Teodor Bercea | b10bacf | 2018-11-01 18:08:12 +0000 | [diff] [blame] | 520 | EXTERN void *__kmpc_data_sharing_coalesced_push_stack(size_t size, |
| 521 | int16_t UseSharedMemory); |
Gheorghe-Teodor Bercea | 49b6264 | 2018-03-13 19:44:53 +0000 | [diff] [blame] | 522 | EXTERN void *__kmpc_data_sharing_push_stack(size_t size, int16_t UseSharedMemory); |
| 523 | EXTERN void __kmpc_data_sharing_pop_stack(void *a); |
| 524 | EXTERN void __kmpc_begin_sharing_variables(void ***GlobalArgs, size_t nArgs); |
| 525 | EXTERN void __kmpc_end_sharing_variables(); |
| 526 | EXTERN void __kmpc_get_shared_variables(void ***GlobalArgs); |
| 527 | |
George Rokos | 0dd6ed7 | 2018-01-29 13:59:35 +0000 | [diff] [blame] | 528 | // The slot used for data sharing by the master and worker threads. We use a |
| 529 | // complete (default size version and an incomplete one so that we allow sizes |
| 530 | // greater than the default). |
| 531 | struct __kmpc_data_sharing_slot { |
| 532 | __kmpc_data_sharing_slot *Next; |
Gheorghe-Teodor Bercea | 49b6264 | 2018-03-13 19:44:53 +0000 | [diff] [blame] | 533 | __kmpc_data_sharing_slot *Prev; |
Gheorghe-Teodor Bercea | f3de222 | 2018-03-15 15:56:04 +0000 | [diff] [blame] | 534 | void *PrevSlotStackPtr; |
George Rokos | 0dd6ed7 | 2018-01-29 13:59:35 +0000 | [diff] [blame] | 535 | void *DataEnd; |
| 536 | char Data[]; |
| 537 | }; |
| 538 | EXTERN void |
| 539 | __kmpc_initialize_data_sharing_environment(__kmpc_data_sharing_slot *RootS, |
| 540 | size_t InitialDataSize); |
| 541 | EXTERN void *__kmpc_data_sharing_environment_begin( |
| 542 | __kmpc_data_sharing_slot **SavedSharedSlot, void **SavedSharedStack, |
| 543 | void **SavedSharedFrame, int32_t *SavedActiveThreads, |
| 544 | size_t SharingDataSize, size_t SharingDefaultDataSize, |
| 545 | int16_t IsOMPRuntimeInitialized); |
| 546 | EXTERN void __kmpc_data_sharing_environment_end( |
| 547 | __kmpc_data_sharing_slot **SavedSharedSlot, void **SavedSharedStack, |
| 548 | void **SavedSharedFrame, int32_t *SavedActiveThreads, int32_t IsEntryPoint); |
| 549 | |
| 550 | EXTERN void * |
| 551 | __kmpc_get_data_sharing_environment_frame(int32_t SourceThreadID, |
| 552 | int16_t IsOMPRuntimeInitialized); |
Gheorghe-Teodor Bercea | 787a350 | 2018-05-15 15:16:43 +0000 | [diff] [blame] | 553 | |
| 554 | // SPMD execution mode interrogation function. |
| 555 | EXTERN int8_t __kmpc_is_spmd_exec_mode(); |
Alexey Bataev | 463e9f3 | 2018-11-02 14:43:23 +0000 | [diff] [blame] | 556 | |
Alexey Bataev | dcf2edc | 2019-01-04 17:09:12 +0000 | [diff] [blame] | 557 | EXTERN void __kmpc_get_team_static_memory(int16_t isSPMDExecutionMode, |
| 558 | const void *buf, size_t size, |
Alexey Bataev | 463e9f3 | 2018-11-02 14:43:23 +0000 | [diff] [blame] | 559 | int16_t is_shared, const void **res); |
| 560 | |
Alexey Bataev | dcf2edc | 2019-01-04 17:09:12 +0000 | [diff] [blame] | 561 | EXTERN void __kmpc_restore_team_static_memory(int16_t isSPMDExecutionMode, |
| 562 | int16_t is_shared); |
Alexey Bataev | 463e9f3 | 2018-11-02 14:43:23 +0000 | [diff] [blame] | 563 | |
George Rokos | 0dd6ed7 | 2018-01-29 13:59:35 +0000 | [diff] [blame] | 564 | #endif |