#ifndef KMP_H
#define KMP_H
#include "kmp_config.h"
#ifndef KMP_STATIC_STEAL_ENABLED
#define KMP_STATIC_STEAL_ENABLED …
#endif
#define KMP_WEIGHTED_ITERATIONS_SUPPORTED …
#define TASK_CURRENT_NOT_QUEUED …
#define TASK_CURRENT_QUEUED …
#ifdef BUILD_TIED_TASK_STACK
#define TASK_STACK_EMPTY …
#define TASK_STACK_BLOCK_BITS …
#define TASK_STACK_BLOCK_SIZE …
#define TASK_STACK_INDEX_MASK …
#endif
#define TASK_NOT_PUSHED …
#define TASK_SUCCESSFULLY_PUSHED …
#define TASK_TIED …
#define TASK_UNTIED …
#define TASK_EXPLICIT …
#define TASK_IMPLICIT …
#define TASK_PROXY …
#define TASK_FULL …
#define TASK_DETACHABLE …
#define TASK_UNDETACHABLE …
#define KMP_CANCEL_THREADS
#define KMP_THREAD_ATTR
#if defined(__ANDROID__)
#undef KMP_CANCEL_THREADS
#endif
#if KMP_OS_WASI
#undef KMP_CANCEL_THREADS
#endif
#if !KMP_OS_WASI
#include <signal.h>
#endif
#include <stdarg.h>
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <limits>
#include <type_traits>
#ifndef __ABSOFT_WIN
#include <sys/types.h>
#endif
#include <limits.h>
#include <time.h>
#include <errno.h>
#include "kmp_os.h"
#include "kmp_safe_c_api.h"
#if KMP_STATS_ENABLED
class kmp_stats_list;
#endif
#if KMP_USE_HIER_SCHED
#undef KMP_USE_HIER_SCHED
#define KMP_USE_HIER_SCHED …
#endif
#if KMP_USE_HWLOC && KMP_AFFINITY_SUPPORTED && !defined(OMPD_SKIP_HWLOC)
#include "hwloc.h"
#ifndef HWLOC_OBJ_NUMANODE
#define HWLOC_OBJ_NUMANODE …
#endif
#ifndef HWLOC_OBJ_PACKAGE
#define HWLOC_OBJ_PACKAGE …
#endif
#endif
#if KMP_ARCH_X86 || KMP_ARCH_X86_64
#include <xmmintrin.h>
#endif
#define KMP_INTERNAL_MALLOC(sz) …
#define KMP_INTERNAL_FREE(p) …
#define KMP_INTERNAL_REALLOC(p, sz) …
#define KMP_INTERNAL_CALLOC(n, sz) …
#include "kmp_debug.h"
#include "kmp_lock.h"
#include "kmp_version.h"
#include "kmp_barrier.h"
#if USE_DEBUGGER
#include "kmp_debugger.h"
#endif
#include "kmp_i18n.h"
#define KMP_HANDLE_SIGNALS …
#include "kmp_wrapper_malloc.h"
#if KMP_OS_UNIX
#include <unistd.h>
#if !defined NSIG && defined _NSIG
#define NSIG …
#endif
#endif
#if KMP_OS_LINUX
#pragma weak clock_gettime
#endif
#if OMPT_SUPPORT
#include "ompt-internal.h"
#endif
#if OMPD_SUPPORT
#include "ompd-specific.h"
#endif
#ifndef UNLIKELY
#define UNLIKELY …
#endif
#include "kmp_str.h"
#ifndef USE_FAST_MEMORY
#define USE_FAST_MEMORY …
#endif
#ifndef KMP_NESTED_HOT_TEAMS
#define KMP_NESTED_HOT_TEAMS …
#define USE_NESTED_HOT_ARG …
#else
#if KMP_NESTED_HOT_TEAMS
#define USE_NESTED_HOT_ARG(x) …
#else
#define USE_NESTED_HOT_ARG …
#endif
#endif
#ifndef USE_CMP_XCHG_FOR_BGET
#define USE_CMP_XCHG_FOR_BGET …
#endif
#define KMP_NSEC_PER_SEC …
#define KMP_USEC_PER_SEC …
#define KMP_NSEC_PER_USEC …
enum { … };
ident_t;
kmp_team_t;
kmp_taskdata_t;
kmp_task_team_t;
kmp_team_p;
kmp_info_p;
kmp_root_p;
template <bool C = false, bool S = true> class kmp_flag_32;
template <bool C = false, bool S = true> class kmp_flag_64;
template <bool C = false, bool S = true> class kmp_atomic_flag_64;
class kmp_flag_oncore;
#ifdef __cplusplus
extern …
#endif
template <bool C, bool S>
extern void __kmp_suspend_32(int th_gtid, kmp_flag_32<C, S> *flag);
template <bool C, bool S>
extern void __kmp_suspend_64(int th_gtid, kmp_flag_64<C, S> *flag);
template <bool C, bool S>
extern void __kmp_atomic_suspend_64(int th_gtid,
kmp_atomic_flag_64<C, S> *flag);
extern void __kmp_suspend_oncore(int th_gtid, kmp_flag_oncore *flag);
#if KMP_HAVE_MWAIT || KMP_HAVE_UMWAIT
template <bool C, bool S>
extern void __kmp_mwait_32(int th_gtid, kmp_flag_32<C, S> *flag);
template <bool C, bool S>
extern void __kmp_mwait_64(int th_gtid, kmp_flag_64<C, S> *flag);
template <bool C, bool S>
extern void __kmp_atomic_mwait_64(int th_gtid, kmp_atomic_flag_64<C, S> *flag);
extern void __kmp_mwait_oncore(int th_gtid, kmp_flag_oncore *flag);
#endif
template <bool C, bool S>
extern void __kmp_resume_32(int target_gtid, kmp_flag_32<C, S> *flag);
template <bool C, bool S>
extern void __kmp_resume_64(int target_gtid, kmp_flag_64<C, S> *flag);
template <bool C, bool S>
extern void __kmp_atomic_resume_64(int target_gtid,
kmp_atomic_flag_64<C, S> *flag);
extern void __kmp_resume_oncore(int target_gtid, kmp_flag_oncore *flag);
template <bool C, bool S>
int __kmp_execute_tasks_32(kmp_info_t *thread, kmp_int32 gtid,
kmp_flag_32<C, S> *flag, int final_spin,
int *thread_finished,
#if USE_ITT_BUILD
void *itt_sync_obj,
#endif
kmp_int32 is_constrained);
template <bool C, bool S>
int __kmp_execute_tasks_64(kmp_info_t *thread, kmp_int32 gtid,
kmp_flag_64<C, S> *flag, int final_spin,
int *thread_finished,
#if USE_ITT_BUILD
void *itt_sync_obj,
#endif
kmp_int32 is_constrained);
template <bool C, bool S>
int __kmp_atomic_execute_tasks_64(kmp_info_t *thread, kmp_int32 gtid,
kmp_atomic_flag_64<C, S> *flag,
int final_spin, int *thread_finished,
#if USE_ITT_BUILD
void *itt_sync_obj,
#endif
kmp_int32 is_constrained);
int __kmp_execute_tasks_oncore(kmp_info_t *thread, kmp_int32 gtid,
kmp_flag_oncore *flag, int final_spin,
int *thread_finished,
#if USE_ITT_BUILD
void *itt_sync_obj,
#endif
kmp_int32 is_constrained);
extern int __kmp_nesting_mode;
extern int __kmp_nesting_mode_nlevels;
extern int *__kmp_nesting_nth_level;
extern void __kmp_init_nesting_mode();
extern void __kmp_set_nesting_mode_threads();
class kmp_safe_raii_file_t { … };
template <typename SourceType, typename TargetType,
bool isSourceSmaller = (sizeof(SourceType) < sizeof(TargetType)),
bool isSourceEqual = (sizeof(SourceType) == sizeof(TargetType)),
bool isSourceSigned = std::is_signed<SourceType>::value,
bool isTargetSigned = std::is_signed<TargetType>::value>
struct kmp_convert {};
kmp_convert<SourceType, TargetType, true, false, true, true>;
kmp_convert<SourceType, TargetType, false, true, true, true>;
kmp_convert<SourceType, TargetType, false, false, true, true>;
kmp_convert<SourceType, TargetType, true, false, true, false>;
kmp_convert<SourceType, TargetType, false, true, true, false>;
kmp_convert<SourceType, TargetType, false, false, true, false>;
kmp_convert<SourceType, TargetType, true, false, false, true>;
kmp_convert<SourceType, TargetType, false, true, false, true>;
kmp_convert<SourceType, TargetType, false, false, false, true>;
kmp_convert<SourceType, TargetType, true, false, false, false>;
kmp_convert<SourceType, TargetType, false, true, false, false>;
kmp_convert<SourceType, TargetType, false, false, false, false>;
template <typename T1, typename T2>
static inline void __kmp_type_convert(T1 src, T2 *dest) { … }
#endif