enumerable_thread_specific.h   enumerable_thread_specific.h 
skipping to change at line 671 skipping to change at line 671
}; };
//! Template for adding padding in order to avoid false sharing //! Template for adding padding in order to avoid false sharing
/** ModularSize should be sizeof(U) modulo the cache line size. /** ModularSize should be sizeof(U) modulo the cache line size.
All maintenance of the space will be done explicitly on push_ba ck, All maintenance of the space will be done explicitly on push_ba ck,
and all thread local copies must be destroyed before the concur rent and all thread local copies must be destroyed before the concur rent
vector is deleted. vector is deleted.
*/ */
template<typename U, size_t ModularSize> template<typename U, size_t ModularSize>
struct ets_element { struct ets_element {
ets_element() { /* avoid cl warning C4345 about default initial ization of POD types */ }
char value[ModularSize==0 ? sizeof(U) : sizeof(U)+(tbb::interna l::NFS_MaxLineSize-ModularSize)]; char value[ModularSize==0 ? sizeof(U) : sizeof(U)+(tbb::interna l::NFS_MaxLineSize-ModularSize)];
void unconstruct() { void unconstruct() {
tbb::internal::punned_cast<U*>(&value)->~U(); tbb::internal::punned_cast<U*>(&value)->~U();
} }
}; };
} // namespace internal } // namespace internal
//! @endcond //! @endcond
//! The enumerable_thread_specific container //! The enumerable_thread_specific container
skipping to change at line 733 skipping to change at line 734
typedef typename Allocator::template rebind< padded_element >::othe r padded_allocator_type; typedef typename Allocator::template rebind< padded_element >::othe r padded_allocator_type;
typedef tbb::concurrent_vector< padded_element, padded_allocator_ty pe > internal_collection_type; typedef tbb::concurrent_vector< padded_element, padded_allocator_ty pe > internal_collection_type;
internal::callback_base<T> *my_construct_callback; internal::callback_base<T> *my_construct_callback;
internal_collection_type my_locals; internal_collection_type my_locals;
/*override*/ void* create_local() { /*override*/ void* create_local() {
#if TBB_DEPRECATED #if TBB_DEPRECATED
void* lref = &my_locals[my_locals.push_back(padded_element())]; void* lref = &my_locals[my_locals.grow_by(1)];
#else #else
void* lref = &*my_locals.push_back(padded_element()); void* lref = &*my_locals.grow_by(1);
#endif #endif
my_construct_callback->construct(lref); my_construct_callback->construct(lref);
return lref; return lref;
} }
void unconstruct_locals() { void unconstruct_locals() {
for(typename internal_collection_type::iterator cvi = my_locals .begin(); cvi != my_locals.end(); ++cvi) { for(typename internal_collection_type::iterator cvi = my_locals .begin(); cvi != my_locals.end(); ++cvi) {
cvi->unconstruct(); cvi->unconstruct();
} }
} }
skipping to change at line 933 skipping to change at line 934
typedef internal::ets_base<ets_no_key> base; typedef internal::ets_base<ets_no_key> base;
__TBB_ASSERT(my_locals.size()==0,NULL); __TBB_ASSERT(my_locals.size()==0,NULL);
this->table_reserve_for_copy( other ); this->table_reserve_for_copy( other );
for( base::array* r=other.my_root; r; r=r->next ) { for( base::array* r=other.my_root; r; r=r->next ) {
for( size_t i=0; i<r->size(); ++i ) { for( size_t i=0; i<r->size(); ++i ) {
base::slot& s1 = r->at(i); base::slot& s1 = r->at(i);
if( !s1.empty() ) { if( !s1.empty() ) {
base::slot& s2 = this->table_find(s1.key); base::slot& s2 = this->table_find(s1.key);
if( s2.empty() ) { if( s2.empty() ) {
#if TBB_DEPRECATED #if TBB_DEPRECATED
void* lref = &my_locals[my_locals.push_back(padded_ element())]; void* lref = &my_locals[my_locals.grow_by(1)];
#else #else
void* lref = &*my_locals.push_back(padded_element() ); void* lref = &*my_locals.grow_by(1);
#endif #endif
s2.ptr = new(lref) T(*(U*)s1.ptr); s2.ptr = new(lref) T(*(U*)s1.ptr);
s2.key = s1.key; s2.key = s1.key;
} else { } else {
// Skip the duplicate // Skip the duplicate
} }
} }
} }
} }
} }
 End of changes. 5 change blocks. 
