00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef __TBB_tbb_stddef_H
00022 #define __TBB_tbb_stddef_H
00023
00024
00025 #define TBB_VERSION_MAJOR 2
00026 #define TBB_VERSION_MINOR 1
00027
00028
00029 #define TBB_INTERFACE_VERSION 3016
00030 #define TBB_INTERFACE_VERSION_MAJOR TBB_INTERFACE_VERSION/1000
00031
00032
00033
00034 #define TBB_COMPATIBLE_INTERFACE_VERSION 2
00035
00036 #define __TBB_STRING_AUX(x) #x
00037 #define __TBB_STRING(x) __TBB_STRING_AUX(x)
00038
00039
00040 #if !defined RC_INVOKED
00041
00042
00052
00094
00095 #if _WIN32||_WIN64
00096 # if defined(_M_AMD64)
00097 # define __TBB_x86_64 1
00098 # elif defined(_M_IA64)
00099 # define __TBB_ipf 1
00100 # elif defined(_M_IX86)
00101 # define __TBB_x86_32 1
00102 # endif
00103 #else
00104 # if !__linux__ && !__APPLE__
00105 # define __TBB_generic_os 1
00106 # endif
00107 # if __x86_64__
00108 # define __TBB_x86_64 1
00109 # elif __ia64__
00110 # define __TBB_ipf 1
00111 # elif __i386__||__i386 // __i386 is for Sun OS
00112 # define __TBB_x86_32 1
00113 # else
00114 # define __TBB_generic_arch 1
00115 # endif
00116 #endif
00117
00118 #if _WIN32||_WIN64
00119
00120 namespace tbb {
00121 namespace internal {
00122 typedef __int8 int8_t;
00123 typedef __int16 int16_t;
00124 typedef __int32 int32_t;
00125 typedef __int64 int64_t;
00126 typedef unsigned __int8 uint8_t;
00127 typedef unsigned __int16 uint16_t;
00128 typedef unsigned __int32 uint32_t;
00129 typedef unsigned __int64 uint64_t;
00130 }
00131 }
00132 #else
00133 #include <stdint.h>
00134 #endif
00135
00136 #if _MSC_VER >=1400
00137 #define __TBB_EXPORTED_FUNC __cdecl
00138 #define __TBB_EXPORTED_METHOD __thiscall
00139 #else
00140 #define __TBB_EXPORTED_FUNC
00141 #define __TBB_EXPORTED_METHOD
00142 #endif
00143
00144 #include <cstddef>
00145
00146 #if _WIN32||_WIN64
00147 #define __TBB_tbb_windef_H
00148 #include "_tbb_windef.h"
00149 #undef __TBB_tbb_windef_H
00150 #endif
00151
00152 #ifndef TBB_USE_DEBUG
00153 #ifdef TBB_DO_ASSERT
00154 #define TBB_USE_DEBUG TBB_DO_ASSERT
00155 #else
00156 #define TBB_USE_DEBUG 0
00157 #endif
00158 #else
00159 #define TBB_DO_ASSERT TBB_USE_DEBUG
00160 #endif
00161
00162 #ifndef TBB_USE_ASSERT
00163 #ifdef TBB_DO_ASSERT
00164 #define TBB_USE_ASSERT TBB_DO_ASSERT
00165 #else
00166 #define TBB_USE_ASSERT TBB_USE_DEBUG
00167 #endif
00168 #endif
00169
00170 #ifndef TBB_USE_THREADING_TOOLS
00171 #ifdef TBB_DO_THREADING_TOOLS
00172 #define TBB_USE_THREADING_TOOLS TBB_DO_THREADING_TOOLS
00173 #else
00174 #define TBB_USE_THREADING_TOOLS TBB_USE_DEBUG
00175 #endif
00176 #endif
00177
00178 #ifndef TBB_USE_PERFORMANCE_WARNINGS
00179 #ifdef TBB_PERFORMANCE_WARNINGS
00180 #define TBB_USE_PERFORMANCE_WARNINGS TBB_PERFORMANCE_WARNINGS
00181 #else
00182 #define TBB_USE_PERFORMANCE_WARNINGS TBB_USE_DEBUG
00183 #endif
00184 #endif
00185
00186 namespace tbb {
00188 typedef void(*assertion_handler_type)( const char* filename, int line, const char* expression, const char * comment );
00189 }
00190
00191 #if TBB_USE_ASSERT
00192
00194
00197 #define __TBB_ASSERT(predicate,message) ((predicate)?((void)0):tbb::assertion_failure(__FILE__,__LINE__,#predicate,message))
00198 #define __TBB_ASSERT_EX __TBB_ASSERT
00199
00200 namespace tbb {
00202 assertion_handler_type __TBB_EXPORTED_FUNC set_assertion_handler( assertion_handler_type new_handler );
00203
00205
00208 void __TBB_EXPORTED_FUNC assertion_failure( const char* filename, int line, const char* expression, const char* comment );
00209 }
00210
00211 #else
00212
00214 #define __TBB_ASSERT(predicate,comment) ((void)0)
00216 #define __TBB_ASSERT_EX(predicate,comment) ((void)(1 && (predicate)))
00217
00218 #endif
00219
00221 namespace tbb {
00222
00224
00228 extern "C" int __TBB_EXPORTED_FUNC TBB_runtime_interface_version();
00229
00231
00235 class split {
00236 };
00237
00242 namespace internal {
00243
00244 using std::size_t;
00245
00247
00249 typedef size_t uintptr;
00250
00252
00254 typedef std::ptrdiff_t intptr;
00255
00257 void __TBB_EXPORTED_FUNC runtime_warning( const char* format, ... );
00258
00259 #if TBB_USE_ASSERT
00261 template<typename T>
00262 inline void poison_pointer( T* & p ) {
00263 p = reinterpret_cast<T*>(-1);
00264 }
00265 #else
00266 template<typename T>
00267 inline void poison_pointer( T* ) {}
00268 #endif
00269
00271 class no_assign {
00272
00273 void operator=( const no_assign& );
00274 public:
00275 #if __GNUC__
00277 no_assign() {}
00278 #endif
00279 };
00280
00282 class no_copy: no_assign {
00284 no_copy( const no_copy& );
00285 public:
00287 no_copy() {}
00288 };
00289
00291 template<typename T>
00292 struct allocator_type {
00293 typedef T value_type;
00294 };
00295
00296 #if _WIN32||_WIN64
00298 template<typename T>
00299 struct allocator_type<const T> {
00300 typedef T value_type;
00301 };
00302 #endif
00303
00304
00307 struct version_tag_v3 {};
00308
00309 typedef version_tag_v3 version_tag;
00310
00311 }
00313
00314 }
00315
00316 #if defined(__EXCEPTIONS) || defined(_CPPUNWIND) || defined(__SUNPRO_CC)
00317 #ifndef __TBB_EXCEPTIONS
00318 #define __TBB_EXCEPTIONS 1
00319 #endif
00320 #endif
00321
00322 #ifndef __TBB_SCHEDULER_OBSERVER
00323 #define __TBB_SCHEDULER_OBSERVER 1
00324 #endif
00325
00326 #ifndef __TBB_NAMING_API_SUPPORT
00327 #define __TBB_NAMING_API_SUPPORT 1
00328 #endif
00329
00330
00331 #endif
00332 #endif