Changeset View
Changeset View
Standalone View
Standalone View
openmp/runtime/src/kmp_dispatch.cpp
Show First 20 Lines • Show All 74 Lines • ▼ Show 20 Lines | static inline int __kmp_get_monotonicity(ident_t *loc, enum sched_type schedule, | ||||
// TODO: make nonmonotonic when static_steal is fixed | // TODO: make nonmonotonic when static_steal is fixed | ||||
int monotonicity = SCHEDULE_MONOTONIC; | int monotonicity = SCHEDULE_MONOTONIC; | ||||
// Let default be monotonic for executables | // Let default be monotonic for executables | ||||
// compiled with OpenMP* 4.5 or less compilers | // compiled with OpenMP* 4.5 or less compilers | ||||
if (loc->get_openmp_version() < 50) | if (loc->get_openmp_version() < 50) | ||||
monotonicity = SCHEDULE_MONOTONIC; | monotonicity = SCHEDULE_MONOTONIC; | ||||
if (use_hier) | if (use_hier || __kmp_force_monotonic) | ||||
monotonicity = SCHEDULE_MONOTONIC; | monotonicity = SCHEDULE_MONOTONIC; | ||||
else if (SCHEDULE_HAS_NONMONOTONIC(schedule)) | else if (SCHEDULE_HAS_NONMONOTONIC(schedule)) | ||||
monotonicity = SCHEDULE_NONMONOTONIC; | monotonicity = SCHEDULE_NONMONOTONIC; | ||||
else if (SCHEDULE_HAS_MONOTONIC(schedule)) | else if (SCHEDULE_HAS_MONOTONIC(schedule)) | ||||
monotonicity = SCHEDULE_MONOTONIC; | monotonicity = SCHEDULE_MONOTONIC; | ||||
return monotonicity; | return monotonicity; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 2,552 Lines • Show Last 20 Lines |