4 lines changed or deleted 5 lines changed or added


 flow_graph.h   flow_graph.h 
skipping to change at line 1141 skipping to change at line 1141
} }
#endif #endif
/* override */ bool register_successor( successor_type &s ) { /* override */ bool register_successor( successor_type &s ) {
spin_mutex::scoped_lock l( my_mutex ); spin_mutex::scoped_lock l( my_mutex );
if ( my_buffer_is_valid ) { if ( my_buffer_is_valid ) {
// We have a valid value that must be forwarded immediately. // We have a valid value that must be forwarded immediately.
if ( s.try_put( my_buffer ) || !s.register_predecessor( *this ) ) { if ( s.try_put( my_buffer ) || !s.register_predecessor( *this ) ) {
// We add the successor: it accepted our put or it rejected it but won't let us become a predecessor // We add the successor: it accepted our put or it rejected it but won't let us become a predecessor
my_successors.register_successor( s ); my_successors.register_successor( s );
return true;
} else { } else {
// We don't add the successor: it rejected our put and we b ecame its predecessor instead // We don't add the successor: it rejected our put and we b ecame its predecessor instead
return false; return false;
} }
} else { } else {
// No valid value yet, just add as successor // No valid value yet, just add as successor
my_successors.register_successor( s ); my_successors.register_successor( s );
return true;
} }
return true;
} }
/* override */ bool remove_successor( successor_type &s ) { /* override */ bool remove_successor( successor_type &s ) {
spin_mutex::scoped_lock l( my_mutex ); spin_mutex::scoped_lock l( my_mutex );
my_successors.remove_successor(s); my_successors.remove_successor(s);
return true; return true;
} }
/* override */ bool try_get( T &v ) { /* override */ bool try_get( T &v ) {
spin_mutex::scoped_lock l( my_mutex ); spin_mutex::scoped_lock l( my_mutex );
if ( my_buffer_is_valid ) { if ( my_buffer_is_valid ) {
v = my_buffer; v = my_buffer;
return true; return true;
} else {
return false;
} }
return false;
} }
bool is_valid() { bool is_valid() {
spin_mutex::scoped_lock l( my_mutex ); spin_mutex::scoped_lock l( my_mutex );
return my_buffer_is_valid; return my_buffer_is_valid;
} }
void clear() { void clear() {
spin_mutex::scoped_lock l( my_mutex ); spin_mutex::scoped_lock l( my_mutex );
my_buffer_is_valid = false; my_buffer_is_valid = false;
 End of changes. 5 change blocks. 
4 lines changed or deleted 2 lines changed or added


 tbb_config.h   tbb_config.h 
skipping to change at line 46 skipping to change at line 46
- feature sets - feature sets
- known compiler/platform issues - known compiler/platform issues
**/ **/
/*Check which standard library we use on OS X.*/ /*Check which standard library we use on OS X.*/
/*__TBB_SYMBOL is defined only while processing exported symbols list where C++ is not allowed.*/ /*__TBB_SYMBOL is defined only while processing exported symbols list where C++ is not allowed.*/
#if !defined(__TBB_SYMBOL) && __APPLE__ #if !defined(__TBB_SYMBOL) && __APPLE__
#include <cstddef> #include <cstddef>
#endif #endif
// note that when ICC is in use __TBB_GCC_VERSION might not closely match G CC version on the machine
#define __TBB_GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC _PATCHLEVEL__) #define __TBB_GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC _PATCHLEVEL__)
#if __clang__ #if __clang__
/**according to clang documentation version can be vendor specific **/ /**according to clang documentation version can be vendor specific **/
#define __TBB_CLANG_VERSION (__clang_major__ * 10000 + __clang_minor__ * 100 + __clang_patchlevel__) #define __TBB_CLANG_VERSION (__clang_major__ * 10000 + __clang_minor__ * 100 + __clang_patchlevel__)
#endif #endif
/** Presence of compiler features **/ /** Presence of compiler features **/
#if __INTEL_COMPILER == 9999 && __INTEL_COMPILER_BUILD_DATE == 20110811 #if __INTEL_COMPILER == 9999 && __INTEL_COMPILER_BUILD_DATE == 20110811
skipping to change at line 471 skipping to change at line 472
#define __TBB_DEFAULT_DTOR_THROW_SPEC_BROKEN 1 #define __TBB_DEFAULT_DTOR_THROW_SPEC_BROKEN 1
#endif #endif
#if defined(_MSC_VER) && _MSC_VER < 1500 && !defined(__INTEL_COMPILER) #if defined(_MSC_VER) && _MSC_VER < 1500 && !defined(__INTEL_COMPILER)
/** VS2005 and earlier do not allow declaring template class as a frien d /** VS2005 and earlier do not allow declaring template class as a frien d
of classes defined in other namespaces. **/ of classes defined in other namespaces. **/
#define __TBB_TEMPLATE_FRIENDS_BROKEN 1 #define __TBB_TEMPLATE_FRIENDS_BROKEN 1
#endif #endif
//TODO: recheck for different clang versions //TODO: recheck for different clang versions
#if __GLIBC__==2 && __GLIBC_MINOR__==3 || __MINGW32__ || (__APPLE__ && ( __ INTEL_COMPILER==1200 && !TBB_USE_DEBUG)) #if __GLIBC__==2 && __GLIBC_MINOR__==3 || (__APPLE__ && ( __INTEL_COMPILER ==1200 && !TBB_USE_DEBUG))
/** Macro controlling EH usages in TBB tests. /** Macro controlling EH usages in TBB tests.
Some older versions of glibc crash when exception handling happens concurrently. **/ Some older versions of glibc crash when exception handling happens concurrently. **/
#define __TBB_THROW_ACROSS_MODULE_BOUNDARY_BROKEN 1 #define __TBB_THROW_ACROSS_MODULE_BOUNDARY_BROKEN 1
#else #else
#define __TBB_THROW_ACROSS_MODULE_BOUNDARY_BROKEN 0 #define __TBB_THROW_ACROSS_MODULE_BOUNDARY_BROKEN 0
#endif #endif
#if (_WIN32||_WIN64) && __INTEL_COMPILER == 1110 #if (_WIN32||_WIN64) && __INTEL_COMPILER == 1110
/** That's a bug in Intel compiler 11.1.044/IA-32/Windows, that leads t o a worker thread crash on the thread's startup. **/ /** That's a bug in Intel compiler 11.1.044/IA-32/Windows, that leads t o a worker thread crash on the thread's startup. **/
#define __TBB_ICL_11_1_CODE_GEN_BROKEN 1 #define __TBB_ICL_11_1_CODE_GEN_BROKEN 1
skipping to change at line 541 skipping to change at line 542
#else #else
#define __TBB_CPP11_STD_FORWARD_BROKEN 0 #define __TBB_CPP11_STD_FORWARD_BROKEN 0
#endif #endif
#if __TBB_DEFINE_MIC #if __TBB_DEFINE_MIC
/** Main thread and user's thread have different default thread affinit y masks. **/ /** Main thread and user's thread have different default thread affinit y masks. **/
#define __TBB_MAIN_THREAD_AFFINITY_BROKEN 1 #define __TBB_MAIN_THREAD_AFFINITY_BROKEN 1
#endif #endif
#if __GXX_EXPERIMENTAL_CXX0X__ && !defined(__EXCEPTIONS) && \ #if __GXX_EXPERIMENTAL_CXX0X__ && !defined(__EXCEPTIONS) && \
__GNUC__==4 && (__GNUC_MINOR__==4 ||__GNUC_MINOR__==5 || (__INTEL_COMPI ((!__INTEL_COMPILER && !__clang__ && (__TBB_GCC_VERSION>=40400 && __TBB
LER==1300 && (__GNUC_MINOR__==6 ||__GNUC_MINOR__==7))) _GCC_VERSION<40600)) || \
(__INTEL_COMPILER<=1400 && (__TBB_GCC_VERSION>=40400 && __TBB_GCC_VERS
ION<=40800)))
/* There is an issue for specific GCC toolchain when C++11 is enabled /* There is an issue for specific GCC toolchain when C++11 is enabled
and exceptions are disabled: and exceptions are disabled:
exceprion_ptr.h/nested_exception.h use throw unconditionally. exceprion_ptr.h/nested_exception.h use throw unconditionally.
GCC can ignore 'throw' since 4.6; but with ICC the issue still exists.
*/ */
#define __TBB_LIBSTDCPP_EXCEPTION_HEADERS_BROKEN 1 #define __TBB_LIBSTDCPP_EXCEPTION_HEADERS_BROKEN 1
#else #else
#define __TBB_LIBSTDCPP_EXCEPTION_HEADERS_BROKEN 0 #define __TBB_LIBSTDCPP_EXCEPTION_HEADERS_BROKEN 0
#endif #endif
#if (__GNUC__==4 && __GNUC_MINOR__==4 ) && !defined(__INTEL_COMPILER) && !d
efined(__clang__)
/** excessive warnings related to strict aliasing rules in GCC 4.4 **/
#define __TBB_GCC_STRICT_ALIASING_BROKEN 1
/* topical remedy: #pragma GCC diagnostic ignored "-Wstrict-aliasing" *
/
#if !__TBB_GCC_WARNING_SUPPRESSION_PRESENT
#error Warning suppression is not supported, while should.
#endif
#endif
/*In a PIC mode some versions of GCC 4.1.2 generate incorrect inlined code for 8 byte __sync_val_compare_and_swap intrinisc */ /*In a PIC mode some versions of GCC 4.1.2 generate incorrect inlined code for 8 byte __sync_val_compare_and_swap intrinisc */
#if __TBB_GCC_VERSION == 40102 && __PIC__ && !defined(__INTEL_COMPILER) && !defined(__clang__) #if __TBB_GCC_VERSION == 40102 && __PIC__ && !defined(__INTEL_COMPILER) && !defined(__clang__)
#define __TBB_GCC_CAS8_BUILTIN_INLINING_BROKEN 1 #define __TBB_GCC_CAS8_BUILTIN_INLINING_BROKEN 1
#endif #endif
#if __TBB_x86_32 && (__linux__ || __APPLE__ || _WIN32 || __sun) && ((defin ed(__INTEL_COMPILER) && __INTEL_COMPILER <= 1400) || (__GNUC__==3 && __GNUC _MINOR__==3 ) || defined(__SUNPRO_CC)) #if __TBB_x86_32 && (__linux__ || __APPLE__ || _WIN32 || __sun) && ((defin ed(__INTEL_COMPILER) && __INTEL_COMPILER <= 1400) || (__GNUC__==3 && __GNUC _MINOR__==3 ) || defined(__SUNPRO_CC))
// Some compilers for IA-32 fail to provide 8-byte alignment of objects on the stack, // Some compilers for IA-32 fail to provide 8-byte alignment of objects on the stack,
// even if the object specifies 8-byte alignment. On such platforms, t he IA-32 implementation // even if the object specifies 8-byte alignment. On such platforms, t he IA-32 implementation
// of 64 bit atomics (e.g. atomic<long long>) use different tactics dep ending upon // of 64 bit atomics (e.g. atomic<long long>) use different tactics dep ending upon
// whether the object is properly aligned or not. // whether the object is properly aligned or not.
 End of changes. 5 change blocks. 
3 lines changed or deleted 18 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/