Skip to content
This repository has been archived by the owner on Feb 2, 2024. It is now read-only.

Fixes build problem with new tbb=2021.6 #1005

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions sdc/native/utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@

#define HAS_TASK_SCHEDULER_INIT (TBB_INTERFACE_VERSION < 12002)
#define HAS_TASK_SCHEDULER_HANDLE (TBB_INTERFACE_VERSION >= 12003)
#define HAS_TASK_SCHEDULER_HANDLE_GET (HAS_TASK_SCHEDULER_HANDLE && TBB_INTERFACE_VERSION < 12060)
#define HAS_TBB_ATTACH (TBB_INTERFACE_VERSION >= 12060)


namespace utils
{
Expand Down Expand Up @@ -67,10 +70,10 @@ struct tbb_context
{
#if HAS_TASK_SCHEDULER_INIT
tsi.reset(new tbb::task_scheduler_init(tbb::task_arena::automatic));
#elif HAS_TASK_SCHEDULER_HANDLE
#elif HAS_TASK_SCHEDULER_HANDLE_GET
tsh = tbb::task_scheduler_handle::get();
#else
#pragma message("Unsupported version of TBB. Parallel sorting is disabled")
#elif HAS_TBB_ATTACH
tsh = tbb::attach();
#endif
arena.reset(new tbb::task_arena());
}
Expand Down