diff --git a/algo/base/BuildInfo.h b/algo/base/BuildInfo.h index ddfe4bb44dcb280c8e5f710b63da52aa45d7a7b8..5eba468404086385592082f731fe137a1ee1a00b 100644 --- a/algo/base/BuildInfo.h +++ b/algo/base/BuildInfo.h @@ -13,8 +13,8 @@ namespace cbm::algo::BuildInfo extern const std::string BUILD_TYPE; extern const bool GPU_DEBUG; - inline constexpr bool HAVE_TBB = -#ifdef WITH_TBB + inline constexpr bool WITH_TBB = +#ifdef HAVE_TBB true; #else false; diff --git a/algo/base/compat/Algorithm.h b/algo/base/compat/Algorithm.h index 378cc575824c8dddd79e1219762947645bb7dadb..5aef2404f79dd26f7aea39f77f4d584bc03d88d3 100644 --- a/algo/base/compat/Algorithm.h +++ b/algo/base/compat/Algorithm.h @@ -16,7 +16,7 @@ **/ #include <algorithm> -#if __has_include(<execution>) +#ifdef __cpp_lib_execution #define WITH_EXECUTION #include <execution> #endif @@ -28,11 +28,11 @@ namespace cbm::algo { #ifdef WITH_EXECUTION inline constexpr auto ExecPolicy = -#ifdef HAVE_TBB +#if defined(__cpp_lib_parallel_algorithm) && defined(HAVE_TBB) std::execution::par_unseq; #else std::execution::seq; -#endif // HAVE_TBB +#endif // __cpp_lib_parallel_algorithm && WITH_TBB #endif // WITH_EXECUTION } // namespace detail