Intel(R) Threading Building Blocks Doxygen Documentation  version 4.2.3
tbb_config.h
Go to the documentation of this file.
1 /*
2  Copyright (c) 2005-2018 Intel Corporation
3 
4  Licensed under the Apache License, Version 2.0 (the "License");
5  you may not use this file except in compliance with the License.
6  You may obtain a copy of the License at
7 
8  http://www.apache.org/licenses/LICENSE-2.0
9 
10  Unless required by applicable law or agreed to in writing, software
11  distributed under the License is distributed on an "AS IS" BASIS,
12  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  See the License for the specific language governing permissions and
14  limitations under the License.
15 
16 
17 
18 
19 */
20 
21 #ifndef __TBB_tbb_config_H
22 #define __TBB_tbb_config_H
23 
32 /* This macro marks incomplete code or comments describing ideas which are considered for the future.
33  * See also for plain comment with TODO and FIXME marks for small improvement opportunities.
34  */
35 #define __TBB_TODO 0
36 
37 /* Check which standard library we use. */
38 /* __TBB_SYMBOL is defined only while processing exported symbols list where C++ is not allowed. */
39 #if !defined(__TBB_SYMBOL) && !__TBB_CONFIG_PREPROC_ONLY
40  #include <cstddef>
41 #endif
42 
43 // note that when ICC or Clang is in use, __TBB_GCC_VERSION might not fully match
44 // the actual GCC version on the system.
45 #define __TBB_GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
46 
47 // Since GNU libstdc++ does not have a convenient macro for its version,
48 // we rely on the version of GCC or the user-specified macro below.
49 // The format of TBB_USE_GLIBCXX_VERSION should match the __TBB_GCC_VERSION above,
50 // e.g. it should be set to 40902 for libstdc++ coming with GCC 4.9.2.
51 #ifdef TBB_USE_GLIBCXX_VERSION
52 #define __TBB_GLIBCXX_VERSION TBB_USE_GLIBCXX_VERSION
53 #elif __GLIBCPP__ || __GLIBCXX__
54 #define __TBB_GLIBCXX_VERSION __TBB_GCC_VERSION
55 //TODO: analyze __GLIBCXX__ instead of __TBB_GCC_VERSION ?
56 #endif
57 
58 #if __clang__
59  // according to clang documentation, version can be vendor specific
60  #define __TBB_CLANG_VERSION (__clang_major__ * 10000 + __clang_minor__ * 100 + __clang_patchlevel__)
61 #endif
62 
64 #if __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__
65  #define __TBB_IOS 1
66 #endif
67 
68 #if __APPLE__
69  #if __INTEL_COMPILER && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ > 1099 \
70  && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 101000
71  // ICC does not correctly set the macro if -mmacosx-min-version is not specified
72  #define __TBB_MACOS_TARGET_VERSION (100000 + 10*(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ - 1000))
73  #else
74  #define __TBB_MACOS_TARGET_VERSION __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__
75  #endif
76 #endif
77 
80 #if _WIN32||_WIN64
81 # if defined(_M_X64)||defined(__x86_64__) // the latter for MinGW support
82 # define __TBB_x86_64 1
83 # elif defined(_M_IA64)
84 # define __TBB_ipf 1
85 # elif defined(_M_IX86)||defined(__i386__) // the latter for MinGW support
86 # define __TBB_x86_32 1
87 # else
88 # define __TBB_generic_arch 1
89 # endif
90 #else /* Assume generic Unix */
91 # if !__linux__ && !__APPLE__
92 # define __TBB_generic_os 1
93 # endif
94 # if __TBB_IOS
95 # define __TBB_generic_arch 1
96 # elif __x86_64__
97 # define __TBB_x86_64 1
98 # elif __ia64__
99 # define __TBB_ipf 1
100 # elif __i386__||__i386 // __i386 is for Sun OS
101 # define __TBB_x86_32 1
102 # else
103 # define __TBB_generic_arch 1
104 # endif
105 #endif
106 
107 #if __MIC__ || __MIC2__
108 #define __TBB_DEFINE_MIC 1
109 #endif
110 
111 #define __TBB_TSX_AVAILABLE ((__TBB_x86_32 || __TBB_x86_64) && !__TBB_DEFINE_MIC)
112 
115 #if __INTEL_COMPILER == 9999 && __INTEL_COMPILER_BUILD_DATE == 20110811
116 /* Intel(R) Composer XE 2011 Update 6 incorrectly sets __INTEL_COMPILER. Fix it. */
117  #undef __INTEL_COMPILER
118  #define __INTEL_COMPILER 1210
119 #endif
120 
121 #if __clang__ && !__INTEL_COMPILER
122 #define __TBB_USE_OPTIONAL_RTTI __has_feature(cxx_rtti)
123 #elif defined(_CPPRTTI)
124 #define __TBB_USE_OPTIONAL_RTTI 1
125 #else
126 #define __TBB_USE_OPTIONAL_RTTI (__GXX_RTTI || __RTTI || __INTEL_RTTI__)
127 #endif
128 
129 #if __TBB_GCC_VERSION >= 40400 && !defined(__INTEL_COMPILER)
130 
131  #define __TBB_GCC_WARNING_SUPPRESSION_PRESENT 1
132 #endif
133 
134 /* Select particular features of C++11 based on compiler version.
135  ICC 12.1 (Linux*), GCC 4.3 and higher, clang 2.9 and higher
136  set __GXX_EXPERIMENTAL_CXX0X__ in c++11 mode.
137 
138  Compilers that mimics other compilers (ICC, clang) must be processed before
139  compilers they mimic (GCC, MSVC).
140 
141  TODO: The following conditions should be extended when new compilers/runtimes
142  support added.
143  */
144 
150 #define __TBB_CPP11_PRESENT (__cplusplus >= 201103L || _MSC_VER >= 1900)
151 
152 #define __TBB_CPP17_FALLTHROUGH_PRESENT (__cplusplus >= 201703L)
153 #define __TBB_FALLTHROUGH_PRESENT (__TBB_GCC_VERSION >= 70000 && !__INTEL_COMPILER)
154 
159 #if __INTEL_COMPILER && !__INTEL_CXX11_MODE__
160  // __INTEL_CXX11_MODE__ is not set, try to deduce it
161  #define __INTEL_CXX11_MODE__ (__GXX_EXPERIMENTAL_CXX0X__ || (_MSC_VER && __STDC_HOSTED__))
162 #endif
163 
164 // Intel(R) C++ Compiler offloading API to the Intel(R) Graphics Technology presence macro
165 // TODO: add support for ICC 15.00 _GFX_enqueue API and then decrease Intel C++ Compiler supported version
166 // TODO: add linux support and restict it with (__linux__ && __TBB_x86_64 && !__ANDROID__) macro
167 #if __INTEL_COMPILER >= 1600 && _WIN32
168 #define __TBB_GFX_PRESENT 1
169 #endif
170 
171 #if __INTEL_COMPILER && (!_MSC_VER || __INTEL_CXX11_MODE__)
172  // On Windows, C++11 features supported by Visual Studio 2010 and higher are enabled by default,
173  // so in absence of /Qstd= use MSVC branch for feature detection.
174  // On other platforms, no -std= means C++03.
175 
176  #define __TBB_CPP11_VARIADIC_TEMPLATES_PRESENT (__INTEL_CXX11_MODE__ && __VARIADIC_TEMPLATES)
177  // Both r-value reference support in compiler and std::move/std::forward
178  // presence in C++ standard library is checked.
179  #define __TBB_CPP11_RVALUE_REF_PRESENT ((_MSC_VER >= 1700 || __GXX_EXPERIMENTAL_CXX0X__ && (__TBB_GLIBCXX_VERSION >= 40500 || _LIBCPP_VERSION)) && __INTEL_COMPILER >= 1400)
180  #define __TBB_IMPLICIT_MOVE_PRESENT (__INTEL_CXX11_MODE__ && __INTEL_COMPILER >= 1400 && (_MSC_VER >= 1900 || __TBB_GCC_VERSION >= 40600 || __clang__))
181  #if _MSC_VER >= 1600
182  #define __TBB_EXCEPTION_PTR_PRESENT ( __INTEL_COMPILER > 1300 \
183  /*ICC 12.1 Upd 10 and 13 beta Upd 2 fixed exception_ptr linking issue*/ \
184  || (__INTEL_COMPILER == 1300 && __INTEL_COMPILER_BUILD_DATE >= 20120530) \
185  || (__INTEL_COMPILER == 1210 && __INTEL_COMPILER_BUILD_DATE >= 20120410) )
186 
189  #elif __TBB_GLIBCXX_VERSION >= 40404 && __TBB_GLIBCXX_VERSION < 40600
190  #define __TBB_EXCEPTION_PTR_PRESENT (__GXX_EXPERIMENTAL_CXX0X__ && __INTEL_COMPILER >= 1200)
191  #elif __TBB_GLIBCXX_VERSION >= 40600
192  #define __TBB_EXCEPTION_PTR_PRESENT (__GXX_EXPERIMENTAL_CXX0X__ && __INTEL_COMPILER >= 1300)
193  #elif _LIBCPP_VERSION
194  #define __TBB_EXCEPTION_PTR_PRESENT __GXX_EXPERIMENTAL_CXX0X__
195  #else
196  #define __TBB_EXCEPTION_PTR_PRESENT 0
197  #endif
198  #define __TBB_STATIC_ASSERT_PRESENT (__INTEL_CXX11_MODE__ || _MSC_VER >= 1600)
199  #define __TBB_CPP11_TUPLE_PRESENT (_MSC_VER >= 1600 || __GXX_EXPERIMENTAL_CXX0X__ && (__TBB_GLIBCXX_VERSION >= 40300 || _LIBCPP_VERSION))
200  #if (__clang__ && __INTEL_COMPILER > 1400)
201  /* Older versions of Intel C++ Compiler do not have __has_include */
202  #if (__has_feature(__cxx_generalized_initializers__) && __has_include(<initializer_list>))
203  #define __TBB_INITIALIZER_LISTS_PRESENT 1
204  #endif
205  #else
206  #define __TBB_INITIALIZER_LISTS_PRESENT (__INTEL_CXX11_MODE__ && __INTEL_COMPILER >= 1400 && (_MSC_VER >= 1800 || __TBB_GLIBCXX_VERSION >= 40400 || _LIBCPP_VERSION))
207  #endif
208  #define __TBB_CONSTEXPR_PRESENT (__INTEL_CXX11_MODE__ && __INTEL_COMPILER >= 1400)
209  #define __TBB_DEFAULTED_AND_DELETED_FUNC_PRESENT (__INTEL_CXX11_MODE__ && __INTEL_COMPILER >= 1200)
210 
211  #define __TBB_NOEXCEPT_PRESENT (__INTEL_CXX11_MODE__ && __INTEL_COMPILER >= 1300 && (__TBB_GLIBCXX_VERSION >= 40600 || _LIBCPP_VERSION || _MSC_VER))
212  #define __TBB_CPP11_STD_BEGIN_END_PRESENT (_MSC_VER >= 1700 || __GXX_EXPERIMENTAL_CXX0X__ && __INTEL_COMPILER >= 1310 && (__TBB_GLIBCXX_VERSION >= 40600 || _LIBCPP_VERSION))
213  #define __TBB_CPP11_AUTO_PRESENT (_MSC_VER >= 1600 || __GXX_EXPERIMENTAL_CXX0X__ && __INTEL_COMPILER >= 1210)
214  #define __TBB_CPP11_DECLTYPE_PRESENT (_MSC_VER >= 1600 || __GXX_EXPERIMENTAL_CXX0X__ && __INTEL_COMPILER >= 1210)
215  #define __TBB_CPP11_LAMBDAS_PRESENT (__INTEL_CXX11_MODE__ && __INTEL_COMPILER >= 1200)
216  #define __TBB_CPP11_DEFAULT_FUNC_TEMPLATE_ARGS_PRESENT (_MSC_VER >= 1800 || __GXX_EXPERIMENTAL_CXX0X__ && __INTEL_COMPILER >= 1210)
217  #define __TBB_OVERRIDE_PRESENT (__INTEL_CXX11_MODE__ && __INTEL_COMPILER >= 1400)
218  #define __TBB_ALIGNAS_PRESENT (__INTEL_CXX11_MODE__ && __INTEL_COMPILER >= 1500)
219  #define __TBB_CPP11_TEMPLATE_ALIASES_PRESENT (__INTEL_CXX11_MODE__ && __INTEL_COMPILER >= 1210)
220  #define __TBB_CPP14_INTEGER_SEQUENCE_PRESENT (__cplusplus >= 201402L)
221  #define __TBB_CPP17_DEDUCTION_GUIDES_PRESENT __INTEL_COMPILER > 1900
222 #elif __clang__
223 
224  #define __TBB_CPP11_VARIADIC_TEMPLATES_PRESENT __has_feature(__cxx_variadic_templates__)
225  #define __TBB_CPP11_RVALUE_REF_PRESENT (__has_feature(__cxx_rvalue_references__) && (_LIBCPP_VERSION || __TBB_GLIBCXX_VERSION >= 40500))
226  #define __TBB_IMPLICIT_MOVE_PRESENT __has_feature(cxx_implicit_moves)
227 
228  #define __TBB_EXCEPTION_PTR_PRESENT (__cplusplus >= 201103L && (_LIBCPP_VERSION || __TBB_GLIBCXX_VERSION >= 40600))
229  #define __TBB_STATIC_ASSERT_PRESENT __has_feature(__cxx_static_assert__)
230 
232  #if (__GXX_EXPERIMENTAL_CXX0X__ && __has_include(<tuple>))
233  #define __TBB_CPP11_TUPLE_PRESENT 1
234  #endif
235  #if (__has_feature(__cxx_generalized_initializers__) && __has_include(<initializer_list>))
236  #define __TBB_INITIALIZER_LISTS_PRESENT 1
237  #endif
238  #define __TBB_CONSTEXPR_PRESENT __has_feature(__cxx_constexpr__)
239  #define __TBB_DEFAULTED_AND_DELETED_FUNC_PRESENT (__has_feature(__cxx_defaulted_functions__) && __has_feature(__cxx_deleted_functions__))
240 
241  #define __TBB_NOEXCEPT_PRESENT (__cplusplus >= 201103L)
242  #define __TBB_CPP11_STD_BEGIN_END_PRESENT (__has_feature(__cxx_range_for__) && (_LIBCPP_VERSION || __TBB_GLIBCXX_VERSION >= 40600))
243  #define __TBB_CPP11_AUTO_PRESENT __has_feature(__cxx_auto_type__)
244  #define __TBB_CPP11_DECLTYPE_PRESENT __has_feature(__cxx_decltype__)
245  #define __TBB_CPP11_LAMBDAS_PRESENT __has_feature(cxx_lambdas)
246  #define __TBB_CPP11_DEFAULT_FUNC_TEMPLATE_ARGS_PRESENT __has_feature(cxx_default_function_template_args)
247  #define __TBB_OVERRIDE_PRESENT __has_feature(cxx_override_control)
248  #define __TBB_ALIGNAS_PRESENT __has_feature(cxx_alignas)
249  #define __TBB_CPP11_TEMPLATE_ALIASES_PRESENT __has_feature(cxx_alias_templates)
250  #define __TBB_CPP14_INTEGER_SEQUENCE_PRESENT (__cplusplus >= 201402L)
251  #define __TBB_CPP17_DEDUCTION_GUIDES_PRESENT (__has_feature(__cpp_deduction_guides))
252 #elif __GNUC__
253  #define __TBB_CPP11_VARIADIC_TEMPLATES_PRESENT __GXX_EXPERIMENTAL_CXX0X__
254  #define __TBB_CPP11_VARIADIC_FIXED_LENGTH_EXP_PRESENT (__GXX_EXPERIMENTAL_CXX0X__ && __TBB_GCC_VERSION >= 40700)
255  #define __TBB_CPP11_RVALUE_REF_PRESENT (__GXX_EXPERIMENTAL_CXX0X__ && __TBB_GCC_VERSION >= 40500)
256  #define __TBB_IMPLICIT_MOVE_PRESENT (__GXX_EXPERIMENTAL_CXX0X__ && __TBB_GCC_VERSION >= 40600)
257 
260  #define __TBB_EXCEPTION_PTR_PRESENT (__GXX_EXPERIMENTAL_CXX0X__ && __TBB_GCC_VERSION >= 40404 && __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4)
261  #define __TBB_STATIC_ASSERT_PRESENT (__GXX_EXPERIMENTAL_CXX0X__ && __TBB_GCC_VERSION >= 40300)
262  #define __TBB_CPP11_TUPLE_PRESENT (__GXX_EXPERIMENTAL_CXX0X__ && __TBB_GCC_VERSION >= 40300)
263  #define __TBB_INITIALIZER_LISTS_PRESENT (__GXX_EXPERIMENTAL_CXX0X__ && __TBB_GCC_VERSION >= 40400)
264 
265  #define __TBB_CONSTEXPR_PRESENT (__GXX_EXPERIMENTAL_CXX0X__ && __TBB_GCC_VERSION >= 40400)
266  #define __TBB_DEFAULTED_AND_DELETED_FUNC_PRESENT (__GXX_EXPERIMENTAL_CXX0X__ && __TBB_GCC_VERSION >= 40400)
267  #define __TBB_NOEXCEPT_PRESENT (__GXX_EXPERIMENTAL_CXX0X__ && __TBB_GCC_VERSION >= 40600)
268  #define __TBB_CPP11_STD_BEGIN_END_PRESENT (__GXX_EXPERIMENTAL_CXX0X__ && __TBB_GCC_VERSION >= 40600)
269  #define __TBB_CPP11_AUTO_PRESENT (__GXX_EXPERIMENTAL_CXX0X__ && __TBB_GCC_VERSION >= 40400)
270  #define __TBB_CPP11_DECLTYPE_PRESENT (__GXX_EXPERIMENTAL_CXX0X__ && __TBB_GCC_VERSION >= 40400)
271  #define __TBB_CPP11_LAMBDAS_PRESENT (__GXX_EXPERIMENTAL_CXX0X__ && __TBB_GCC_VERSION >= 40500)
272  #define __TBB_CPP11_DEFAULT_FUNC_TEMPLATE_ARGS_PRESENT (__GXX_EXPERIMENTAL_CXX0X__ && __TBB_GCC_VERSION >= 40300)
273  #define __TBB_OVERRIDE_PRESENT (__GXX_EXPERIMENTAL_CXX0X__ && __TBB_GCC_VERSION >= 40700)
274  #define __TBB_ALIGNAS_PRESENT (__GXX_EXPERIMENTAL_CXX0X__ && __TBB_GCC_VERSION >= 40800)
275  #define __TBB_CPP11_TEMPLATE_ALIASES_PRESENT (__GXX_EXPERIMENTAL_CXX0X__ && __TBB_GCC_VERSION >= 40700)
276  #define __TBB_CPP14_INTEGER_SEQUENCE_PRESENT (__cplusplus >= 201402L && __TBB_GCC_VERSION >= 50000)
277  #define __TBB_CPP17_DEDUCTION_GUIDES_PRESENT (__cpp_deduction_guides >= 201606)
278 #elif _MSC_VER
279  // These definitions are also used with Intel C++ Compiler in "default" mode (__INTEL_CXX11_MODE__ == 0);
280  // see a comment in "__INTEL_COMPILER" section above.
281 
282  #define __TBB_CPP11_VARIADIC_TEMPLATES_PRESENT (_MSC_VER >= 1800)
283  // Contains a workaround for ICC 13
284  #define __TBB_CPP11_RVALUE_REF_PRESENT (_MSC_VER >= 1700 && (!__INTEL_COMPILER || __INTEL_COMPILER >= 1400))
285  #define __TBB_IMPLICIT_MOVE_PRESENT (_MSC_VER >= 1900)
286  #define __TBB_EXCEPTION_PTR_PRESENT (_MSC_VER >= 1600)
287  #define __TBB_STATIC_ASSERT_PRESENT (_MSC_VER >= 1600)
288  #define __TBB_CPP11_TUPLE_PRESENT (_MSC_VER >= 1600)
289  #define __TBB_INITIALIZER_LISTS_PRESENT (_MSC_VER >= 1800)
290  #define __TBB_CONSTEXPR_PRESENT (_MSC_VER >= 1900)
291  #define __TBB_DEFAULTED_AND_DELETED_FUNC_PRESENT (_MSC_VER >= 1800)
292  #define __TBB_NOEXCEPT_PRESENT (_MSC_VER >= 1900)
293  #define __TBB_CPP11_STD_BEGIN_END_PRESENT (_MSC_VER >= 1700)
294  #define __TBB_CPP11_AUTO_PRESENT (_MSC_VER >= 1600)
295  #define __TBB_CPP11_DECLTYPE_PRESENT (_MSC_VER >= 1600)
296  #define __TBB_CPP11_LAMBDAS_PRESENT (_MSC_VER >= 1600)
297  #define __TBB_CPP11_DEFAULT_FUNC_TEMPLATE_ARGS_PRESENT (_MSC_VER >= 1800)
298  #define __TBB_OVERRIDE_PRESENT (_MSC_VER >= 1700)
299  #define __TBB_ALIGNAS_PRESENT (_MSC_VER >= 1900)
300  #define __TBB_CPP11_TEMPLATE_ALIASES_PRESENT (_MSC_VER >= 1800)
301  #define __TBB_CPP14_INTEGER_SEQUENCE_PRESENT (_MSC_VER >= 1900)
302  #define __TBB_CPP17_DEDUCTION_GUIDES_PRESENT (_MSVC_LANG >= 201703L)
303 #else
304  #define __TBB_CPP11_VARIADIC_TEMPLATES_PRESENT 0
305  #define __TBB_CPP11_RVALUE_REF_PRESENT 0
306  #define __TBB_IMPLICIT_MOVE_PRESENT 0
307  #define __TBB_EXCEPTION_PTR_PRESENT 0
308  #define __TBB_STATIC_ASSERT_PRESENT 0
309  #define __TBB_CPP11_TUPLE_PRESENT 0
310  #define __TBB_INITIALIZER_LISTS_PRESENT 0
311  #define __TBB_CONSTEXPR_PRESENT 0
312  #define __TBB_DEFAULTED_AND_DELETED_FUNC_PRESENT 0
313  #define __TBB_NOEXCEPT_PRESENT 0
314  #define __TBB_CPP11_STD_BEGIN_END_PRESENT 0
315  #define __TBB_CPP11_AUTO_PRESENT 0
316  #define __TBB_CPP11_DECLTYPE_PRESENT 0
317  #define __TBB_CPP11_LAMBDAS_PRESENT 0
318  #define __TBB_CPP11_DEFAULT_FUNC_TEMPLATE_ARGS_PRESENT 0
319  #define __TBB_OVERRIDE_PRESENT 0
320  #define __TBB_ALIGNAS_PRESENT 0
321  #define __TBB_CPP11_TEMPLATE_ALIASES_PRESENT 0
322  #define __TBB_CPP14_INTEGER_SEQUENCE_PRESENT (__cplusplus >= 201402L)
323  #define __TBB_CPP17_DEDUCTION_GUIDES_PRESENT 0
324 #endif
325 
326 // C++11 standard library features
327 
328 #define __TBB_CPP11_ARRAY_PRESENT (_MSC_VER >= 1700 || _LIBCPP_VERSION || __GXX_EXPERIMENTAL_CXX0X__ && __TBB_GLIBCXX_VERSION >= 40300)
329 
330 #ifndef __TBB_CPP11_VARIADIC_FIXED_LENGTH_EXP_PRESENT
331 #define __TBB_CPP11_VARIADIC_FIXED_LENGTH_EXP_PRESENT __TBB_CPP11_VARIADIC_TEMPLATES_PRESENT
332 #endif
333 #define __TBB_CPP11_VARIADIC_TUPLE_PRESENT (!_MSC_VER || _MSC_VER >= 1800)
334 
335 #define __TBB_CPP11_TYPE_PROPERTIES_PRESENT (_LIBCPP_VERSION || _MSC_VER >= 1700 || (__TBB_GLIBCXX_VERSION >= 50000 && __GXX_EXPERIMENTAL_CXX0X__))
336 #define __TBB_TR1_TYPE_PROPERTIES_IN_STD_PRESENT (__GXX_EXPERIMENTAL_CXX0X__ && __TBB_GLIBCXX_VERSION >= 40300 || _MSC_VER >= 1600)
337 // GCC supported some of type properties since 4.7
338 #define __TBB_CPP11_IS_COPY_CONSTRUCTIBLE_PRESENT (__GXX_EXPERIMENTAL_CXX0X__ && __TBB_GLIBCXX_VERSION >= 40700 || __TBB_CPP11_TYPE_PROPERTIES_PRESENT)
339 
340 // In GCC, std::move_if_noexcept appeared later than noexcept
341 #define __TBB_MOVE_IF_NOEXCEPT_PRESENT (__TBB_NOEXCEPT_PRESENT && (__TBB_GLIBCXX_VERSION >= 40700 || _MSC_VER >= 1900 || _LIBCPP_VERSION))
342 #define __TBB_ALLOCATOR_TRAITS_PRESENT (__cplusplus >= 201103L && _LIBCPP_VERSION || _MSC_VER >= 1700 || \
343  __GXX_EXPERIMENTAL_CXX0X__ && __TBB_GLIBCXX_VERSION >= 40700 && !(__TBB_GLIBCXX_VERSION == 40700 && __TBB_DEFINE_MIC))
344 #define __TBB_MAKE_EXCEPTION_PTR_PRESENT (__TBB_EXCEPTION_PTR_PRESENT && (_MSC_VER >= 1700 || __TBB_GLIBCXX_VERSION >= 40600 || _LIBCPP_VERSION))
345 
346 // Due to libc++ limitations in C++03 mode, do not pass rvalues to std::make_shared()
347 #define __TBB_CPP11_SMART_POINTERS_PRESENT ( _MSC_VER >= 1600 || _LIBCPP_VERSION \
348  || ((__cplusplus >= 201103L || __GXX_EXPERIMENTAL_CXX0X__) \
349  && (__TBB_GLIBCXX_VERSION >= 40500 || __TBB_GLIBCXX_VERSION >= 40400 && __TBB_USE_OPTIONAL_RTTI)) )
350 
351 #define __TBB_CPP11_FUTURE_PRESENT (_MSC_VER >= 1700 || __TBB_GLIBCXX_VERSION >= 40600 && __GXX_EXPERIMENTAL_CXX0X__ || _LIBCPP_VERSION)
352 
353 #define __TBB_CPP11_GET_NEW_HANDLER_PRESENT (_MSC_VER >= 1900 || __TBB_GLIBCXX_VERSION >= 40900 && __GXX_EXPERIMENTAL_CXX0X__ || _LIBCPP_VERSION)
354 
355 #define __TBB_CPP17_UNCAUGHT_EXCEPTIONS_PRESENT (_MSC_VER >= 1900 || __GLIBCXX__ && __cpp_lib_uncaught_exceptions \
356  || _LIBCPP_VERSION >= 3700 && (!__TBB_MACOS_TARGET_VERSION || __TBB_MACOS_TARGET_VERSION >= 101200))
357 
358 // std::swap is in <utility> only since C++11, though MSVC had it at least since VS2005
359 #if _MSC_VER>=1400 || _LIBCPP_VERSION || __GXX_EXPERIMENTAL_CXX0X__
360 #define __TBB_STD_SWAP_HEADER <utility>
361 #else
362 #define __TBB_STD_SWAP_HEADER <algorithm>
363 #endif
364 
365 //TODO: not clear how exactly this macro affects exception_ptr - investigate
366 // On linux ICC fails to find existing std::exception_ptr in libstdc++ without this define
367 #if __INTEL_COMPILER && __GNUC__ && __TBB_EXCEPTION_PTR_PRESENT && !defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4)
368  #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1
369 #endif
370 
371 // Work around a bug in MinGW32
372 #if __MINGW32__ && __TBB_EXCEPTION_PTR_PRESENT && !defined(_GLIBCXX_ATOMIC_BUILTINS_4)
373  #define _GLIBCXX_ATOMIC_BUILTINS_4
374 #endif
375 
376 #if __GNUC__ || __SUNPRO_CC || __IBMCPP__
377  /* ICC defines __GNUC__ and so is covered */
378  #define __TBB_ATTRIBUTE_ALIGNED_PRESENT 1
379 #elif _MSC_VER && (_MSC_VER >= 1300 || __INTEL_COMPILER)
380  #define __TBB_DECLSPEC_ALIGN_PRESENT 1
381 #endif
382 
383 /* Actually ICC supports gcc __sync_* intrinsics starting 11.1,
384  * but 64 bit support for 32 bit target comes in later ones*/
385 /* TODO: change the version back to 4.1.2 once macro __TBB_WORD_SIZE become optional */
386 /* Assumed that all clang versions have these gcc compatible intrinsics. */
387 #if __TBB_GCC_VERSION >= 40306 || __INTEL_COMPILER >= 1200 || __clang__
388 
389  #define __TBB_GCC_BUILTIN_ATOMICS_PRESENT 1
390 #endif
391 
392 #if __TBB_GCC_VERSION >= 70000 && !__INTEL_COMPILER && !__clang__
393  // After GCC7 there was possible reordering problem in generic atomic load/store operations.
394  // So always using builtins.
395  #define TBB_USE_GCC_BUILTINS 1
396 #endif
397 
398 #if __INTEL_COMPILER >= 1200
399 
400  #define __TBB_ICC_BUILTIN_ATOMICS_PRESENT 1
401 #endif
402 
403 #if _MSC_VER>=1600 && (!__INTEL_COMPILER || __INTEL_COMPILER>=1310)
404  #define __TBB_MSVC_PART_WORD_INTERLOCKED_INTRINSICS_PRESENT 1
405 #endif
406 
407 #define __TBB_TSX_INTRINSICS_PRESENT ((__RTM__ || _MSC_VER>=1700 || __INTEL_COMPILER>=1300) && !__TBB_DEFINE_MIC && !__ANDROID__)
408 
410 #define __TBB_CONCAT_AUX(A,B) A##B
411 // The additional level of indirection is needed to expand macros A and B (not to get the AB macro).
412 // See [cpp.subst] and [cpp.concat] for more details.
413 #define __TBB_CONCAT(A,B) __TBB_CONCAT_AUX(A,B)
414 // The IGNORED argument and comma are needed to always have 2 arguments (even when A is empty).
415 #define __TBB_IS_MACRO_EMPTY(A,IGNORED) __TBB_CONCAT_AUX(__TBB_MACRO_EMPTY,A)
416 #define __TBB_MACRO_EMPTY 1
417 
419 #ifndef TBB_USE_DEBUG
420 /*
421 There are four cases that are supported:
422  1. "_DEBUG is undefined" means "no debug";
423  2. "_DEBUG defined to something that is evaluated to 0" (including "garbage", as per [cpp.cond]) means "no debug";
424  3. "_DEBUG defined to something that is evaluated to a non-zero value" means "debug";
425  4. "_DEBUG defined to nothing (empty)" means "debug".
426 */
427 #ifdef _DEBUG
428 // Check if _DEBUG is empty.
429 #define __TBB_IS__DEBUG_EMPTY (__TBB_IS_MACRO_EMPTY(_DEBUG,IGNORED)==__TBB_MACRO_EMPTY)
430 #if __TBB_IS__DEBUG_EMPTY
431 #define TBB_USE_DEBUG 1
432 #else
433 #define TBB_USE_DEBUG _DEBUG
434 #endif /* __TBB_IS__DEBUG_EMPTY */
435 #else
436 #define TBB_USE_DEBUG 0
437 #endif
438 #endif /* TBB_USE_DEBUG */
439 
440 #ifndef TBB_USE_ASSERT
441 #define TBB_USE_ASSERT TBB_USE_DEBUG
442 #endif /* TBB_USE_ASSERT */
443 
444 #ifndef TBB_USE_THREADING_TOOLS
445 #define TBB_USE_THREADING_TOOLS TBB_USE_DEBUG
446 #endif /* TBB_USE_THREADING_TOOLS */
447 
448 #ifndef TBB_USE_PERFORMANCE_WARNINGS
449 #ifdef TBB_PERFORMANCE_WARNINGS
450 #define TBB_USE_PERFORMANCE_WARNINGS TBB_PERFORMANCE_WARNINGS
451 #else
452 #define TBB_USE_PERFORMANCE_WARNINGS TBB_USE_DEBUG
453 #endif /* TBB_PERFORMANCE_WARNINGS */
454 #endif /* TBB_USE_PERFORMANCE_WARNINGS */
455 
456 #if __TBB_DEFINE_MIC
457  #if TBB_USE_EXCEPTIONS
458  #error The platform does not properly support exception handling. Please do not set TBB_USE_EXCEPTIONS macro or set it to 0.
459  #elif !defined(TBB_USE_EXCEPTIONS)
460  #define TBB_USE_EXCEPTIONS 0
461  #endif
462 #elif !(__EXCEPTIONS || defined(_CPPUNWIND) || __SUNPRO_CC)
463  #if TBB_USE_EXCEPTIONS
464  #error Compilation settings do not support exception handling. Please do not set TBB_USE_EXCEPTIONS macro or set it to 0.
465  #elif !defined(TBB_USE_EXCEPTIONS)
466  #define TBB_USE_EXCEPTIONS 0
467  #endif
468 #elif !defined(TBB_USE_EXCEPTIONS)
469  #define TBB_USE_EXCEPTIONS 1
470 #endif
471 
472 #ifndef TBB_IMPLEMENT_CPP0X
473 
474  #if __clang__
475  /* Old versions of Intel C++ Compiler do not have __has_include or cannot use it in #define */
476  #if (__INTEL_COMPILER && (__INTEL_COMPILER < 1500 || __INTEL_COMPILER == 1500 && __INTEL_COMPILER_UPDATE <= 1))
477  #define TBB_IMPLEMENT_CPP0X (__cplusplus < 201103L || !_LIBCPP_VERSION)
478  #else
479  #define TBB_IMPLEMENT_CPP0X (__cplusplus < 201103L || (!__has_include(<thread>) && !__has_include(<condition_variable>)))
480  #endif
481  #elif __GNUC__
482  #define TBB_IMPLEMENT_CPP0X (__TBB_GCC_VERSION < 40400 || !__GXX_EXPERIMENTAL_CXX0X__)
483  #elif _MSC_VER
484  #define TBB_IMPLEMENT_CPP0X (_MSC_VER < 1700)
485  #else
486  // TODO: Reconsider general approach to be more reliable, e.g. (!(__cplusplus >= 201103L && __ STDC_HOSTED__))
487  #define TBB_IMPLEMENT_CPP0X (!__STDCPP_THREADS__)
488  #endif
489 #endif /* TBB_IMPLEMENT_CPP0X */
490 
491 /* TBB_USE_CAPTURED_EXCEPTION should be explicitly set to either 0 or 1, as it is used as C++ const */
492 #ifndef TBB_USE_CAPTURED_EXCEPTION
493 
494  #if __TBB_EXCEPTION_PTR_PRESENT && !defined(__ia64__)
495  #define TBB_USE_CAPTURED_EXCEPTION 0
496  #else
497  #define TBB_USE_CAPTURED_EXCEPTION 1
498  #endif
499 #else /* defined TBB_USE_CAPTURED_EXCEPTION */
500  #if !TBB_USE_CAPTURED_EXCEPTION && !__TBB_EXCEPTION_PTR_PRESENT
501  #error Current runtime does not support std::exception_ptr. Set TBB_USE_CAPTURED_EXCEPTION and make sure that your code is ready to catch tbb::captured_exception.
502  #endif
503 #endif /* defined TBB_USE_CAPTURED_EXCEPTION */
504 
506 #if TBB_USE_GCC_BUILTINS && !__TBB_GCC_BUILTIN_ATOMICS_PRESENT
507  #error "GCC atomic built-ins are not supported."
508 #endif
509 
513 #ifndef __TBB_WEAK_SYMBOLS_PRESENT
514 #define __TBB_WEAK_SYMBOLS_PRESENT ( !_WIN32 && !__APPLE__ && !__sun && (__TBB_GCC_VERSION >= 40000 || __INTEL_COMPILER ) )
515 #endif
516 
518 #ifndef __TBB_DYNAMIC_LOAD_ENABLED
519  #define __TBB_DYNAMIC_LOAD_ENABLED 1
520 #endif
521 
525 #if (_WIN32||_WIN64) && (__TBB_SOURCE_DIRECTLY_INCLUDED || TBB_USE_PREVIEW_BINARY)
526  #define __TBB_NO_IMPLICIT_LINKAGE 1
527  #define __TBBMALLOC_NO_IMPLICIT_LINKAGE 1
528 #endif
529 
530 #ifndef __TBB_COUNT_TASK_NODES
531  #define __TBB_COUNT_TASK_NODES TBB_USE_ASSERT
532 #endif
533 
534 #ifndef __TBB_TASK_GROUP_CONTEXT
535  #define __TBB_TASK_GROUP_CONTEXT 1
536 #endif /* __TBB_TASK_GROUP_CONTEXT */
537 
538 #ifndef __TBB_SCHEDULER_OBSERVER
539  #define __TBB_SCHEDULER_OBSERVER 1
540 #endif /* __TBB_SCHEDULER_OBSERVER */
541 
542 #ifndef __TBB_FP_CONTEXT
543  #define __TBB_FP_CONTEXT __TBB_TASK_GROUP_CONTEXT
544 #endif /* __TBB_FP_CONTEXT */
545 
546 #if __TBB_FP_CONTEXT && !__TBB_TASK_GROUP_CONTEXT
547  #error __TBB_FP_CONTEXT requires __TBB_TASK_GROUP_CONTEXT to be enabled
548 #endif
549 
550 #define __TBB_RECYCLE_TO_ENQUEUE __TBB_BUILD // keep non-official
551 
552 #ifndef __TBB_ARENA_OBSERVER
553  #define __TBB_ARENA_OBSERVER ((__TBB_BUILD||TBB_PREVIEW_LOCAL_OBSERVER)&& __TBB_SCHEDULER_OBSERVER)
554 #endif /* __TBB_ARENA_OBSERVER */
555 
556 #ifndef __TBB_SLEEP_PERMISSION
557  #define __TBB_SLEEP_PERMISSION ((__TBB_CPF_BUILD||TBB_PREVIEW_LOCAL_OBSERVER)&& __TBB_SCHEDULER_OBSERVER)
558 #endif /* __TBB_SLEEP_PERMISSION */
559 
560 #ifndef __TBB_TASK_ISOLATION
561  #define __TBB_TASK_ISOLATION 1
562 #endif /* __TBB_TASK_ISOLATION */
563 
564 #if TBB_USE_EXCEPTIONS && !__TBB_TASK_GROUP_CONTEXT
565  #error TBB_USE_EXCEPTIONS requires __TBB_TASK_GROUP_CONTEXT to be enabled
566 #endif
567 
568 #ifndef __TBB_TASK_PRIORITY
569  #define __TBB_TASK_PRIORITY (__TBB_TASK_GROUP_CONTEXT)
570 #endif /* __TBB_TASK_PRIORITY */
571 
572 #if __TBB_TASK_PRIORITY && !__TBB_TASK_GROUP_CONTEXT
573  #error __TBB_TASK_PRIORITY requires __TBB_TASK_GROUP_CONTEXT to be enabled
574 #endif
575 
576 #if TBB_PREVIEW_WAITING_FOR_WORKERS || __TBB_BUILD
577  #define __TBB_SUPPORTS_WORKERS_WAITING_IN_TERMINATE 1
578 #endif
579 
580 #ifndef __TBB_ENQUEUE_ENFORCED_CONCURRENCY
581  #define __TBB_ENQUEUE_ENFORCED_CONCURRENCY 1
582 #endif
583 
584 #if !defined(__TBB_SURVIVE_THREAD_SWITCH) && \
585  (_WIN32 || _WIN64 || __APPLE__ || (__linux__ && !__ANDROID__))
586  #define __TBB_SURVIVE_THREAD_SWITCH 1
587 #endif /* __TBB_SURVIVE_THREAD_SWITCH */
588 
589 #ifndef __TBB_DEFAULT_PARTITIONER
590 #define __TBB_DEFAULT_PARTITIONER tbb::auto_partitioner
591 #endif
592 
593 #ifndef __TBB_USE_PROPORTIONAL_SPLIT_IN_BLOCKED_RANGES
594 #define __TBB_USE_PROPORTIONAL_SPLIT_IN_BLOCKED_RANGES 1
595 #endif
596 
597 #ifndef __TBB_ENABLE_RANGE_FEEDBACK
598 #define __TBB_ENABLE_RANGE_FEEDBACK 0
599 #endif
600 
601 #ifdef _VARIADIC_MAX
602  #define __TBB_VARIADIC_MAX _VARIADIC_MAX
603 #else
604  #if _MSC_VER == 1700
605  #define __TBB_VARIADIC_MAX 5 // VS11 setting, issue resolved in VS12
606  #elif _MSC_VER == 1600
607  #define __TBB_VARIADIC_MAX 10 // VS10 setting
608  #else
609  #define __TBB_VARIADIC_MAX 15
610  #endif
611 #endif
612 
615 #if defined(WINAPI_FAMILY) && WINAPI_FAMILY == WINAPI_FAMILY_APP
616  #define __TBB_WIN8UI_SUPPORT 1
617 #else
618  #define __TBB_WIN8UI_SUPPORT 0
619 #endif
620 
627 #if __SIZEOF_POINTER__ < 8 && __ANDROID__ && __TBB_GCC_VERSION <= 40403 && !__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8
628 
631  #define __TBB_GCC_64BIT_ATOMIC_BUILTINS_BROKEN 1
632 #elif __TBB_x86_32 && __TBB_GCC_VERSION == 40102 && ! __GNUC_RH_RELEASE__
633 
636  #define __TBB_GCC_64BIT_ATOMIC_BUILTINS_BROKEN 1
637 #endif
638 
639 #if __GNUC__ && __TBB_x86_64 && __INTEL_COMPILER == 1200
640  #define __TBB_ICC_12_0_INL_ASM_FSTCW_BROKEN 1
641 #endif
642 
643 #if _MSC_VER && __INTEL_COMPILER && (__INTEL_COMPILER<1110 || __INTEL_COMPILER==1110 && __INTEL_COMPILER_BUILD_DATE < 20091012)
644 
647  #define __TBB_DEFAULT_DTOR_THROW_SPEC_BROKEN 1
648 #endif
649 
650 #if !__INTEL_COMPILER && (_MSC_VER && _MSC_VER < 1500 || __GNUC__ && __TBB_GCC_VERSION < 40102)
651 
653  #define __TBB_TEMPLATE_FRIENDS_BROKEN 1
654 #endif
655 
656 #if __GLIBC__==2 && __GLIBC_MINOR__==3 || (__APPLE__ && ( __INTEL_COMPILER==1200 && !TBB_USE_DEBUG))
657 
659  #define __TBB_THROW_ACROSS_MODULE_BOUNDARY_BROKEN 1
660 #endif
661 
662 #if (_WIN32||_WIN64) && __INTEL_COMPILER == 1110
663 
664  #define __TBB_ICL_11_1_CODE_GEN_BROKEN 1
665 #endif
666 
667 #if __clang__ || (__GNUC__==3 && __GNUC_MINOR__==3 && !defined(__INTEL_COMPILER))
668 
669  #define __TBB_PROTECTED_NESTED_CLASS_BROKEN 1
670 #endif
671 
672 #if __MINGW32__ && __TBB_GCC_VERSION < 40200
673 
675  #define __TBB_SSE_STACK_ALIGNMENT_BROKEN 1
676 #endif
677 
678 #if __TBB_GCC_VERSION==40300 && !__INTEL_COMPILER && !__clang__
679  /* GCC of this version may rashly ignore control dependencies */
680  #define __TBB_GCC_OPTIMIZER_ORDERING_BROKEN 1
681 #endif
682 
683 #if __FreeBSD__
684 
686  #define __TBB_PRIO_INHERIT_BROKEN 1
687 
690  #define __TBB_PLACEMENT_NEW_EXCEPTION_SAFETY_BROKEN 1
691 #endif /* __FreeBSD__ */
692 
693 #if (__linux__ || __APPLE__) && __i386__ && defined(__INTEL_COMPILER)
694 
696  #define __TBB_ICC_ASM_VOLATILE_BROKEN 1
697 #endif
698 
699 #if !__INTEL_COMPILER && (_MSC_VER && _MSC_VER < 1700 || __GNUC__==3 && __GNUC_MINOR__<=2)
700 
702  #define __TBB_ALIGNOF_NOT_INSTANTIATED_TYPES_BROKEN 1
703 #endif
704 
705 #if __TBB_DEFINE_MIC
706 
707  #define __TBB_MAIN_THREAD_AFFINITY_BROKEN 1
708 #endif
709 
710 #if __GXX_EXPERIMENTAL_CXX0X__ && !defined(__EXCEPTIONS) && \
711  ((!__INTEL_COMPILER && !__clang__ && (__TBB_GCC_VERSION>=40400 && __TBB_GCC_VERSION<40600)) || \
712  (__INTEL_COMPILER<=1400 && (__TBB_GLIBCXX_VERSION>=40400 && __TBB_GLIBCXX_VERSION<=40801)))
713 /* There is an issue for specific GCC toolchain when C++11 is enabled
714  and exceptions are disabled:
715  exceprion_ptr.h/nested_exception.h use throw unconditionally.
716  GCC can ignore 'throw' since 4.6; but with ICC the issue still exists.
717  */
718  #define __TBB_LIBSTDCPP_EXCEPTION_HEADERS_BROKEN 1
719 #endif
720 
721 #if __INTEL_COMPILER==1300 && __TBB_GLIBCXX_VERSION>=40700 && defined(__GXX_EXPERIMENTAL_CXX0X__)
722 /* Some C++11 features used inside libstdc++ are not supported by Intel C++ Compiler. */
723  #define __TBB_ICC_13_0_CPP11_STDLIB_SUPPORT_BROKEN 1
724 #endif
725 
726 #if (__GNUC__==4 && __GNUC_MINOR__==4 ) && !defined(__INTEL_COMPILER) && !defined(__clang__)
727 
728  #define __TBB_GCC_STRICT_ALIASING_BROKEN 1
729  /* topical remedy: #pragma GCC diagnostic ignored "-Wstrict-aliasing" */
730  #if !__TBB_GCC_WARNING_SUPPRESSION_PRESENT
731  #error Warning suppression is not supported, while should.
732  #endif
733 #endif
734 
735 /* In a PIC mode some versions of GCC 4.1.2 generate incorrect inlined code for 8 byte __sync_val_compare_and_swap intrinsic */
736 #if __TBB_GCC_VERSION == 40102 && __PIC__ && !defined(__INTEL_COMPILER) && !defined(__clang__)
737  #define __TBB_GCC_CAS8_BUILTIN_INLINING_BROKEN 1
738 #endif
739 
740 #if __TBB_x86_32 && ( __INTEL_COMPILER || (__GNUC__==5 && __GNUC_MINOR__>=2 && __GXX_EXPERIMENTAL_CXX0X__) \
741  || (__GNUC__==3 && __GNUC_MINOR__==3) || (__MINGW32__ && __GNUC__==4 && __GNUC_MINOR__==5) || __SUNPRO_CC )
742  // Some compilers for IA-32 architecture fail to provide 8-byte alignment of objects on the stack,
743  // even if the object specifies 8-byte alignment. On such platforms, the implementation
744  // of 64 bit atomics for IA-32 architecture (e.g. atomic<long long>) use different tactics
745  // depending upon whether the object is properly aligned or not.
746  #define __TBB_FORCE_64BIT_ALIGNMENT_BROKEN 1
747 #else
748  // Define to 0 explicitly because the macro is used in a compiled code of test_atomic
749  #define __TBB_FORCE_64BIT_ALIGNMENT_BROKEN 0
750 #endif
751 
752 #if __GNUC__ && !__INTEL_COMPILER && !__clang__ && __TBB_DEFAULTED_AND_DELETED_FUNC_PRESENT && __TBB_GCC_VERSION < 40700
753  #define __TBB_ZERO_INIT_WITH_DEFAULTED_CTOR_BROKEN 1
754 #endif
755 
756 #if _MSC_VER && _MSC_VER <= 1800 && !__INTEL_COMPILER
757  // With MSVC, when an array is passed by const reference to a template function,
758  // constness from the function parameter may get propagated to the template parameter.
759  #define __TBB_CONST_REF_TO_ARRAY_TEMPLATE_PARAM_BROKEN 1
760 #endif
761 
762 // A compiler bug: a disabled copy constructor prevents use of the moving constructor
763 #define __TBB_IF_NO_COPY_CTOR_MOVE_SEMANTICS_BROKEN (_MSC_VER && (__INTEL_COMPILER >= 1300 && __INTEL_COMPILER <= 1310) && !__INTEL_CXX11_MODE__)
764 
765 #define __TBB_CPP11_DECLVAL_BROKEN (_MSC_VER == 1600 || (__GNUC__ && __TBB_GCC_VERSION < 40500) )
766 // Intel C++ Compiler has difficulties with copying std::pair with VC11 std::reference_wrapper being a const member
767 #define __TBB_COPY_FROM_NON_CONST_REF_BROKEN (_MSC_VER == 1700 && __INTEL_COMPILER && __INTEL_COMPILER < 1600)
768 
769 // The implicit upcasting of the tuple of a reference of a derived class to a base class fails on icc 13.X if the system's gcc environment is 4.8
770 // Also in gcc 4.4 standard library the implementation of the tuple<&> conversion (tuple<A&> a = tuple<B&>, B is inherited from A) is broken.
771 #if __GXX_EXPERIMENTAL_CXX0X__ && __GLIBCXX__ && ((__INTEL_COMPILER >=1300 && __INTEL_COMPILER <=1310 && __TBB_GLIBCXX_VERSION>=40700) || (__TBB_GLIBCXX_VERSION < 40500))
772 #define __TBB_UPCAST_OF_TUPLE_OF_REF_BROKEN 1
773 #endif
774 
775 // In some cases decltype of a function adds a reference to a return type.
776 #define __TBB_CPP11_DECLTYPE_OF_FUNCTION_RETURN_TYPE_BROKEN (_MSC_VER == 1600 && !__INTEL_COMPILER)
777 
780 #if defined(_MSC_VER) && _MSC_VER>=1500 && !defined(__INTEL_COMPILER)
781  // A macro to suppress erroneous or benign "unreachable code" MSVC warning (4702)
782  #define __TBB_MSVC_UNREACHABLE_CODE_IGNORED 1
783 #endif
784 
785 #define __TBB_ATOMIC_CTORS (__TBB_CONSTEXPR_PRESENT && __TBB_DEFAULTED_AND_DELETED_FUNC_PRESENT && (!__TBB_ZERO_INIT_WITH_DEFAULTED_CTOR_BROKEN))
786 
787 // Many OS versions (Android 4.0.[0-3] for example) need workaround for dlopen to avoid non-recursive loader lock hang
788 // Setting the workaround for all compile targets ($APP_PLATFORM) below Android 4.4 (android-19)
789 #if __ANDROID__
790 #include <android/api-level.h>
791 #define __TBB_USE_DLOPEN_REENTRANCY_WORKAROUND (__ANDROID_API__ < 19)
792 #endif
793 
794 #define __TBB_ALLOCATOR_CONSTRUCT_VARIADIC (__TBB_CPP11_VARIADIC_TEMPLATES_PRESENT && __TBB_CPP11_RVALUE_REF_PRESENT)
795 
796 #define __TBB_VARIADIC_PARALLEL_INVOKE (TBB_PREVIEW_VARIADIC_PARALLEL_INVOKE && __TBB_CPP11_VARIADIC_TEMPLATES_PRESENT && __TBB_CPP11_RVALUE_REF_PRESENT)
797 #define __TBB_FLOW_GRAPH_CPP11_FEATURES (__TBB_CPP11_VARIADIC_TEMPLATES_PRESENT \
798  && __TBB_CPP11_SMART_POINTERS_PRESENT && __TBB_CPP11_RVALUE_REF_PRESENT && __TBB_CPP11_AUTO_PRESENT) \
799  && __TBB_CPP11_VARIADIC_TUPLE_PRESENT && __TBB_CPP11_DEFAULT_FUNC_TEMPLATE_ARGS_PRESENT \
800  && !__TBB_UPCAST_OF_TUPLE_OF_REF_BROKEN
801 #define __TBB_PREVIEW_STREAMING_NODE (__TBB_CPP11_VARIADIC_FIXED_LENGTH_EXP_PRESENT && __TBB_FLOW_GRAPH_CPP11_FEATURES \
802  && TBB_PREVIEW_FLOW_GRAPH_NODES && !TBB_IMPLEMENT_CPP0X && !__TBB_UPCAST_OF_TUPLE_OF_REF_BROKEN)
803 #define __TBB_PREVIEW_OPENCL_NODE (__TBB_PREVIEW_STREAMING_NODE && __TBB_CPP11_TEMPLATE_ALIASES_PRESENT)
804 #define __TBB_PREVIEW_MESSAGE_BASED_KEY_MATCHING (TBB_PREVIEW_FLOW_GRAPH_FEATURES || __TBB_PREVIEW_OPENCL_NODE)
805 #define __TBB_PREVIEW_ASYNC_MSG (TBB_PREVIEW_FLOW_GRAPH_FEATURES && __TBB_FLOW_GRAPH_CPP11_FEATURES)
806 
807 #define __TBB_PREVIEW_GFX_FACTORY (__TBB_GFX_PRESENT && TBB_PREVIEW_FLOW_GRAPH_FEATURES && !__TBB_MIC_OFFLOAD \
808  && __TBB_FLOW_GRAPH_CPP11_FEATURES && __TBB_CPP11_TEMPLATE_ALIASES_PRESENT \
809  && __TBB_CPP11_FUTURE_PRESENT)
810 
811 #endif /* __TBB_tbb_config_H */

Copyright © 2005-2018 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its subsidiaries in the United States and other countries.

* Other names and brands may be claimed as the property of others.