__OMP_RTL(__kmpc_warp_active_thread_mask, false, LanemaskTy,)
__OMP_RTL(__kmpc_syncwarp, false, Void, LanemaskTy)
+__OMP_RTL(__kmpc_is_generic_main_thread_id, false, Int8, Int32)
+
__OMP_RTL(__last, false, Void, )
#undef __OMP_RTL
}
EXTERN int8_t __kmpc_is_generic_main_thread(kmp_int32 Tid) {
- return !__kmpc_is_spmd_exec_mode() && GetMasterThreadID() == Tid;
+ return !__kmpc_is_spmd_exec_mode() && __kmpc_is_generic_main_thread_id(Tid);
+}
+
+NOINLINE EXTERN int8_t __kmpc_is_generic_main_thread_id(kmp_int32 Tid) {
+ return GetMasterThreadID() == Tid;
}
EXTERN bool __kmpc_kernel_parallel(void**WorkFn);
/// thread in generic mode outside of a parallel region.
EXTERN int8_t __kmpc_is_generic_main_thread(kmp_int32 Tid);
+/// Return true if the hardware thread id \p Tid represents the OpenMP main
+/// thread in generic mode.
+EXTERN int8_t __kmpc_is_generic_main_thread_id(kmp_int32 Tid);
+
EXTERN void __kmpc_get_team_static_memory(int16_t isSPMDExecutionMode,
const void *buf, size_t size,
int16_t is_shared, const void **res);