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 3011
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 #include <cstddef>
00137
00138 #if _WIN32||_WIN64
00139 #define __TBB_tbb_windef_H
00140 #include "_tbb_windef.h"
00141 #undef __TBB_tbb_windef_H
00142 #endif
00143
00144 namespace tbb {
00146 typedef void(*assertion_handler_type)( const char* filename, int line, const char* expression, const char * comment );
00147 }
00148
00149 #if TBB_DO_ASSERT
00150
00152
00155 #define __TBB_ASSERT(predicate,message) ((predicate)?((void)0):tbb::assertion_failure(__FILE__,__LINE__,#predicate,message))
00156 #define __TBB_ASSERT_EX __TBB_ASSERT
00157
00158 namespace tbb {
00160 assertion_handler_type set_assertion_handler( assertion_handler_type new_handler );
00161
00163
00166 void assertion_failure( const char* filename, int line, const char* expression, const char* comment );
00167 }
00168
00169 #else
00170
00172 #define __TBB_ASSERT(predicate,comment) ((void)0)
00173
00174 #define __TBB_ASSERT_EX(predicate,comment) ((void)(1 && (predicate)))
00175
00176 #endif
00177
00179 namespace tbb {
00180
00182
00186 class split {
00187 };
00188
00193 namespace internal {
00194
00195 using std::size_t;
00196
00198
00200 typedef size_t uintptr;
00201
00203
00205 typedef std::ptrdiff_t intptr;
00206
00208 void runtime_warning( const char* format, ... );
00209
00210 #if TBB_DO_ASSERT
00211
00212 template<typename T>
00213 inline void poison_pointer( T* & p ) {
00214 p = reinterpret_cast<T*>(-1);
00215 }
00216 #else
00217 template<typename T>
00218 inline void poison_pointer( T* ) {}
00219 #endif
00220
00222 class no_copy {
00224 no_copy( const no_copy& );
00225
00226
00227 void operator=( const no_copy& );
00228 public:
00230 no_copy() {}
00231 };
00232
00233
00236 struct version_tag_v3 {};
00237
00238 typedef version_tag_v3 version_tag;
00239
00240 }
00242
00243 }
00244
00245 #if defined(__EXCEPTIONS) || defined(_CPPUNWIND) || defined(__SUNPRO_CC)
00246 #ifndef __TBB_EXCEPTIONS
00247 #define __TBB_EXCEPTIONS 1
00248 #endif
00249
00250 #endif
00251
00252 #ifndef __TBB_SCHEDULER_OBSERVER
00253 #define __TBB_SCHEDULER_OBSERVER 1
00254 #endif
00255
00256 #ifndef TBB_PERFORMANCE_WARNINGS
00257 #define TBB_PERFORMANCE_WARNINGS TBB_DO_ASSERT
00258 #endif
00259
00260 #endif
00261 #endif