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
00096 #if !defined(__EXCEPTIONS) && !defined(_CPPUNWIND) && !defined(__SUNPRO_CC) || defined(_XBOX)
00097 #if TBB_USE_EXCEPTIONS
00098 #error Compilation settings do not support exception handling. Please do not set TBB_USE_EXCEPTIONS macro or set it to 0.
00099 #elif !defined(TBB_USE_EXCEPTIONS)
00100 #define TBB_USE_EXCEPTIONS 0
00101 #endif
00102 #elif !defined(TBB_USE_EXCEPTIONS)
00103 #define TBB_USE_EXCEPTIONS 1
00104 #endif
00105
00106 #ifndef TBB_IMPLEMENT_CPP0X
00107
00108 #if __GNUC__==4 && __GNUC_MINOR__>=4 && __GXX_EXPERIMENTAL_CXX0X__
00109 #define TBB_IMPLEMENT_CPP0X 0
00110 #else
00111 #define TBB_IMPLEMENT_CPP0X 1
00112 #endif
00113 #endif
00114
00115 #ifndef TBB_USE_CAPTURED_EXCEPTION
00116 #if __TBB_EXCEPTION_PTR_PRESENT
00117 #define TBB_USE_CAPTURED_EXCEPTION 0
00118 #else
00119 #define TBB_USE_CAPTURED_EXCEPTION 1
00120 #endif
00121 #else
00122 #if !TBB_USE_CAPTURED_EXCEPTION && !__TBB_EXCEPTION_PTR_PRESENT
00123 #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.
00124 #endif
00125 #endif
00126
00128 #if (TBB_USE_GCC_BUILTINS && !__TBB_GCC_BUILTIN_ATOMICS_PRESENT)
00129 #error "GCC atomic built-ins are not supported."
00130 #endif
00131
00134 #ifndef __TBB_DYNAMIC_LOAD_ENABLED
00135 #define __TBB_DYNAMIC_LOAD_ENABLED !__TBB_TASK_CPP_DIRECTLY_INCLUDED
00136 #elif !__TBB_DYNAMIC_LOAD_ENABLED
00137 #if _WIN32||_WIN64
00138 #define __TBB_NO_IMPLICIT_LINKAGE 1
00139 #define __TBBMALLOC_NO_IMPLICIT_LINKAGE 1
00140 #else
00141 #define __TBB_WEAK_SYMBOLS 1
00142 #endif
00143 #endif
00144
00145 #ifndef __TBB_COUNT_TASK_NODES
00146 #define __TBB_COUNT_TASK_NODES TBB_USE_ASSERT
00147 #endif
00148
00149 #ifndef __TBB_TASK_GROUP_CONTEXT
00150 #define __TBB_TASK_GROUP_CONTEXT 1
00151 #endif
00152
00153 #if TBB_USE_EXCEPTIONS && !__TBB_TASK_GROUP_CONTEXT
00154 #error TBB_USE_EXCEPTIONS requires __TBB_TASK_GROUP_CONTEXT to be enabled
00155 #endif
00156
00157 #ifndef __TBB_SCHEDULER_OBSERVER
00158 #define __TBB_SCHEDULER_OBSERVER 1
00159 #endif
00160
00161 #ifndef __TBB_TASK_PRIORITY
00162 #define __TBB_TASK_PRIORITY __TBB_TASK_GROUP_CONTEXT
00163 #endif
00164
00165 #if __TBB_TASK_PRIORITY && !__TBB_TASK_GROUP_CONTEXT
00166 #error __TBB_TASK_PRIORITY requires __TBB_TASK_GROUP_CONTEXT to be enabled
00167 #endif
00168
00169 #if !defined(__TBB_SURVIVE_THREAD_SWITCH) && (_WIN32 || _WIN64 || __linux__)
00170 #define __TBB_SURVIVE_THREAD_SWITCH 1
00171 #endif
00172
00173 #ifndef __TBB_DEFAULT_PARTITIONER
00174 #if TBB_DEPRECATED
00175
00176 #define __TBB_DEFAULT_PARTITIONER tbb::simple_partitioner
00177 #else
00178
00179 #define __TBB_DEFAULT_PARTITIONER tbb::auto_partitioner
00180 #endif
00181 #endif
00182
00189 #if __GNUC__ && __TBB_x86_64 && __INTEL_COMPILER == 1200
00190 #define __TBB_ICC_12_0_INL_ASM_FSTCW_BROKEN 1
00191 #endif
00192
00193 #if _MSC_VER && __INTEL_COMPILER && (__INTEL_COMPILER<1110 || __INTEL_COMPILER==1110 && __INTEL_COMPILER_BUILD_DATE < 20091012)
00194
00197 #define __TBB_DEFAULT_DTOR_THROW_SPEC_BROKEN 1
00198 #endif
00199
00200 #if defined(_MSC_VER) && _MSC_VER < 1500 && !defined(__INTEL_COMPILER)
00201
00203 #define __TBB_TEMPLATE_FRIENDS_BROKEN 1
00204 #endif
00205
00206 #if __GLIBC__==2 && __GLIBC_MINOR__==3 || __MINGW32__ || (__APPLE__ && __INTEL_COMPILER==1200 && !TBB_USE_DEBUG)
00208
00209 #define __TBB_THROW_ACROSS_MODULE_BOUNDARY_BROKEN 1
00210 #endif
00211
00212 #if (_WIN32||_WIN64) && __INTEL_COMPILER == 1110
00213
00214 #define __TBB_ICL_11_1_CODE_GEN_BROKEN 1
00215 #endif
00216
00217 #if __GNUC__==3 && __GNUC_MINOR__==3 && !defined(__INTEL_COMPILER)
00218
00219 #define __TBB_GCC_3_3_PROTECTED_BROKEN 1
00220 #endif
00221
00222 #if __MINGW32__ && (__GNUC__<4 || __GNUC__==4 && __GNUC_MINOR__<2)
00223
00225 #define __TBB_SSE_STACK_ALIGNMENT_BROKEN 1
00226 #endif
00227
00228 #if __GNUC__==4 && __GNUC_MINOR__==3 && __GNUC_PATCHLEVEL__==0
00229
00230 #define __TBB_GCC_OPTIMIZER_ORDERING_BROKEN 1
00231 #endif
00232
00233 #if __FreeBSD__
00234
00236 #define __TBB_PRIO_INHERIT_BROKEN 1
00237
00240 #define __TBB_PLACEMENT_NEW_EXCEPTION_SAFETY_BROKEN 1
00241 #endif
00242
00243 #if (__linux__ || __APPLE__) && __i386__ && defined(__INTEL_COMPILER)
00244
00246 #define __TBB_ICC_ASM_VOLATILE_BROKEN 1
00247 #endif
00248
00249 #if !__INTEL_COMPILER && (_MSC_VER || __GNUC__==3 && __GNUC_MINOR__<=2)
00250
00252 #define __TBB_ALIGNOF_NOT_INSTANTIATED_TYPES_BROKEN 1
00253 #endif
00254
00255 #endif