00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef __TBB_tbb_config_H
00022 #define __TBB_tbb_config_H
00023
00032 #define __TBB_GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
00033
00036 #if (__TBB_GCC_VERSION >= 40400) && !defined(__INTEL_COMPILER)
00037
00038 #define __TBB_GCC_WARNING_SUPPRESSION_PRESENT 1
00039 #endif
00040
00041
00042
00043 #define __TBB_EXCEPTION_PTR_PRESENT ((_MSC_VER >= 1600 || (__GXX_EXPERIMENTAL_CXX0X__ && __GNUC__==4 && __GNUC_MINOR__>=4)) && !__INTEL_COMPILER)
00044
00045 #if __GNUC__ || __SUNPRO_CC || __IBMCPP__
00046
00047 #define __TBB_ATTRIBUTE_ALIGNED_PRESENT 1
00048 #elif _MSC_VER && (_MSC_VER >= 1300 || __INTEL_COMPILER)
00049 #define __TBB_DECLSPEC_ALIGN_PRESENT 1
00050 #endif
00051
00052 #if (__TBB_GCC_VERSION >= 40102) && !defined(__INTEL_COMPILER)
00053
00054 #define __TBB_GCC_BUILTIN_ATOMICS_PRESENT 1
00055 #endif
00056
00059 #ifndef TBB_USE_DEBUG
00060 #ifdef TBB_DO_ASSERT
00061 #define TBB_USE_DEBUG TBB_DO_ASSERT
00062 #else
00063 #ifdef _DEBUG
00064 #define TBB_USE_DEBUG _DEBUG
00065 #else
00066 #define TBB_USE_DEBUG 0
00067 #endif
00068 #endif
00069 #endif
00070
00071 #ifndef TBB_USE_ASSERT
00072 #ifdef TBB_DO_ASSERT
00073 #define TBB_USE_ASSERT TBB_DO_ASSERT
00074 #else
00075 #define TBB_USE_ASSERT TBB_USE_DEBUG
00076 #endif
00077 #endif
00078
00079 #ifndef TBB_USE_THREADING_TOOLS
00080 #ifdef TBB_DO_THREADING_TOOLS
00081 #define TBB_USE_THREADING_TOOLS TBB_DO_THREADING_TOOLS
00082 #else
00083 #define TBB_USE_THREADING_TOOLS TBB_USE_DEBUG
00084 #endif
00085 #endif
00086
00087 #ifndef TBB_USE_PERFORMANCE_WARNINGS
00088 #ifdef TBB_PERFORMANCE_WARNINGS
00089 #define TBB_USE_PERFORMANCE_WARNINGS TBB_PERFORMANCE_WARNINGS
00090 #else
00091 #define TBB_USE_PERFORMANCE_WARNINGS TBB_USE_DEBUG
00092 #endif
00093 #endif
00094
00095 #if !defined(__EXCEPTIONS) && !defined(_CPPUNWIND) && !defined(__SUNPRO_CC) || defined(_XBOX)
00096 #if TBB_USE_EXCEPTIONS
00097 #error Compilation settings do not support exception handling. Please do not set TBB_USE_EXCEPTIONS macro or set it to 0.
00098 #elif !defined(TBB_USE_EXCEPTIONS)
00099 #define TBB_USE_EXCEPTIONS 0
00100 #endif
00101 #elif !defined(TBB_USE_EXCEPTIONS)
00102 #define TBB_USE_EXCEPTIONS 1
00103 #endif
00104
00105 #ifndef TBB_IMPLEMENT_CPP0X
00106
00107 #if __GNUC__==4 && __GNUC_MINOR__>=4 && __GXX_EXPERIMENTAL_CXX0X__
00108 #define TBB_IMPLEMENT_CPP0X 0
00109 #else
00110 #define TBB_IMPLEMENT_CPP0X 1
00111 #endif
00112 #endif
00113
00114 #ifndef TBB_USE_CAPTURED_EXCEPTION
00115 #if __TBB_EXCEPTION_PTR_PRESENT
00116 #define TBB_USE_CAPTURED_EXCEPTION 0
00117 #else
00118 #define TBB_USE_CAPTURED_EXCEPTION 1
00119 #endif
00120 #else
00121 #if !TBB_USE_CAPTURED_EXCEPTION && !__TBB_EXCEPTION_PTR_PRESENT
00122 #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.
00123 #endif
00124 #endif
00125
00127 #if (TBB_USE_GCC_BUILTINS && !__TBB_GCC_BUILTIN_ATOMICS_PRESENT)
00128 #error "GCC atomic built-ins are not supported."
00129 #endif
00130
00133 #ifndef __TBB_DYNAMIC_LOAD_ENABLED
00134 #define __TBB_DYNAMIC_LOAD_ENABLED !__TBB_TASK_CPP_DIRECTLY_INCLUDED
00135 #elif !__TBB_DYNAMIC_LOAD_ENABLED
00136 #if _WIN32||_WIN64
00137 #define __TBB_NO_IMPLICIT_LINKAGE 1
00138 #define __TBBMALLOC_NO_IMPLICIT_LINKAGE 1
00139 #else
00140 #define __TBB_WEAK_SYMBOLS 1
00141 #endif
00142 #endif
00143
00144 #ifndef __TBB_COUNT_TASK_NODES
00145 #define __TBB_COUNT_TASK_NODES TBB_USE_ASSERT
00146 #endif
00147
00148 #ifndef __TBB_TASK_GROUP_CONTEXT
00149 #define __TBB_TASK_GROUP_CONTEXT 1
00150 #endif
00151
00152 #if TBB_USE_EXCEPTIONS && !__TBB_TASK_GROUP_CONTEXT
00153 #error TBB_USE_EXCEPTIONS requires __TBB_TASK_GROUP_CONTEXT to be enabled
00154 #endif
00155
00156 #ifndef __TBB_SCHEDULER_OBSERVER
00157 #define __TBB_SCHEDULER_OBSERVER 1
00158 #endif
00159
00160 #ifndef __TBB_TASK_PRIORITY
00161 #define __TBB_TASK_PRIORITY __TBB_TASK_GROUP_CONTEXT
00162 #endif
00163
00164 #if __TBB_TASK_PRIORITY && !__TBB_TASK_GROUP_CONTEXT
00165 #error __TBB_TASK_PRIORITY requires __TBB_TASK_GROUP_CONTEXT to be enabled
00166 #endif
00167
00168 #if !defined(__TBB_SURVIVE_THREAD_SWITCH) && (_WIN32 || _WIN64 || __linux__)
00169 #define __TBB_SURVIVE_THREAD_SWITCH 1
00170 #endif
00171
00172 #ifndef __TBB_DEFAULT_PARTITIONER
00173 #if TBB_DEPRECATED
00174
00175 #define __TBB_DEFAULT_PARTITIONER tbb::simple_partitioner
00176 #else
00177
00178 #define __TBB_DEFAULT_PARTITIONER tbb::auto_partitioner
00179 #endif
00180 #endif
00181
00188 #if __GNUC__ && __TBB_x86_64 && __INTEL_COMPILER == 1200
00189 #define __TBB_ICC_12_0_INL_ASM_FSTCW_BROKEN 1
00190 #endif
00191
00192 #if _MSC_VER && __INTEL_COMPILER && (__INTEL_COMPILER<1110 || __INTEL_COMPILER==1110 && __INTEL_COMPILER_BUILD_DATE < 20091012)
00193
00196 #define __TBB_DEFAULT_DTOR_THROW_SPEC_BROKEN 1
00197 #endif
00198
00199 #if defined(_MSC_VER) && _MSC_VER < 1500 && !defined(__INTEL_COMPILER)
00200
00202 #define __TBB_TEMPLATE_FRIENDS_BROKEN 1
00203 #endif
00204
00205 #if __GLIBC__==2 && __GLIBC_MINOR__==3 || __MINGW32__ || (__APPLE__ && __INTEL_COMPILER==1200 && !TBB_USE_DEBUG)
00207
00208 #define __TBB_THROW_ACROSS_MODULE_BOUNDARY_BROKEN 1
00209 #endif
00210
00211 #if (_WIN32||_WIN64) && __INTEL_COMPILER == 1110
00212
00213 #define __TBB_ICL_11_1_CODE_GEN_BROKEN 1
00214 #endif
00215
00216 #if __GNUC__==3 && __GNUC_MINOR__==3 && !defined(__INTEL_COMPILER)
00217
00218 #define __TBB_GCC_3_3_PROTECTED_BROKEN 1
00219 #endif
00220
00221 #if __MINGW32__ && (__GNUC__<4 || __GNUC__==4 && __GNUC_MINOR__<2)
00222
00224 #define __TBB_SSE_STACK_ALIGNMENT_BROKEN 1
00225 #endif
00226
00227 #if __GNUC__==4 && __GNUC_MINOR__==3 && __GNUC_PATCHLEVEL__==0
00228
00229 #define __TBB_GCC_OPTIMIZER_ORDERING_BROKEN 1
00230 #endif
00231
00232 #if __FreeBSD__
00233
00235 #define __TBB_PRIO_INHERIT_BROKEN 1
00236
00239 #define __TBB_PLACEMENT_NEW_EXCEPTION_SAFETY_BROKEN 1
00240 #endif
00241
00242 #if (__linux__ || __APPLE__) && __i386__ && defined(__INTEL_COMPILER)
00243
00245 #define __TBB_ICC_ASM_VOLATILE_BROKEN 1
00246 #endif
00247
00248 #if !__INTEL_COMPILER && (_MSC_VER || __GNUC__==3 && __GNUC_MINOR__<=2)
00249
00251 #define __TBB_ALIGNOF_NOT_INSTANTIATED_TYPES_BROKEN 1
00252 #endif
00253
00254 #endif