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
00033 #ifndef TBB_USE_DEBUG
00034 #ifdef TBB_DO_ASSERT
00035 #define TBB_USE_DEBUG TBB_DO_ASSERT
00036 #else
00037 #define TBB_USE_DEBUG 0
00038 #endif
00039 #else
00040 #define TBB_DO_ASSERT TBB_USE_DEBUG
00041 #endif
00042
00043 #ifndef TBB_USE_ASSERT
00044 #ifdef TBB_DO_ASSERT
00045 #define TBB_USE_ASSERT TBB_DO_ASSERT
00046 #else
00047 #define TBB_USE_ASSERT TBB_USE_DEBUG
00048 #endif
00049 #endif
00050
00051 #ifndef TBB_USE_THREADING_TOOLS
00052 #ifdef TBB_DO_THREADING_TOOLS
00053 #define TBB_USE_THREADING_TOOLS TBB_DO_THREADING_TOOLS
00054 #else
00055 #define TBB_USE_THREADING_TOOLS TBB_USE_DEBUG
00056 #endif
00057 #endif
00058
00059 #ifndef TBB_USE_PERFORMANCE_WARNINGS
00060 #ifdef TBB_PERFORMANCE_WARNINGS
00061 #define TBB_USE_PERFORMANCE_WARNINGS TBB_PERFORMANCE_WARNINGS
00062 #else
00063 #define TBB_USE_PERFORMANCE_WARNINGS TBB_USE_DEBUG
00064 #endif
00065 #endif
00066
00067 #if !defined(__EXCEPTIONS) && !defined(_CPPUNWIND) && !defined(__SUNPRO_CC) || defined(_XBOX)
00068 #if TBB_USE_EXCEPTIONS
00069 #error Compilation settings do not support exception handling. Please do not set TBB_USE_EXCEPTIONS macro or set it to 0.
00070 #elif !defined(TBB_USE_EXCEPTIONS)
00071 #define TBB_USE_EXCEPTIONS 0
00072 #endif
00073 #elif !defined(TBB_USE_EXCEPTIONS)
00074 #define TBB_USE_EXCEPTIONS 1
00075 #endif
00076
00077 #ifndef TBB_IMPLEMENT_CPP0X
00078
00079 #if __GNUC__==4 && __GNUC_MINOR__>=4 && __GXX_EXPERIMENTAL_CXX0X__
00080 #define TBB_IMPLEMENT_CPP0X 0
00081 #else
00082 #define TBB_IMPLEMENT_CPP0X 1
00083 #endif
00084 #endif
00085
00086 #ifndef __TBB_DYNAMIC_LOAD_ENABLED
00087 #define __TBB_DYNAMIC_LOAD_ENABLED !__TBB_TASK_CPP_DIRECTLY_INCLUDED
00088 #elif !__TBB_DYNAMIC_LOAD_ENABLED
00089 #if _WIN32||_WIN64
00090 #define __TBB_NO_IMPLICIT_LINKAGE 1
00091 #define __TBBMALLOC_NO_IMPLICIT_LINKAGE 1
00092 #else
00093 #define __TBB_WEAK_SYMBOLS 1
00094 #endif
00095 #endif
00096
00099 #ifndef __TBB_COUNT_TASK_NODES
00100 #define __TBB_COUNT_TASK_NODES TBB_USE_ASSERT
00101 #endif
00102
00103 #ifndef __TBB_TASK_GROUP_CONTEXT
00104 #define __TBB_TASK_GROUP_CONTEXT 1
00105 #endif
00106
00107 #if TBB_USE_EXCEPTIONS && !__TBB_TASK_GROUP_CONTEXT
00108 #error TBB_USE_EXCEPTIONS requires __TBB_TASK_GROUP_CONTEXT to be enabled
00109 #endif
00110
00111 #ifndef __TBB_SCHEDULER_OBSERVER
00112 #define __TBB_SCHEDULER_OBSERVER 1
00113 #endif
00114
00115 #ifndef __TBB_TASK_PRIORITY
00116 #define __TBB_TASK_PRIORITY __TBB_CPF_BUILD
00117 #endif
00118
00119 #if __TBB_TASK_PRIORITY && !__TBB_TASK_GROUP_CONTEXT
00120 #error __TBB_TASK_PRIORITY requires __TBB_TASK_GROUP_CONTEXT to be enabled
00121 #endif
00122
00123 #ifdef TBB_PREVIEW_TASK_PRIORITY
00124 #if TBB_PREVIEW_TASK_PRIORITY
00125 #define __TBB_NO_IMPLICIT_LINKAGE 1
00126 #if __TBB_BUILD && !__TBB_TASK_PRIORITY
00127 #error TBB_PREVIEW_TASK_PRIORITY requires __TBB_TASK_PRIORITY to be enabled during TBB build
00128 #elif !__TBB_TASK_GROUP_CONTEXT
00129 #error TBB_PREVIEW_TASK_PRIORITY requires __TBB_TASK_GROUP_CONTEXT to be enabled
00130 #endif
00131 #endif
00132 #else
00133 #if __TBB_BUILD
00134 #define TBB_PREVIEW_TASK_PRIORITY __TBB_TASK_PRIORITY
00135 #endif
00136 #endif
00137
00138 #if !defined(__TBB_SURVIVE_THREAD_SWITCH) && (_WIN32 || _WIN64 || __linux__)
00139 #define __TBB_SURVIVE_THREAD_SWITCH 1
00140 #endif
00141
00142
00143
00144
00145 #define __TBB_EXCEPTION_PTR_PRESENT (_MSC_VER >= 1600 || __GXX_EXPERIMENTAL_CXX0X__ && (__GNUC__==4 && __GNUC_MINOR__>=4))
00146
00147
00148 #ifndef TBB_USE_CAPTURED_EXCEPTION
00149 #if __TBB_EXCEPTION_PTR_PRESENT
00150 #define TBB_USE_CAPTURED_EXCEPTION 0
00151 #else
00152 #define TBB_USE_CAPTURED_EXCEPTION 1
00153 #endif
00154 #else
00155 #if !TBB_USE_CAPTURED_EXCEPTION && !__TBB_EXCEPTION_PTR_PRESENT
00156 #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.
00157 #endif
00158 #endif
00159
00160
00161 #ifndef __TBB_DEFAULT_PARTITIONER
00162 #if TBB_DEPRECATED
00163
00164 #define __TBB_DEFAULT_PARTITIONER tbb::simple_partitioner
00165 #else
00166
00167 #define __TBB_DEFAULT_PARTITIONER tbb::auto_partitioner
00168 #endif
00169 #endif
00170
00173 #if __GNUC__ && __TBB_x86_64 && __INTEL_COMPILER == 1200
00174 #define __TBB_ICC_12_0_INL_ASM_FSTCW_BROKEN 1
00175 #endif
00176
00177 #if __GNUC__==4 && __GNUC_MINOR__>=4 && !defined(__INTEL_COMPILER)
00178 #define __TBB_GCC_WARNING_SUPPRESSION_ENABLED 1
00179 #endif
00180
00187 #if _MSC_VER && __INTEL_COMPILER && (__INTEL_COMPILER<1110 || __INTEL_COMPILER==1110 && __INTEL_COMPILER_BUILD_DATE < 20091012)
00188
00191 #define __TBB_DEFAULT_DTOR_THROW_SPEC_BROKEN 1
00192 #endif
00193
00194 #if defined(_MSC_VER) && _MSC_VER < 1500 && !defined(__INTEL_COMPILER)
00195
00197 #define __TBB_TEMPLATE_FRIENDS_BROKEN 1
00198 #endif
00199
00200 #if __GLIBC__==2 && __GLIBC_MINOR__==3 || __MINGW32__
00202
00203 #define __TBB_THROW_ACROSS_MODULE_BOUNDARY_BROKEN 1
00204 #endif
00205
00206 #if (_WIN32||_WIN64) && __INTEL_COMPILER == 1110
00207
00208 #define __TBB_ICL_11_1_CODE_GEN_BROKEN 1
00209 #endif
00210
00211 #if __GNUC__==3 && __GNUC_MINOR__==3 && !defined(__INTEL_COMPILER)
00212
00213 #define __TBB_GCC_3_3_PROTECTED_BROKEN 1
00214 #endif
00215
00216 #if __MINGW32__ && (__GNUC__<4 || __GNUC__==4 && __GNUC_MINOR__<2)
00217
00219 #define __TBB_SSE_STACK_ALIGNMENT_BROKEN 1
00220 #endif
00221
00222 #if __GNUC__==4 && __GNUC_MINOR__==3 && __GNUC_PATCHLEVEL__==0
00223
00224 #define __TBB_GCC_OPTIMIZER_ORDERING_BROKEN 1
00225 #endif
00226
00227 #if __FreeBSD__
00228
00230 #define __TBB_PRIO_INHERIT_BROKEN 1
00231
00234 #define __TBB_PLACEMENT_NEW_EXCEPTION_SAFETY_BROKEN 1
00235 #endif
00236
00237 #if (__linux__ || __APPLE__) && __i386__ && defined(__INTEL_COMPILER)
00238
00240 #define __TBB_ICC_ASM_VOLATILE_BROKEN 1
00241 #endif
00242
00243 #define __TBB_GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
00244
00245
00246 #if (__TBB_GCC_VERSION > 40102 ) && !defined(__INTEL_COMPILER)
00247 #define __TBB_GCC_BUILTIN_ATOMICS_PRESENT 1
00248 #endif
00249
00250 #if (TBB_USE_GENERIC_GCC_PORT && !__TBB_GCC_BUILTIN_ATOMICS_PRESENT)
00251 #error "generic gcc port is not supported for this os/architecture."
00252 #endif
00253 #endif