#include "kmp_wait_release.h"
#include "kmp_barrier.h"
#include "kmp_itt.h"
#include "kmp_os.h"
#include "kmp_stats.h"
#include "ompt-specific.h"
#include "kmp_affinity.h"
#if KMP_MIC
#include <immintrin.h>
#define USE_NGO_STORES …
#endif
#if KMP_MIC && USE_NGO_STORES
#define ngo_load …
#define ngo_store_icvs …
#define ngo_store_go …
#define ngo_sync …
#else
#define ngo_load(src) …
#define ngo_store_icvs(dst, src) …
#define ngo_store_go(dst, src) …
#define ngo_sync() …
#endif
void __kmp_print_structure(void);
void distributedBarrier::computeVarsForN(size_t n) { … }
void distributedBarrier::computeGo(size_t n) { … }
void distributedBarrier::resize(size_t nthr) { … }
kmp_uint64 distributedBarrier::go_release() { … }
void distributedBarrier::go_reset() { … }
void distributedBarrier::init(size_t nthr) { … }
void __kmp_dist_barrier_wakeup(enum barrier_type bt, kmp_team_t *team,
size_t start, size_t stop, size_t inc,
size_t tid) { … }
static void __kmp_dist_barrier_gather(
enum barrier_type bt, kmp_info_t *this_thr, int gtid, int tid,
void (*reduce)(void *, void *) USE_ITT_BUILD_ARG(void *itt_sync_obj)) { … }
static void __kmp_dist_barrier_release(
enum barrier_type bt, kmp_info_t *this_thr, int gtid, int tid,
int propagate_icvs USE_ITT_BUILD_ARG(void *itt_sync_obj)) { … }
template <bool cancellable = false>
static bool __kmp_linear_barrier_gather_template(
enum barrier_type bt, kmp_info_t *this_thr, int gtid, int tid,
void (*reduce)(void *, void *) USE_ITT_BUILD_ARG(void *itt_sync_obj)) { … }
template <bool cancellable = false>
static bool __kmp_linear_barrier_release_template(
enum barrier_type bt, kmp_info_t *this_thr, int gtid, int tid,
int propagate_icvs USE_ITT_BUILD_ARG(void *itt_sync_obj)) { … }
static void __kmp_linear_barrier_gather(
enum barrier_type bt, kmp_info_t *this_thr, int gtid, int tid,
void (*reduce)(void *, void *) USE_ITT_BUILD_ARG(void *itt_sync_obj)) { … }
static bool __kmp_linear_barrier_gather_cancellable(
enum barrier_type bt, kmp_info_t *this_thr, int gtid, int tid,
void (*reduce)(void *, void *) USE_ITT_BUILD_ARG(void *itt_sync_obj)) { … }
static void __kmp_linear_barrier_release(
enum barrier_type bt, kmp_info_t *this_thr, int gtid, int tid,
int propagate_icvs USE_ITT_BUILD_ARG(void *itt_sync_obj)) { … }
static bool __kmp_linear_barrier_release_cancellable(
enum barrier_type bt, kmp_info_t *this_thr, int gtid, int tid,
int propagate_icvs USE_ITT_BUILD_ARG(void *itt_sync_obj)) { … }
static void __kmp_tree_barrier_gather(
enum barrier_type bt, kmp_info_t *this_thr, int gtid, int tid,
void (*reduce)(void *, void *) USE_ITT_BUILD_ARG(void *itt_sync_obj)) { … }
static void __kmp_tree_barrier_release(
enum barrier_type bt, kmp_info_t *this_thr, int gtid, int tid,
int propagate_icvs USE_ITT_BUILD_ARG(void *itt_sync_obj)) { … }
static void __kmp_hyper_barrier_gather(
enum barrier_type bt, kmp_info_t *this_thr, int gtid, int tid,
void (*reduce)(void *, void *) USE_ITT_BUILD_ARG(void *itt_sync_obj)) { … }
#define KMP_REVERSE_HYPER_BAR
static void __kmp_hyper_barrier_release(
enum barrier_type bt, kmp_info_t *this_thr, int gtid, int tid,
int propagate_icvs USE_ITT_BUILD_ARG(void *itt_sync_obj)) { … }
static bool __kmp_init_hierarchical_barrier_thread(enum barrier_type bt,
kmp_bstate_t *thr_bar,
kmp_uint32 nproc, int gtid,
int tid, kmp_team_t *team) { … }
static void __kmp_hierarchical_barrier_gather(
enum barrier_type bt, kmp_info_t *this_thr, int gtid, int tid,
void (*reduce)(void *, void *) USE_ITT_BUILD_ARG(void *itt_sync_obj)) { … }
static void __kmp_hierarchical_barrier_release(
enum barrier_type bt, kmp_info_t *this_thr, int gtid, int tid,
int propagate_icvs USE_ITT_BUILD_ARG(void *itt_sync_obj)) { … }
template <bool cancellable> struct is_cancellable { … };
template <> struct is_cancellable<true> { … };
template <> struct is_cancellable<false> { … };
template <bool cancellable = false>
static int __kmp_barrier_template(enum barrier_type bt, int gtid, int is_split,
size_t reduce_size, void *reduce_data,
void (*reduce)(void *, void *)) { … }
int __kmp_barrier(enum barrier_type bt, int gtid, int is_split,
size_t reduce_size, void *reduce_data,
void (*reduce)(void *, void *)) { … }
#if defined(KMP_GOMP_COMPAT)
int __kmp_barrier_gomp_cancel(int gtid) { … }
#endif
void __kmp_end_split_barrier(enum barrier_type bt, int gtid) { … }
void __kmp_join_barrier(int gtid) { … }
void __kmp_fork_barrier(int gtid, int tid) { … }
void __kmp_setup_icv_copy(kmp_team_t *team, int new_nproc,
kmp_internal_control_t *new_icvs, ident_t *loc) { … }