Support for oneTBB from oneAPI, where Intel reworked and deprecated
some interfaces.
Implements some of TBB universal fix (2020/2021 fixes) #7332
This one adds TBB_HAS_GLOBAL_CONTROL for the up to date oneTBB.
This commit is contained in:
Vojtech Bubnik 2021-12-12 14:14:43 +01:00
parent c772d28070
commit 23e4ecdf0f
2 changed files with 12 additions and 3 deletions

View file

@ -36,15 +36,14 @@
#include <tbb/parallel_for.h>
// Intel redesigned some TBB interface considerably when merging TBB with their oneAPI set of libraries, see GH #7332.
// We are using quite an old TBB 2017 U7. Before we update our build servers, let's use the old API, which is deprecated in up to date TBB.
#if ! defined(TBB_VERSION_MAJOR)
#include <tbb/version.h>
#endif
#if ! defined(TBB_VERSION_MAJOR)
static_assert(false, "TBB_VERSION_MAJOR not defined");
#endif
// Intel redesigned some TBB interface considerably when merging TBB with their oneAPI set of libraries, see GH #7332.
#if TBB_VERSION_MAJOR >= 2021
#include <tbb/parallel_pipeline.h>
using slic3r_tbb_filtermode = tbb::filter_mode;

View file

@ -47,6 +47,16 @@
// We are using quite an old TBB 2017 U7, which does not support global control API officially.
// Before we update our build servers, let's use the old API, which is deprecated in up to date TBB.
#include <tbb/tbb.h>
#if ! defined(TBB_VERSION_MAJOR)
#include <tbb/version.h>
#endif
#if ! defined(TBB_VERSION_MAJOR)
static_assert(false, "TBB_VERSION_MAJOR not defined");
#endif
#if TBB_VERSION_MAJOR >= 2021
#define TBB_HAS_GLOBAL_CONTROL
#endif
#ifdef TBB_HAS_GLOBAL_CONTROL
#include <tbb/global_control.h>
#else