Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-07-30 08:46:16

0001 /*
0002     Copyright (c) 2005-2023 Intel Corporation
0003 
0004     Licensed under the Apache License, Version 2.0 (the "License");
0005     you may not use this file except in compliance with the License.
0006     You may obtain a copy of the License at
0007 
0008         http://www.apache.org/licenses/LICENSE-2.0
0009 
0010     Unless required by applicable law or agreed to in writing, software
0011     distributed under the License is distributed on an "AS IS" BASIS,
0012     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
0013     See the License for the specific language governing permissions and
0014     limitations under the License.
0015 */
0016 
0017 #ifndef __TBB_detail__config_H
0018 #define __TBB_detail__config_H
0019 
0020 /** This header is supposed to contain macro definitions only.
0021     The macros defined here are intended to control such aspects of TBB build as
0022     - presence of compiler features
0023     - compilation modes
0024     - feature sets
0025     - known compiler/platform issues
0026 **/
0027 
0028 /* Check which standard library we use. */
0029 #include <cstddef>
0030 
0031 #ifdef __has_include
0032 #if __has_include(<version>)
0033 #include <version>
0034 #endif
0035 #endif
0036 
0037 #include "_export.h"
0038 
0039 #if _MSC_VER
0040     #define __TBB_EXPORTED_FUNC   __cdecl
0041     #define __TBB_EXPORTED_METHOD __thiscall
0042 #else
0043     #define __TBB_EXPORTED_FUNC
0044     #define __TBB_EXPORTED_METHOD
0045 #endif
0046 
0047 #if defined(_MSVC_LANG)
0048     #define __TBB_LANG _MSVC_LANG
0049 #else
0050     #define __TBB_LANG __cplusplus
0051 #endif // _MSVC_LANG
0052 
0053 #define __TBB_CPP14_PRESENT (__TBB_LANG >= 201402L)
0054 #define __TBB_CPP17_PRESENT (__TBB_LANG >= 201703L)
0055 #define __TBB_CPP20_PRESENT (__TBB_LANG >= 202002L)
0056 
0057 #if __INTEL_COMPILER || _MSC_VER
0058     #define __TBB_NOINLINE(decl) __declspec(noinline) decl
0059 #elif __GNUC__
0060     #define __TBB_NOINLINE(decl) decl __attribute__ ((noinline))
0061 #else
0062     #define __TBB_NOINLINE(decl) decl
0063 #endif
0064 
0065 #define __TBB_STRING_AUX(x) #x
0066 #define __TBB_STRING(x) __TBB_STRING_AUX(x)
0067 
0068 // Note that when ICC or Clang is in use, __TBB_GCC_VERSION might not fully match
0069 // the actual GCC version on the system.
0070 #define __TBB_GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
0071 
0072 /* Check which standard library we use. */
0073 
0074 // Prior to GCC 7, GNU libstdc++ did not have a convenient version macro.
0075 // Therefore we use different ways to detect its version.
0076 #ifdef TBB_USE_GLIBCXX_VERSION
0077     // The version is explicitly specified in our public TBB_USE_GLIBCXX_VERSION macro.
0078     // Its format should match the __TBB_GCC_VERSION above, e.g. 70301 for libstdc++ coming with GCC 7.3.1.
0079     #define __TBB_GLIBCXX_VERSION TBB_USE_GLIBCXX_VERSION
0080 #elif _GLIBCXX_RELEASE && _GLIBCXX_RELEASE != __GNUC__
0081     // Reported versions of GCC and libstdc++ do not match; trust the latter
0082     #define __TBB_GLIBCXX_VERSION (_GLIBCXX_RELEASE*10000)
0083 #elif __GLIBCPP__ || __GLIBCXX__
0084     // The version macro is not defined or matches the GCC version; use __TBB_GCC_VERSION
0085     #define __TBB_GLIBCXX_VERSION __TBB_GCC_VERSION
0086 #endif
0087 
0088 #if __clang__
0089     // according to clang documentation, version can be vendor specific
0090     #define __TBB_CLANG_VERSION (__clang_major__ * 10000 + __clang_minor__ * 100 + __clang_patchlevel__)
0091 #endif
0092 
0093 /** Macro helpers **/
0094 
0095 #define __TBB_CONCAT_AUX(A,B) A##B
0096 // The additional level of indirection is needed to expand macros A and B (not to get the AB macro).
0097 // See [cpp.subst] and [cpp.concat] for more details.
0098 #define __TBB_CONCAT(A,B) __TBB_CONCAT_AUX(A,B)
0099 // The IGNORED argument and comma are needed to always have 2 arguments (even when A is empty).
0100 #define __TBB_IS_MACRO_EMPTY(A,IGNORED) __TBB_CONCAT_AUX(__TBB_MACRO_EMPTY,A)
0101 #define __TBB_MACRO_EMPTY 1
0102 
0103 #if _M_X64 || _M_ARM64
0104     #define __TBB_W(name) name##64
0105 #else
0106     #define __TBB_W(name) name
0107 #endif
0108 
0109 /** User controlled TBB features & modes **/
0110 
0111 #ifndef TBB_USE_DEBUG
0112     /*
0113     There are four cases that are supported:
0114     1. "_DEBUG is undefined" means "no debug";
0115     2. "_DEBUG defined to something that is evaluated to 0" (including "garbage", as per [cpp.cond]) means "no debug";
0116     3. "_DEBUG defined to something that is evaluated to a non-zero value" means "debug";
0117     4. "_DEBUG defined to nothing (empty)" means "debug".
0118     */
0119     #ifdef _DEBUG
0120         // Check if _DEBUG is empty.
0121         #define __TBB_IS__DEBUG_EMPTY (__TBB_IS_MACRO_EMPTY(_DEBUG,IGNORED)==__TBB_MACRO_EMPTY)
0122         #if __TBB_IS__DEBUG_EMPTY
0123             #define TBB_USE_DEBUG 1
0124         #else
0125             #define TBB_USE_DEBUG _DEBUG
0126         #endif // __TBB_IS__DEBUG_EMPTY
0127     #else
0128         #define TBB_USE_DEBUG 0
0129     #endif // _DEBUG
0130 #endif // TBB_USE_DEBUG
0131 
0132 #ifndef TBB_USE_ASSERT
0133     #define TBB_USE_ASSERT TBB_USE_DEBUG
0134 #endif // TBB_USE_ASSERT
0135 
0136 #ifndef TBB_USE_PROFILING_TOOLS
0137 #if TBB_USE_DEBUG
0138     #define TBB_USE_PROFILING_TOOLS 2
0139 #else // TBB_USE_DEBUG
0140     #define TBB_USE_PROFILING_TOOLS 0
0141 #endif // TBB_USE_DEBUG
0142 #endif // TBB_USE_PROFILING_TOOLS
0143 
0144 // Exceptions support cases
0145 #if !(__EXCEPTIONS || defined(_CPPUNWIND) || __SUNPRO_CC)
0146     #if TBB_USE_EXCEPTIONS
0147         #error Compilation settings do not support exception handling. Please do not set TBB_USE_EXCEPTIONS macro or set it to 0.
0148     #elif !defined(TBB_USE_EXCEPTIONS)
0149         #define TBB_USE_EXCEPTIONS 0
0150     #endif
0151 #elif !defined(TBB_USE_EXCEPTIONS)
0152     #define TBB_USE_EXCEPTIONS 1
0153 #endif
0154 
0155 /** Preprocessor symbols to determine HW architecture **/
0156 
0157 #if _WIN32 || _WIN64
0158     #if defined(_M_X64) || defined(__x86_64__)  // the latter for MinGW support
0159         #define __TBB_x86_64 1
0160     #elif defined(_M_IA64)
0161         #define __TBB_ipf 1
0162     #elif defined(_M_IX86) || defined(__i386__) // the latter for MinGW support
0163         #define __TBB_x86_32 1
0164     #else
0165         #define __TBB_generic_arch 1
0166     #endif
0167 #else /* Assume generic Unix */
0168     #if __x86_64__
0169         #define __TBB_x86_64 1
0170     #elif __ia64__
0171         #define __TBB_ipf 1
0172     #elif __i386__||__i386  // __i386 is for Sun OS
0173         #define __TBB_x86_32 1
0174     #else
0175         #define __TBB_generic_arch 1
0176     #endif
0177 #endif
0178 
0179 /** Windows API or POSIX API **/
0180 
0181 #if _WIN32 || _WIN64
0182     #define __TBB_USE_WINAPI 1
0183 #else
0184     #define __TBB_USE_POSIX 1
0185 #endif
0186 
0187 /** Internal TBB features & modes **/
0188 
0189 /** __TBB_DYNAMIC_LOAD_ENABLED describes the system possibility to load shared libraries at run time **/
0190 #ifndef __TBB_DYNAMIC_LOAD_ENABLED
0191     #define __TBB_DYNAMIC_LOAD_ENABLED (!__EMSCRIPTEN__)
0192 #endif
0193 
0194 /** __TBB_WIN8UI_SUPPORT enables support of Windows* Store Apps and limit a possibility to load
0195     shared libraries at run time only from application container **/
0196 #if defined(WINAPI_FAMILY) && WINAPI_FAMILY == WINAPI_FAMILY_APP
0197     #define __TBB_WIN8UI_SUPPORT 1
0198 #else
0199     #define __TBB_WIN8UI_SUPPORT 0
0200 #endif
0201 
0202 /** __TBB_WEAK_SYMBOLS_PRESENT denotes that the system supports the weak symbol mechanism **/
0203 #ifndef __TBB_WEAK_SYMBOLS_PRESENT
0204     #define __TBB_WEAK_SYMBOLS_PRESENT ( !__EMSCRIPTEN__ && !_WIN32 && !__APPLE__ && !__sun && (__TBB_GCC_VERSION >= 40000 || __INTEL_COMPILER ) )
0205 #endif
0206 
0207 /** Presence of compiler features **/
0208 
0209 #if __clang__ && !__INTEL_COMPILER
0210     #define __TBB_USE_OPTIONAL_RTTI __has_feature(cxx_rtti)
0211 #elif defined(_CPPRTTI)
0212     #define __TBB_USE_OPTIONAL_RTTI 1
0213 #else
0214     #define __TBB_USE_OPTIONAL_RTTI (__GXX_RTTI || __RTTI || __INTEL_RTTI__)
0215 #endif
0216 
0217 /** Address sanitizer detection **/
0218 #ifdef __SANITIZE_ADDRESS__
0219     #define __TBB_USE_ADDRESS_SANITIZER 1
0220 #elif defined(__has_feature)
0221 #if __has_feature(address_sanitizer)
0222     #define __TBB_USE_ADDRESS_SANITIZER 1
0223 #endif
0224 #endif
0225 
0226 /** Library features presence macros **/
0227 
0228 #define __TBB_CPP14_INTEGER_SEQUENCE_PRESENT       (__TBB_LANG >= 201402L)
0229 #define __TBB_CPP17_INVOKE_PRESENT                 (__TBB_LANG >= 201703L)
0230 
0231 // TODO: Remove the condition(__INTEL_COMPILER > 2021) from the __TBB_CPP17_DEDUCTION_GUIDES_PRESENT
0232 // macro when this feature start working correctly on this compiler.
0233 #if __INTEL_COMPILER && (!_MSC_VER || __INTEL_CXX11_MOVE__)
0234     #define __TBB_CPP14_VARIABLE_TEMPLATES_PRESENT (__TBB_LANG >= 201402L)
0235     #define __TBB_CPP17_DEDUCTION_GUIDES_PRESENT   (__INTEL_COMPILER > 2021 && __TBB_LANG >= 201703L)
0236     #define __TBB_CPP20_CONCEPTS_PRESENT           0 // TODO: add a mechanism for future addition
0237 #elif __clang__
0238     #define __TBB_CPP14_VARIABLE_TEMPLATES_PRESENT (__has_feature(cxx_variable_templates))
0239     #define __TBB_CPP20_CONCEPTS_PRESENT           0 // TODO: add a mechanism for future addition
0240     #ifdef __cpp_deduction_guides
0241         #define __TBB_CPP17_DEDUCTION_GUIDES_PRESENT (__cpp_deduction_guides >= 201611L)
0242     #else
0243         #define __TBB_CPP17_DEDUCTION_GUIDES_PRESENT 0
0244     #endif
0245 #elif __GNUC__
0246     #define __TBB_CPP14_VARIABLE_TEMPLATES_PRESENT (__TBB_LANG >= 201402L && __TBB_GCC_VERSION >= 50000)
0247     #define __TBB_CPP17_DEDUCTION_GUIDES_PRESENT   (__cpp_deduction_guides >= 201606L)
0248     #define __TBB_CPP20_CONCEPTS_PRESENT           (__TBB_LANG >= 201709L && __TBB_GCC_VERSION >= 100201)
0249 #elif _MSC_VER
0250     #define __TBB_CPP14_VARIABLE_TEMPLATES_PRESENT (_MSC_FULL_VER >= 190023918 && (!__INTEL_COMPILER || __INTEL_COMPILER >= 1700))
0251     #define __TBB_CPP17_DEDUCTION_GUIDES_PRESENT   (_MSC_VER >= 1914 && __TBB_LANG >= 201703L && (!__INTEL_COMPILER || __INTEL_COMPILER > 2021))
0252     #define __TBB_CPP20_CONCEPTS_PRESENT           (_MSC_VER >= 1923 && __TBB_LANG >= 202002L) // TODO: INTEL_COMPILER?
0253 #else
0254     #define __TBB_CPP14_VARIABLE_TEMPLATES_PRESENT (__TBB_LANG >= 201402L)
0255     #define __TBB_CPP17_DEDUCTION_GUIDES_PRESENT   (__TBB_LANG >= 201703L)
0256     #define __TBB_CPP20_CONCEPTS_PRESENT           (__TBB_LANG >= 202002L)
0257 #endif
0258 
0259 // GCC4.8 on RHEL7 does not support std::get_new_handler
0260 #define __TBB_CPP11_GET_NEW_HANDLER_PRESENT             (_MSC_VER >= 1900 || __TBB_GLIBCXX_VERSION >= 40900 && __GXX_EXPERIMENTAL_CXX0X__ || _LIBCPP_VERSION)
0261 // GCC4.8 on RHEL7 does not support std::is_trivially_copyable
0262 #define __TBB_CPP11_TYPE_PROPERTIES_PRESENT             (_LIBCPP_VERSION || _MSC_VER >= 1700 || (__TBB_GLIBCXX_VERSION >= 50000 && __GXX_EXPERIMENTAL_CXX0X__))
0263 
0264 #define __TBB_CPP17_MEMORY_RESOURCE_PRESENT             (_MSC_VER >= 1913 && (__TBB_LANG > 201402L) || \
0265                                                         __TBB_GLIBCXX_VERSION >= 90000 && __TBB_LANG >= 201703L)
0266 #define __TBB_CPP17_HW_INTERFERENCE_SIZE_PRESENT        (_MSC_VER >= 1911)
0267 #define __TBB_CPP17_LOGICAL_OPERATIONS_PRESENT          (__TBB_LANG >= 201703L)
0268 #define __TBB_CPP17_ALLOCATOR_IS_ALWAYS_EQUAL_PRESENT   (__TBB_LANG >= 201703L)
0269 #define __TBB_CPP17_IS_SWAPPABLE_PRESENT                (__TBB_LANG >= 201703L)
0270 
0271 #if defined(__cpp_impl_three_way_comparison) && defined(__cpp_lib_three_way_comparison)
0272     #define __TBB_CPP20_COMPARISONS_PRESENT ((__cpp_impl_three_way_comparison >= 201907L) && (__cpp_lib_three_way_comparison >= 201907L))
0273 #else
0274     #define __TBB_CPP20_COMPARISONS_PRESENT 0
0275 #endif
0276 
0277 #define __TBB_RESUMABLE_TASKS                           (!__TBB_WIN8UI_SUPPORT && !__ANDROID__ && !__QNXNTO__ && (!__linux__ || __GLIBC__))
0278 
0279 /* This macro marks incomplete code or comments describing ideas which are considered for the future.
0280  * See also for plain comment with TODO and FIXME marks for small improvement opportunities.
0281  */
0282 #define __TBB_TODO 0
0283 
0284 /* Check which standard library we use. */
0285 /* __TBB_SYMBOL is defined only while processing exported symbols list where C++ is not allowed. */
0286 #if !defined(__TBB_SYMBOL) && !__TBB_CONFIG_PREPROC_ONLY
0287     #include <cstddef>
0288 #endif
0289 
0290 /** Target OS is either iOS* or iOS* simulator **/
0291 #if __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__
0292     #define __TBB_IOS 1
0293 #endif
0294 
0295 #if __APPLE__
0296     #if __INTEL_COMPILER && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ > 1099 \
0297                          && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 101000
0298         // ICC does not correctly set the macro if -mmacosx-min-version is not specified
0299         #define __TBB_MACOS_TARGET_VERSION  (100000 + 10*(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ - 1000))
0300     #else
0301         #define __TBB_MACOS_TARGET_VERSION  __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__
0302     #endif
0303 #endif
0304 
0305 #if defined(__GNUC__) && !defined(__INTEL_COMPILER)
0306     #define __TBB_GCC_WARNING_IGNORED_ATTRIBUTES_PRESENT (__TBB_GCC_VERSION >= 60100)
0307 #endif
0308 
0309 #if __GNUC__ && !__INTEL_COMPILER && !__clang__
0310     #define __TBB_GCC_PARAMETER_PACK_IN_LAMBDAS_BROKEN (__TBB_GCC_VERSION <= 40805)
0311 #endif
0312 
0313 #define __TBB_CPP17_FALLTHROUGH_PRESENT (__TBB_LANG >= 201703L)
0314 #define __TBB_CPP17_NODISCARD_PRESENT   (__TBB_LANG >= 201703L)
0315 #define __TBB_FALLTHROUGH_PRESENT       (__TBB_GCC_VERSION >= 70000 && !__INTEL_COMPILER)
0316 
0317 #if __TBB_CPP17_FALLTHROUGH_PRESENT
0318     #define __TBB_fallthrough [[fallthrough]]
0319 #elif __TBB_FALLTHROUGH_PRESENT
0320     #define __TBB_fallthrough __attribute__ ((fallthrough))
0321 #else
0322     #define __TBB_fallthrough
0323 #endif
0324 
0325 #if __TBB_CPP17_NODISCARD_PRESENT
0326     #define __TBB_nodiscard [[nodiscard]]
0327 #elif __clang__ || __GNUC__
0328     #define __TBB_nodiscard __attribute__((warn_unused_result))
0329 #else
0330     #define __TBB_nodiscard
0331 #endif
0332 
0333 #define __TBB_CPP17_UNCAUGHT_EXCEPTIONS_PRESENT             (_MSC_VER >= 1900 || __GLIBCXX__ && __cpp_lib_uncaught_exceptions \
0334                                                             || _LIBCPP_VERSION >= 3700 && (!__TBB_MACOS_TARGET_VERSION || __TBB_MACOS_TARGET_VERSION >= 101200))
0335 
0336 #define __TBB_TSX_INTRINSICS_PRESENT (__RTM__ || __INTEL_COMPILER || (_MSC_VER>=1700 && (__TBB_x86_64 || __TBB_x86_32)))
0337 
0338 #define __TBB_WAITPKG_INTRINSICS_PRESENT ((__INTEL_COMPILER >= 1900 || __TBB_GCC_VERSION >= 110000 || __TBB_CLANG_VERSION >= 120000) \
0339                                          && (_WIN32 || _WIN64 || __unix__ || __APPLE__) && (__TBB_x86_32 || __TBB_x86_64) && !__ANDROID__)
0340 
0341 /** Internal TBB features & modes **/
0342 
0343 /** __TBB_SOURCE_DIRECTLY_INCLUDED is a mode used in whitebox testing when
0344     it's necessary to test internal functions not exported from TBB DLLs
0345 **/
0346 #if (_WIN32||_WIN64) && (__TBB_SOURCE_DIRECTLY_INCLUDED || TBB_USE_PREVIEW_BINARY)
0347     #define __TBB_NO_IMPLICIT_LINKAGE 1
0348     #define __TBBMALLOC_NO_IMPLICIT_LINKAGE 1
0349 #endif
0350 
0351 #if (__TBB_BUILD || __TBBMALLOC_BUILD || __TBBMALLOCPROXY_BUILD || __TBBBIND_BUILD) && !defined(__TBB_NO_IMPLICIT_LINKAGE)
0352     #define __TBB_NO_IMPLICIT_LINKAGE 1
0353 #endif
0354 
0355 #if _MSC_VER
0356     #if !__TBB_NO_IMPLICIT_LINKAGE
0357         #ifdef _DEBUG
0358             #pragma comment(lib, "tbb12_debug.lib")
0359         #else
0360             #pragma comment(lib, "tbb12.lib")
0361         #endif
0362     #endif
0363 #endif
0364 
0365 #ifndef __TBB_SCHEDULER_OBSERVER
0366     #define __TBB_SCHEDULER_OBSERVER 1
0367 #endif /* __TBB_SCHEDULER_OBSERVER */
0368 
0369 #ifndef __TBB_FP_CONTEXT
0370     #define __TBB_FP_CONTEXT 1
0371 #endif /* __TBB_FP_CONTEXT */
0372 
0373 #define __TBB_RECYCLE_TO_ENQUEUE __TBB_BUILD // keep non-official
0374 
0375 #ifndef __TBB_ARENA_OBSERVER
0376     #define __TBB_ARENA_OBSERVER __TBB_SCHEDULER_OBSERVER
0377 #endif /* __TBB_ARENA_OBSERVER */
0378 
0379 #ifndef __TBB_ARENA_BINDING
0380     #define __TBB_ARENA_BINDING 1
0381 #endif
0382 
0383 // Thread pinning is not available on macOS*
0384 #define __TBB_CPUBIND_PRESENT (__TBB_ARENA_BINDING && !__APPLE__)
0385 
0386 #ifndef __TBB_ENQUEUE_ENFORCED_CONCURRENCY
0387     #define __TBB_ENQUEUE_ENFORCED_CONCURRENCY 1
0388 #endif
0389 
0390 #if !defined(__TBB_SURVIVE_THREAD_SWITCH) && \
0391           (_WIN32 || _WIN64 || __APPLE__ || (defined(__unix__) && !__ANDROID__))
0392     #define __TBB_SURVIVE_THREAD_SWITCH 1
0393 #endif /* __TBB_SURVIVE_THREAD_SWITCH */
0394 
0395 #ifndef TBB_PREVIEW_FLOW_GRAPH_FEATURES
0396     #define TBB_PREVIEW_FLOW_GRAPH_FEATURES __TBB_CPF_BUILD
0397 #endif
0398 
0399 #ifndef __TBB_DEFAULT_PARTITIONER
0400     #define __TBB_DEFAULT_PARTITIONER tbb::auto_partitioner
0401 #endif
0402 
0403 #ifndef __TBB_FLOW_TRACE_CODEPTR
0404     #define __TBB_FLOW_TRACE_CODEPTR __TBB_CPF_BUILD
0405 #endif
0406 
0407 // Intel(R) C++ Compiler starts analyzing usages of the deprecated content at the template
0408 // instantiation site, which is too late for suppression of the corresponding messages for internal
0409 // stuff.
0410 #if !defined(__INTEL_COMPILER) && (!defined(TBB_SUPPRESS_DEPRECATED_MESSAGES) || (TBB_SUPPRESS_DEPRECATED_MESSAGES == 0))
0411     #if (__TBB_LANG >= 201402L && (!defined(_MSC_VER) || _MSC_VER >= 1920))
0412         #define __TBB_DEPRECATED [[deprecated]]
0413         #define __TBB_DEPRECATED_MSG(msg) [[deprecated(msg)]]
0414     #elif _MSC_VER
0415         #define __TBB_DEPRECATED __declspec(deprecated)
0416         #define __TBB_DEPRECATED_MSG(msg) __declspec(deprecated(msg))
0417     #elif (__GNUC__ && __TBB_GCC_VERSION >= 40805) || __clang__
0418         #define __TBB_DEPRECATED __attribute__((deprecated))
0419         #define __TBB_DEPRECATED_MSG(msg) __attribute__((deprecated(msg)))
0420     #endif
0421 #endif  // !defined(TBB_SUPPRESS_DEPRECATED_MESSAGES) || (TBB_SUPPRESS_DEPRECATED_MESSAGES == 0)
0422 
0423 #if !defined(__TBB_DEPRECATED)
0424     #define __TBB_DEPRECATED
0425     #define __TBB_DEPRECATED_MSG(msg)
0426 #elif !defined(__TBB_SUPPRESS_INTERNAL_DEPRECATED_MESSAGES)
0427     // Suppress deprecated messages from self
0428     #define __TBB_SUPPRESS_INTERNAL_DEPRECATED_MESSAGES 1
0429 #endif
0430 
0431 #if defined(TBB_SUPPRESS_DEPRECATED_MESSAGES) && (TBB_SUPPRESS_DEPRECATED_MESSAGES == 0)
0432     #define __TBB_DEPRECATED_VERBOSE __TBB_DEPRECATED
0433     #define __TBB_DEPRECATED_VERBOSE_MSG(msg) __TBB_DEPRECATED_MSG(msg)
0434 #else
0435     #define __TBB_DEPRECATED_VERBOSE
0436     #define __TBB_DEPRECATED_VERBOSE_MSG(msg)
0437 #endif // (TBB_SUPPRESS_DEPRECATED_MESSAGES == 0)
0438 
0439 #if (!defined(TBB_SUPPRESS_DEPRECATED_MESSAGES) || (TBB_SUPPRESS_DEPRECATED_MESSAGES == 0)) && !(__TBB_LANG >= 201103L || _MSC_VER >= 1900)
0440     #pragma message("TBB Warning: Support for C++98/03 is deprecated. Please use the compiler that supports C++11 features at least.")
0441 #endif
0442 
0443 #ifdef _VARIADIC_MAX
0444     #define __TBB_VARIADIC_MAX _VARIADIC_MAX
0445 #else
0446     #if _MSC_VER == 1700
0447         #define __TBB_VARIADIC_MAX 5 // VS11 setting, issue resolved in VS12
0448     #elif _MSC_VER == 1600
0449         #define __TBB_VARIADIC_MAX 10 // VS10 setting
0450     #else
0451         #define __TBB_VARIADIC_MAX 15
0452     #endif
0453 #endif
0454 
0455 #if __SANITIZE_THREAD__
0456     #define __TBB_USE_THREAD_SANITIZER 1
0457 #elif defined(__has_feature)
0458 #if __has_feature(thread_sanitizer)
0459     #define __TBB_USE_THREAD_SANITIZER 1
0460 #endif
0461 #endif
0462 
0463 #ifndef __TBB_USE_SANITIZERS
0464 #define __TBB_USE_SANITIZERS (__TBB_USE_THREAD_SANITIZER || __TBB_USE_ADDRESS_SANITIZER)
0465 #endif
0466 
0467 #ifndef __TBB_RESUMABLE_TASKS_USE_THREADS
0468 #define __TBB_RESUMABLE_TASKS_USE_THREADS __TBB_USE_SANITIZERS
0469 #endif
0470 
0471 #ifndef __TBB_USE_CONSTRAINTS
0472 #define __TBB_USE_CONSTRAINTS 1
0473 #endif
0474 
0475 #ifndef __TBB_STRICT_CONSTRAINTS
0476 #define __TBB_STRICT_CONSTRAINTS 1
0477 #endif
0478 
0479 #if __TBB_CPP20_CONCEPTS_PRESENT && __TBB_USE_CONSTRAINTS
0480     #define __TBB_requires(...) requires __VA_ARGS__
0481 #else // __TBB_CPP20_CONCEPTS_PRESENT
0482     #define __TBB_requires(...)
0483 #endif // __TBB_CPP20_CONCEPTS_PRESENT
0484 
0485 /** Macros of the form __TBB_XXX_BROKEN denote known issues that are caused by
0486     the bugs in compilers, standard or OS specific libraries. They should be
0487     removed as soon as the corresponding bugs are fixed or the buggy OS/compiler
0488     versions go out of the support list.
0489 **/
0490 
0491 // Some STL containers not support allocator traits in old GCC versions
0492 #if __GXX_EXPERIMENTAL_CXX0X__ && __TBB_GLIBCXX_VERSION <= 50301
0493     #define TBB_ALLOCATOR_TRAITS_BROKEN 1
0494 #endif
0495 
0496 // GCC 4.8 C++ standard library implements std::this_thread::yield as no-op.
0497 #if __TBB_GLIBCXX_VERSION >= 40800 && __TBB_GLIBCXX_VERSION < 40900
0498     #define __TBB_GLIBCXX_THIS_THREAD_YIELD_BROKEN 1
0499 #endif
0500 
0501 /** End of __TBB_XXX_BROKEN macro section **/
0502 
0503 #if defined(_MSC_VER) && _MSC_VER>=1500 && !defined(__INTEL_COMPILER)
0504     // A macro to suppress erroneous or benign "unreachable code" MSVC warning (4702)
0505     #define __TBB_MSVC_UNREACHABLE_CODE_IGNORED 1
0506 #endif
0507 
0508 // Many OS versions (Android 4.0.[0-3] for example) need workaround for dlopen to avoid non-recursive loader lock hang
0509 // Setting the workaround for all compile targets ($APP_PLATFORM) below Android 4.4 (android-19)
0510 #if __ANDROID__
0511     #include <android/api-level.h>
0512 #endif
0513 
0514 #define __TBB_PREVIEW_MESSAGE_BASED_KEY_MATCHING (TBB_PREVIEW_FLOW_GRAPH_FEATURES)
0515 
0516 #ifndef __TBB_PREVIEW_CRITICAL_TASKS
0517 #define __TBB_PREVIEW_CRITICAL_TASKS            1
0518 #endif
0519 
0520 #ifndef __TBB_PREVIEW_FLOW_GRAPH_NODE_SET
0521 #define __TBB_PREVIEW_FLOW_GRAPH_NODE_SET       (TBB_PREVIEW_FLOW_GRAPH_FEATURES)
0522 #endif
0523 
0524 #if TBB_PREVIEW_CONCURRENT_HASH_MAP_EXTENSIONS
0525 #define __TBB_PREVIEW_CONCURRENT_HASH_MAP_EXTENSIONS 1
0526 #endif
0527 
0528 #if TBB_PREVIEW_TASK_GROUP_EXTENSIONS || __TBB_BUILD
0529 #define __TBB_PREVIEW_TASK_GROUP_EXTENSIONS 1
0530 #endif
0531 
0532 #endif // __TBB_detail__config_H