// Can be used in a unit with between 2 to 8 threads
template <typename T> class core_barrier_impl {
static inline kmp_uint64 get_wait_val(int num_active) {
- kmp_uint64 wait_val;
+ kmp_uint64 wait_val = 0LL;
switch (num_active) {
case 2:
wait_val = 0x0101LL;
kmp_int32 is_active() const { return active; }
kmp_int32 get_num_active() const { return active; }
+#ifdef KMP_DEBUG
void print() {
KD_TRACE(
10,
active, &hier_pr, hier_pr.u.p.lb, hier_pr.u.p.ub, hier_pr.u.p.st,
hier_pr.u.p.tc));
}
+#endif
};
// Information regarding a single layer within the scheduling hierarchy
typename traits_t<T>::signed_t chunk; // chunk size associated with schedule
int length; // length of the kmp_hier_top_unit_t array
+#ifdef KMP_DEBUG
// Print this layer's information
void print() {
const char *t = __kmp_get_hier_str(type);
"length:%d\n",
num_active, t, sched, chunk, length));
}
+#endif
};
/*
int get_top_level_nproc() const { return top_level_nproc; }
// Return whether this hierarchy is valid or not
bool is_valid() const { return valid; }
+#ifdef KMP_DEBUG
// Print the hierarchy
void print() {
KD_TRACE(10, ("kmp_hier_t:\n"));
}
}
}
+#endif
};
template <typename T>
typename traits_t<T>::signed_t *new_chunks,
T lb, T ub,
typename traits_t<T>::signed_t st) {
- typedef typename traits_t<T>::signed_t ST;
- typedef typename traits_t<T>::unsigned_t UT;
int tid, gtid, num_hw_threads, num_threads_per_layer1, active;
int my_buffer_index;
kmp_info_t *th;