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
00053 #if (__TBB_GCC_VERSION >= 40306) && !defined(__INTEL_COMPILER)
00054
00055 #define __TBB_GCC_BUILTIN_ATOMICS_PRESENT 1
00056 #endif
00057
00060 #ifndef TBB_USE_DEBUG
00061 #ifdef TBB_DO_ASSERT
00062 #define TBB_USE_DEBUG TBB_DO_ASSERT
00063 #else
00064 #ifdef _DEBUG
00065 #define TBB_USE_DEBUG _DEBUG
00066 #else
00067 #define TBB_USE_DEBUG 0
00068 #endif
00069 #endif
00070 #endif
00071
00072 #ifndef TBB_USE_ASSERT
00073 #ifdef TBB_DO_ASSERT
00074 #define TBB_USE_ASSERT TBB_DO_ASSERT
00075 #else
00076 #define TBB_USE_ASSERT TBB_USE_DEBUG
00077 #endif
00078 #endif
00079
00080 #ifndef TBB_USE_THREADING_TOOLS
00081 #ifdef TBB_DO_THREADING_TOOLS
00082 #define TBB_USE_THREADING_TOOLS TBB_DO_THREADING_TOOLS
00083 #else
00084 #define TBB_USE_THREADING_TOOLS TBB_USE_DEBUG
00085 #endif
00086 #endif
00087
00088 #ifndef TBB_USE_PERFORMANCE_WARNINGS
00089 #ifdef TBB_PERFORMANCE_WARNINGS
00090 #define TBB_USE_PERFORMANCE_WARNINGS TBB_PERFORMANCE_WARNINGS
00091 #else
00092 #define TBB_USE_PERFORMANCE_WARNINGS TBB_USE_DEBUG
00093 #endif
00094 #endif
00095
00096
00097 #if !defined(__EXCEPTIONS) && !defined(_CPPUNWIND) && !defined(__SUNPRO_CC) || defined(_XBOX)
00098 #if TBB_USE_EXCEPTIONS
00099 #error Compilation settings do not support exception handling. Please do not set TBB_USE_EXCEPTIONS macro or set it to 0.
00100 #elif !defined(TBB_USE_EXCEPTIONS)
00101 #define TBB_USE_EXCEPTIONS 0
00102 #endif
00103 #elif !defined(TBB_USE_EXCEPTIONS)
00104 #define TBB_USE_EXCEPTIONS 1
00105 #endif
00106
00107 #ifndef TBB_IMPLEMENT_CPP0X
00108
00109 #if __GNUC__==4 && __GNUC_MINOR__>=4 && __GXX_EXPERIMENTAL_CXX0X__
00110 #define TBB_IMPLEMENT_CPP0X 0
00111 #else
00112 #define TBB_IMPLEMENT_CPP0X 1
00113 #endif
00114 #endif
00115
00116 #ifndef TBB_USE_CAPTURED_EXCEPTION
00117 #if __TBB_EXCEPTION_PTR_PRESENT
00118 #define TBB_USE_CAPTURED_EXCEPTION 0
00119 #else
00120 #define TBB_USE_CAPTURED_EXCEPTION 1
00121 #endif
00122 #else
00123 #if !TBB_USE_CAPTURED_EXCEPTION && !__TBB_EXCEPTION_PTR_PRESENT
00124 #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.
00125 #endif
00126 #endif
00127
00129 #if (TBB_USE_GCC_BUILTINS && !__TBB_GCC_BUILTIN_ATOMICS_PRESENT)
00130 #error "GCC atomic built-ins are not supported."
00131 #endif
00132
00135 #ifndef __TBB_DYNAMIC_LOAD_ENABLED
00136 #define __TBB_DYNAMIC_LOAD_ENABLED !__TBB_TASK_CPP_DIRECTLY_INCLUDED
00137 #elif !__TBB_DYNAMIC_LOAD_ENABLED
00138 #if _WIN32||_WIN64
00139 #define __TBB_NO_IMPLICIT_LINKAGE 1
00140 #define __TBBMALLOC_NO_IMPLICIT_LINKAGE 1
00141 #else
00142 #define __TBB_WEAK_SYMBOLS 1
00143 #endif
00144 #endif
00145
00146 #ifndef __TBB_COUNT_TASK_NODES
00147 #define __TBB_COUNT_TASK_NODES TBB_USE_ASSERT
00148 #endif
00149
00150 #ifndef __TBB_TASK_GROUP_CONTEXT
00151 #define __TBB_TASK_GROUP_CONTEXT 1
00152 #endif
00153
00154 #if TBB_USE_EXCEPTIONS && !__TBB_TASK_GROUP_CONTEXT
00155 #error TBB_USE_EXCEPTIONS requires __TBB_TASK_GROUP_CONTEXT to be enabled
00156 #endif
00157
00158 #ifndef __TBB_SCHEDULER_OBSERVER
00159 #define __TBB_SCHEDULER_OBSERVER 1
00160 #endif
00161
00162 #ifndef __TBB_TASK_PRIORITY
00163 #define __TBB_TASK_PRIORITY __TBB_TASK_GROUP_CONTEXT
00164 #endif
00165
00166 #if __TBB_TASK_PRIORITY && !__TBB_TASK_GROUP_CONTEXT
00167 #error __TBB_TASK_PRIORITY requires __TBB_TASK_GROUP_CONTEXT to be enabled
00168 #endif
00169
00170 #if !defined(__TBB_SURVIVE_THREAD_SWITCH) && (_WIN32 || _WIN64 || __linux__)
00171 #define __TBB_SURVIVE_THREAD_SWITCH 1
00172 #endif
00173
00174 #ifndef __TBB_DEFAULT_PARTITIONER
00175 #if TBB_DEPRECATED
00176
00177 #define __TBB_DEFAULT_PARTITIONER tbb::simple_partitioner
00178 #else
00179
00180 #define __TBB_DEFAULT_PARTITIONER tbb::auto_partitioner
00181 #endif
00182 #endif
00183
00190 #if __GNUC__ && __TBB_x86_64 && __INTEL_COMPILER == 1200
00191 #define __TBB_ICC_12_0_INL_ASM_FSTCW_BROKEN 1
00192 #endif
00193
00194 #if _MSC_VER && __INTEL_COMPILER && (__INTEL_COMPILER<1110 || __INTEL_COMPILER==1110 && __INTEL_COMPILER_BUILD_DATE < 20091012)
00195
00198 #define __TBB_DEFAULT_DTOR_THROW_SPEC_BROKEN 1
00199 #endif
00200
00201 #if defined(_MSC_VER) && _MSC_VER < 1500 && !defined(__INTEL_COMPILER)
00202
00204 #define __TBB_TEMPLATE_FRIENDS_BROKEN 1
00205 #endif
00206
00207 #if __GLIBC__==2 && __GLIBC_MINOR__==3 || __MINGW32__ || (__APPLE__ && __INTEL_COMPILER==1200 && !TBB_USE_DEBUG)
00209
00210 #define __TBB_THROW_ACROSS_MODULE_BOUNDARY_BROKEN 1
00211 #endif
00212
00213 #if (_WIN32||_WIN64) && __INTEL_COMPILER == 1110
00214
00215 #define __TBB_ICL_11_1_CODE_GEN_BROKEN 1
00216 #endif
00217
00218 #if __GNUC__==3 && __GNUC_MINOR__==3 && !defined(__INTEL_COMPILER)
00219
00220 #define __TBB_GCC_3_3_PROTECTED_BROKEN 1
00221 #endif
00222
00223 #if __MINGW32__ && (__GNUC__<4 || __GNUC__==4 && __GNUC_MINOR__<2)
00224
00226 #define __TBB_SSE_STACK_ALIGNMENT_BROKEN 1
00227 #endif
00228
00229 #if __GNUC__==4 && __GNUC_MINOR__==3 && __GNUC_PATCHLEVEL__==0
00230
00231 #define __TBB_GCC_OPTIMIZER_ORDERING_BROKEN 1
00232 #endif
00233
00234 #if __FreeBSD__
00235
00237 #define __TBB_PRIO_INHERIT_BROKEN 1
00238
00241 #define __TBB_PLACEMENT_NEW_EXCEPTION_SAFETY_BROKEN 1
00242 #endif
00243
00244 #if (__linux__ || __APPLE__) && __i386__ && defined(__INTEL_COMPILER)
00245
00247 #define __TBB_ICC_ASM_VOLATILE_BROKEN 1
00248 #endif
00249
00250 #if !__INTEL_COMPILER && (_MSC_VER || __GNUC__==3 && __GNUC_MINOR__<=2)
00251
00253 #define __TBB_ALIGNOF_NOT_INSTANTIATED_TYPES_BROKEN 1
00254 #endif
00255
00256 #endif