File tree Expand file tree Collapse file tree 3 files changed +15
-6
lines changed
include/oneapi/tbb/detail Expand file tree Collapse file tree 3 files changed +15
-6
lines changed Original file line number Diff line number Diff line change 562562#endif
563563
564564// Feature-test macros
565+ #if __TBB_PREVIEW_FLOW_GRAPH_RESOURCE_LIMITING
566+ #define TBB_HAS_FLOW_GRAPH_RESOURCE_LIMITING 202603
567+ #endif
568+
569+ #if __TBB_PREVIEW_PARALLEL_PHASE
570+ #define TBB_HAS_PARALLEL_PHASE 202603
571+ #endif
572+
565573#if __TBB_PREVIEW_TASK_ARENA_CORE_TYPE_SELECTOR
566574#define TBB_HAS_TASK_ARENA_CORE_TYPE_SELECTOR 202603
567575#endif
570578#define TBB_HAS_TASK_GROUP_WAIT_FOR_SINGLE_TASK 202603
571579#endif
572580
573- #if __TBB_PREVIEW_FLOW_GRAPH_RESOURCE_LIMITING
574- #define TBB_HAS_FLOW_GRAPH_RESOURCE_LIMITING 202603
575- #endif
576-
577581#endif // __TBB_detail__config_H
Original file line number Diff line number Diff line change @@ -196,8 +196,8 @@ class thread_leave_manager {
196196 std::uintptr_t policy = FAST_LEAVE;
197197 if (lp == tbb::task_arena::leave_policy::automatic) {
198198 auto glp = tbb::task_arena::leave_policy (global_control::active_value (global_control::leave_policy));
199- if (glp == tbb::task_arena::leave_policy::automatic) {
200- policy = governor::hybrid_cpu () ? FAST_LEAVE : DELAYED_LEAVE;
199+ if (glp == tbb::task_arena::leave_policy::automatic && ! governor::hybrid_cpu () ) {
200+ policy = DELAYED_LEAVE;
201201 }
202202 }
203203 my_state.store (policy, std::memory_order_relaxed);
Original file line number Diff line number Diff line change @@ -427,3 +427,8 @@ TEST_CASE("Test parallel phase with this_task_arena") {
427427 WARN_MESSAGE (median1 < median2,
428428 " Expected one-time fast leave setting to slow workers to start new work" );
429429}
430+
431+ // ! \brief \ref interface
432+ TEST_CASE (" Feature test macro" ) {
433+ CHECK_MESSAGE (TBB_HAS_PARALLEL_PHASE == 202603 , " Incorrect feature test macro" );
434+ }
You can’t perform that action at this time.
0 commit comments