21 #ifndef __TBB_machine_H 22 #define __TBB_machine_H 128 template <
typename T, std::
size_t S>
129 struct machine_load_store;
131 template <
typename T, std::
size_t S>
132 struct machine_load_store_relaxed;
134 template <
typename T, std::
size_t S>
135 struct machine_load_store_seq_cst;
144 inline static word fetch_store (
volatile void* location,
word value );
149 inline static word fetch_store (
volatile void* location,
word value );
153 #if _MSC_VER && !_WIN64 155 typedef intptr_t
word;
159 inline static word fetch_store (
volatile void* location,
word value );
164 inline static word fetch_store (
volatile void* location,
word value );
169 #define __TBB_MACHINE_DEFINE_STORE8_GENERIC_FENCED(M) \ 170 inline void __TBB_machine_generic_store8##M(volatile void *ptr, int64_t value) { \ 172 int64_t result = *(volatile int64_t *)ptr; \ 173 if( __TBB_machine_cmpswp8##M(ptr,value,result)==result ) break; \ 177 #define __TBB_MACHINE_DEFINE_LOAD8_GENERIC_FENCED(M) \ 178 inline int64_t __TBB_machine_generic_load8##M(const volatile void *ptr) { \ 181 const int64_t anyvalue = 2305843009213693951LL; \ 182 return __TBB_machine_cmpswp8##M(const_cast<volatile void *>(ptr),anyvalue,anyvalue); \ 186 #define __TBB_ENDIAN_UNSUPPORTED -1 187 #define __TBB_ENDIAN_LITTLE 0 188 #define __TBB_ENDIAN_BIG 1 189 #define __TBB_ENDIAN_DETECT 2 194 #pragma managed(push, off) 197 #if __MINGW64__ || __MINGW32__ 198 extern "C" __declspec(dllimport)
int __stdcall SwitchToThread(
void );
199 #define __TBB_Yield() SwitchToThread() 200 #if (TBB_USE_GCC_BUILTINS && __TBB_GCC_BUILTIN_ATOMICS_PRESENT) 207 #elif (TBB_USE_ICC_BUILTINS && __TBB_ICC_BUILTIN_ATOMICS_PRESENT) 209 #elif defined(_M_IX86) && !defined(__TBB_WIN32_USE_CL_BUILTINS) 211 #elif defined(_M_X64) 213 #elif defined(_M_ARM) || defined(__TBB_WIN32_USE_CL_BUILTINS) 221 #elif __TBB_DEFINE_MIC 224 #if (TBB_USE_ICC_BUILTINS && __TBB_ICC_BUILTIN_ATOMICS_PRESENT) 230 #elif __linux__ || __FreeBSD__ || __NetBSD__ || __OpenBSD__ 232 #if (TBB_USE_GCC_BUILTINS && __TBB_GCC_BUILTIN_ATOMICS_PRESENT) 234 #elif (TBB_USE_ICC_BUILTINS && __TBB_ICC_BUILTIN_ATOMICS_PRESENT) 244 #elif __ARM_ARCH_7A__ || __aarch64__ 246 #elif __TBB_GCC_BUILTIN_ATOMICS_PRESENT 253 #if (TBB_USE_ICC_BUILTINS && __TBB_ICC_BUILTIN_ATOMICS_PRESENT) 268 #elif __sun || __SUNPRO_CC 271 #define __volatile__ volatile 273 #if __i386 || __i386__ 282 #define __TBB_Yield() sched_yield() 286 #ifndef __TBB_64BIT_ATOMICS 287 #define __TBB_64BIT_ATOMICS 1 293 #if __TBB_USE_FENCED_ATOMICS 294 #define __TBB_machine_cmpswp1 __TBB_machine_cmpswp1full_fence 295 #define __TBB_machine_cmpswp2 __TBB_machine_cmpswp2full_fence 296 #define __TBB_machine_cmpswp4 __TBB_machine_cmpswp4full_fence 297 #define __TBB_machine_cmpswp8 __TBB_machine_cmpswp8full_fence 299 #if __TBB_WORDSIZE==8 300 #define __TBB_machine_fetchadd8 __TBB_machine_fetchadd8full_fence 301 #define __TBB_machine_fetchstore8 __TBB_machine_fetchstore8full_fence 302 #define __TBB_FetchAndAddWrelease(P,V) __TBB_machine_fetchadd8release(P,V) 303 #define __TBB_FetchAndIncrementWacquire(P) __TBB_machine_fetchadd8acquire(P,1) 304 #define __TBB_FetchAndDecrementWrelease(P) __TBB_machine_fetchadd8release(P,(-1)) 306 #define __TBB_machine_fetchadd4 __TBB_machine_fetchadd4full_fence 307 #define __TBB_machine_fetchstore4 __TBB_machine_fetchstore4full_fence 308 #define __TBB_FetchAndAddWrelease(P,V) __TBB_machine_fetchadd4release(P,V) 309 #define __TBB_FetchAndIncrementWacquire(P) __TBB_machine_fetchadd4acquire(P,1) 310 #define __TBB_FetchAndDecrementWrelease(P) __TBB_machine_fetchadd4release(P,(-1)) 313 #define __TBB_FetchAndAddWrelease(P,V) __TBB_FetchAndAddW(P,V) 314 #define __TBB_FetchAndIncrementWacquire(P) __TBB_FetchAndAddW(P,1) 315 #define __TBB_FetchAndDecrementWrelease(P) __TBB_FetchAndAddW(P,(-1)) 318 #if __TBB_WORDSIZE==4 319 #define __TBB_CompareAndSwapW(P,V,C) __TBB_machine_cmpswp4(P,V,C) 320 #define __TBB_FetchAndAddW(P,V) __TBB_machine_fetchadd4(P,V) 321 #define __TBB_FetchAndStoreW(P,V) __TBB_machine_fetchstore4(P,V) 322 #elif __TBB_WORDSIZE==8 323 #if __TBB_USE_GENERIC_DWORD_LOAD_STORE || __TBB_USE_GENERIC_DWORD_FETCH_ADD || __TBB_USE_GENERIC_DWORD_FETCH_STORE 324 #error These macros should only be used on 32-bit platforms. 327 #define __TBB_CompareAndSwapW(P,V,C) __TBB_machine_cmpswp8(P,V,C) 328 #define __TBB_FetchAndAddW(P,V) __TBB_machine_fetchadd8(P,V) 329 #define __TBB_FetchAndStoreW(P,V) __TBB_machine_fetchstore8(P,V) 331 #error Unsupported machine word size. 394 template<
typename T,
typename U>
402 template<
typename T,
typename U>
408 template <
typename predicate_type>
411 while( condition() ) backoff.
pause();
417 #ifndef __TBB_ENDIANNESS 418 #define __TBB_ENDIANNESS __TBB_ENDIAN_DETECT 421 #if __TBB_USE_GENERIC_PART_WORD_CAS && __TBB_ENDIANNESS==__TBB_ENDIAN_UNSUPPORTED 422 #error Generic implementation of part-word CAS may not be used with __TBB_ENDIAN_UNSUPPORTED 425 #if __TBB_ENDIANNESS!=__TBB_ENDIAN_UNSUPPORTED 437 struct endianness{
static bool is_big_endian(){
438 #if __TBB_ENDIANNESS==__TBB_ENDIAN_DETECT 439 const uint32_t probe = 0x03020100;
440 return (((
const char*)(&probe))[0]==0x03);
441 #elif __TBB_ENDIANNESS==__TBB_ENDIAN_BIG || __TBB_ENDIANNESS==__TBB_ENDIAN_LITTLE 444 #error Unexpected value of __TBB_ENDIANNESS 448 const uint32_t byte_offset = (uint32_t) ((uintptr_t)ptr & 0x3);
449 volatile uint32_t *
const aligned_ptr = (uint32_t*)((uintptr_t)ptr - byte_offset );
452 const uint32_t bits_to_shift = 8*(endianness::is_big_endian() ? (4 -
sizeof(T) - (byte_offset)) : byte_offset);
453 const uint32_t
mask = (((uint32_t)1<<(
sizeof(T)*8)) - 1 )<<bits_to_shift;
455 const uint32_t shifted_comparand = ((uint32_t)comparand << bits_to_shift)&
mask;
456 const uint32_t shifted_value = ((uint32_t)
value << bits_to_shift)&
mask;
459 const uint32_t surroundings = *aligned_ptr & ~
mask ;
460 const uint32_t big_comparand = surroundings | shifted_comparand ;
461 const uint32_t big_value = surroundings | shifted_value ;
464 const uint32_t big_result = (uint32_t)
__TBB_machine_cmpswp4( aligned_ptr, big_value, big_comparand );
465 if( big_result == big_comparand
466 || ((big_result ^ big_comparand) &
mask) != 0)
468 return T((big_result &
mask) >> bits_to_shift);
473 #endif // __TBB_ENDIANNESS!=__TBB_ENDIAN_UNSUPPORTED 476 template<
size_t S,
typename T>
481 #if __TBB_USE_GENERIC_PART_WORD_CAS 482 return __TBB_MaskedCompareAndSwap<int8_t>((
volatile int8_t *)ptr,
value,comparand);
490 #if __TBB_USE_GENERIC_PART_WORD_CAS 491 return __TBB_MaskedCompareAndSwap<int16_t>((
volatile int16_t *)ptr,
value,comparand);
503 #if __TBB_64BIT_ATOMICS 510 template<
size_t S,
typename T>
514 result = *reinterpret_cast<volatile T *>(ptr);
516 if( __TBB_CompareAndSwapGeneric<S,T> ( ptr, result+addend, result )==result )
522 template<
size_t S,
typename T>
526 result = *reinterpret_cast<volatile T *>(ptr);
528 if( __TBB_CompareAndSwapGeneric<S,T> ( ptr,
value, result )==result )
534 #if __TBB_USE_GENERIC_PART_WORD_CAS 535 #define __TBB_machine_cmpswp1 tbb::internal::__TBB_CompareAndSwapGeneric<1,int8_t> 536 #define __TBB_machine_cmpswp2 tbb::internal::__TBB_CompareAndSwapGeneric<2,int16_t> 539 #if __TBB_USE_GENERIC_FETCH_ADD || __TBB_USE_GENERIC_PART_WORD_FETCH_ADD 540 #define __TBB_machine_fetchadd1 tbb::internal::__TBB_FetchAndAddGeneric<1,int8_t> 541 #define __TBB_machine_fetchadd2 tbb::internal::__TBB_FetchAndAddGeneric<2,int16_t> 544 #if __TBB_USE_GENERIC_FETCH_ADD 545 #define __TBB_machine_fetchadd4 tbb::internal::__TBB_FetchAndAddGeneric<4,int32_t> 548 #if __TBB_USE_GENERIC_FETCH_ADD || __TBB_USE_GENERIC_DWORD_FETCH_ADD 549 #define __TBB_machine_fetchadd8 tbb::internal::__TBB_FetchAndAddGeneric<8,int64_t> 552 #if __TBB_USE_GENERIC_FETCH_STORE || __TBB_USE_GENERIC_PART_WORD_FETCH_STORE 553 #define __TBB_machine_fetchstore1 tbb::internal::__TBB_FetchAndStoreGeneric<1,int8_t> 554 #define __TBB_machine_fetchstore2 tbb::internal::__TBB_FetchAndStoreGeneric<2,int16_t> 557 #if __TBB_USE_GENERIC_FETCH_STORE 558 #define __TBB_machine_fetchstore4 tbb::internal::__TBB_FetchAndStoreGeneric<4,int32_t> 561 #if __TBB_USE_GENERIC_FETCH_STORE || __TBB_USE_GENERIC_DWORD_FETCH_STORE 562 #define __TBB_machine_fetchstore8 tbb::internal::__TBB_FetchAndStoreGeneric<8,int64_t> 565 #if __TBB_USE_FETCHSTORE_AS_FULL_FENCED_STORE 566 #define __TBB_MACHINE_DEFINE_ATOMIC_SELECTOR_FETCH_STORE(S) \ 567 atomic_selector<S>::word atomic_selector<S>::fetch_store ( volatile void* location, word value ) { \ 568 return __TBB_machine_fetchstore##S( location, value ); \ 571 __TBB_MACHINE_DEFINE_ATOMIC_SELECTOR_FETCH_STORE(1)
572 __TBB_MACHINE_DEFINE_ATOMIC_SELECTOR_FETCH_STORE(2)
573 __TBB_MACHINE_DEFINE_ATOMIC_SELECTOR_FETCH_STORE(4)
574 __TBB_MACHINE_DEFINE_ATOMIC_SELECTOR_FETCH_STORE(8)
576 #undef __TBB_MACHINE_DEFINE_ATOMIC_SELECTOR_FETCH_STORE 579 #if __TBB_USE_GENERIC_DWORD_LOAD_STORE 581 #if ! __TBB_USE_FENCED_ATOMICS 584 #define __TBB_machine_cmpswp8full_fence __TBB_machine_cmpswp8 589 #if ! __TBB_USE_FENCED_ATOMICS 590 #undef __TBB_machine_cmpswp8full_fence 593 #define __TBB_machine_store8 tbb::internal::__TBB_machine_generic_store8full_fence 594 #define __TBB_machine_load8 tbb::internal::__TBB_machine_generic_load8full_fence 597 #if __TBB_USE_GENERIC_HALF_FENCED_LOAD_STORE 608 template <
typename T,
size_t S>
611 T to_return = location;
622 #if __TBB_WORDSIZE==4 && __TBB_64BIT_ATOMICS 623 template <
typename T>
624 struct machine_load_store<T,8> {
635 #if __TBB_USE_GENERIC_SEQUENTIAL_CONSISTENCY_LOAD_STORE 636 template <
typename T,
size_t S>
637 struct machine_load_store_seq_cst {
638 static T
load (
const volatile T& location ) {
642 #if __TBB_USE_FETCHSTORE_AS_FULL_FENCED_STORE 643 static void store (
volatile T &location, T
value ) {
647 static void store (
volatile T &location, T
value ) {
654 #if __TBB_WORDSIZE==4 && __TBB_64BIT_ATOMICS 657 template <
typename T>
658 struct machine_load_store_seq_cst<T,8> {
659 static T
load (
const volatile T& location ) {
662 const int64_t anyvalue = 2305843009213693951LL;
663 return __TBB_machine_cmpswp8( (
volatile void*)const_cast<volatile T*>(&location), anyvalue, anyvalue );
665 static void store (
volatile T &location, T
value ) {
666 #if __TBB_GCC_VERSION >= 40702 667 #pragma GCC diagnostic push 668 #pragma GCC diagnostic ignored "-Wmaybe-uninitialized" 671 int64_t result = (
volatile int64_t&)location;
672 #if __TBB_GCC_VERSION >= 40702 673 #pragma GCC diagnostic pop 676 result = (
volatile int64_t&)location;
682 #if __TBB_USE_GENERIC_RELAXED_LOAD_STORE 687 template <
typename T,
size_t S>
688 struct machine_load_store_relaxed {
689 static inline T
load (
const volatile T& location ) {
692 static inline void store (
volatile T& location, T
value ) {
697 #if __TBB_WORDSIZE==4 && __TBB_64BIT_ATOMICS 698 template <
typename T>
699 struct machine_load_store_relaxed<T,8> {
700 static inline T
load (
const volatile T& location ) {
703 static inline void store (
volatile T& location, T
value ) {
710 #undef __TBB_WORDSIZE //this macro is forbidden to use outside of atomic machinery 716 template<
typename T,
typename V>
729 template<
typename T,
typename V>
742 template<
typename T,
typename V>
758 #ifndef __TBB_TypeWithAlignmentAtLeastAsStrict 760 #if __TBB_ALIGNAS_PRESENT 763 #define __TBB_DefineTypeWithAlignment(PowerOf2) \ 764 struct alignas(PowerOf2) __TBB_machine_type_with_alignment_##PowerOf2 { \ 765 uint32_t member[PowerOf2/sizeof(uint32_t)]; \ 767 #define __TBB_alignof(T) alignof(T) 769 #elif __TBB_ATTRIBUTE_ALIGNED_PRESENT 771 #define __TBB_DefineTypeWithAlignment(PowerOf2) \ 772 struct __TBB_machine_type_with_alignment_##PowerOf2 { \ 773 uint32_t member[PowerOf2/sizeof(uint32_t)]; \ 774 } __attribute__((aligned(PowerOf2))); 775 #define __TBB_alignof(T) __alignof__(T) 777 #elif __TBB_DECLSPEC_ALIGN_PRESENT 779 #define __TBB_DefineTypeWithAlignment(PowerOf2) \ 780 __declspec(align(PowerOf2)) \ 781 struct __TBB_machine_type_with_alignment_##PowerOf2 { \ 782 uint32_t member[PowerOf2/sizeof(uint32_t)]; \ 784 #define __TBB_alignof(T) __alignof(T) 787 #error Must define __TBB_TypeWithAlignmentAtLeastAsStrict(T) 796 typedef __TBB_machine_type_with_alignment_64 __TBB_machine_type_with_strictest_alignment;
810 #if __TBB_ALIGNOF_NOT_INSTANTIATED_TYPES_BROKEN 814 template<
size_t Size,
typename T>
815 struct work_around_alignment_bug {
818 #define __TBB_TypeWithAlignmentAtLeastAsStrict(T) tbb::internal::type_with_alignment<tbb::internal::work_around_alignment_bug<sizeof(T),T>::alignment> 820 #define __TBB_TypeWithAlignmentAtLeastAsStrict(T) tbb::internal::type_with_alignment<__TBB_alignof(T)> 834 0x00, 0x80, 0x40, 0xC0, 0x20, 0xA0, 0x60, 0xE0, 0x10, 0x90, 0x50, 0xD0, 0x30, 0xB0, 0x70, 0xF0,
835 0x08, 0x88, 0x48, 0xC8, 0x28, 0xA8, 0x68, 0xE8, 0x18, 0x98, 0x58, 0xD8, 0x38, 0xB8, 0x78, 0xF8,
836 0x04, 0x84, 0x44, 0xC4, 0x24, 0xA4, 0x64, 0xE4, 0x14, 0x94, 0x54, 0xD4, 0x34, 0xB4, 0x74, 0xF4,
837 0x0C, 0x8C, 0x4C, 0xCC, 0x2C, 0xAC, 0x6C, 0xEC, 0x1C, 0x9C, 0x5C, 0xDC, 0x3C, 0xBC, 0x7C, 0xFC,
838 0x02, 0x82, 0x42, 0xC2, 0x22, 0xA2, 0x62, 0xE2, 0x12, 0x92, 0x52, 0xD2, 0x32, 0xB2, 0x72, 0xF2,
839 0x0A, 0x8A, 0x4A, 0xCA, 0x2A, 0xAA, 0x6A, 0xEA, 0x1A, 0x9A, 0x5A, 0xDA, 0x3A, 0xBA, 0x7A, 0xFA,
840 0x06, 0x86, 0x46, 0xC6, 0x26, 0xA6, 0x66, 0xE6, 0x16, 0x96, 0x56, 0xD6, 0x36, 0xB6, 0x76, 0xF6,
841 0x0E, 0x8E, 0x4E, 0xCE, 0x2E, 0xAE, 0x6E, 0xEE, 0x1E, 0x9E, 0x5E, 0xDE, 0x3E, 0xBE, 0x7E, 0xFE,
842 0x01, 0x81, 0x41, 0xC1, 0x21, 0xA1, 0x61, 0xE1, 0x11, 0x91, 0x51, 0xD1, 0x31, 0xB1, 0x71, 0xF1,
843 0x09, 0x89, 0x49, 0xC9, 0x29, 0xA9, 0x69, 0xE9, 0x19, 0x99, 0x59, 0xD9, 0x39, 0xB9, 0x79, 0xF9,
844 0x05, 0x85, 0x45, 0xC5, 0x25, 0xA5, 0x65, 0xE5, 0x15, 0x95, 0x55, 0xD5, 0x35, 0xB5, 0x75, 0xF5,
845 0x0D, 0x8D, 0x4D, 0xCD, 0x2D, 0xAD, 0x6D, 0xED, 0x1D, 0x9D, 0x5D, 0xDD, 0x3D, 0xBD, 0x7D, 0xFD,
846 0x03, 0x83, 0x43, 0xC3, 0x23, 0xA3, 0x63, 0xE3, 0x13, 0x93, 0x53, 0xD3, 0x33, 0xB3, 0x73, 0xF3,
847 0x0B, 0x8B, 0x4B, 0xCB, 0x2B, 0xAB, 0x6B, 0xEB, 0x1B, 0x9B, 0x5B, 0xDB, 0x3B, 0xBB, 0x7B, 0xFB,
848 0x07, 0x87, 0x47, 0xC7, 0x27, 0xA7, 0x67, 0xE7, 0x17, 0x97, 0x57, 0xD7, 0x37, 0xB7, 0x77, 0xF7,
849 0x0F, 0x8F, 0x4F, 0xCF, 0x2F, 0xAF, 0x6F, 0xEF, 0x1F, 0x9F, 0x5F, 0xDF, 0x3F, 0xBF, 0x7F, 0xFF
860 #define __TBB_load_acquire __TBB_load_with_acquire 861 #define __TBB_store_release __TBB_store_with_release 865 if( x==0 )
return -1;
870 if(
sizeof(x)>4 && (tmp_ = ((uint64_t)x)>>32) ) { x=tmp_; result += 32; }
872 if( uintptr_t tmp = x>>16 ) { x=tmp; result += 16; }
873 if( uintptr_t tmp = x>>8 ) { x=tmp; result += 8; }
874 if( uintptr_t tmp = x>>4 ) { x=tmp; result += 4; }
875 if( uintptr_t tmp = x>>2 ) { x=tmp; result += 2; }
877 return (x&2)? result+1: result;
881 #ifndef __TBB_AtomicOR 884 uintptr_t tmp = *(
volatile uintptr_t *)operand;
885 uintptr_t result = __TBB_CompareAndSwapW(operand, tmp|addend, tmp);
886 if( result==tmp )
break;
891 #ifndef __TBB_AtomicAND 894 uintptr_t tmp = *(
volatile uintptr_t *)operand;
895 uintptr_t result = __TBB_CompareAndSwapW(operand, tmp&addend, tmp);
896 if( result==tmp )
break;
901 #if __TBB_PREFETCHING 902 #ifndef __TBB_cl_prefetch 903 #error This platform does not define cache management primitives required for __TBB_PREFETCHING 906 #ifndef __TBB_cl_evict 907 #define __TBB_cl_evict(p) 916 #ifndef __TBB_TryLockByte 922 #ifndef __TBB_LockByte 930 #ifndef __TBB_UnlockByte 931 #define __TBB_UnlockByte(addr) __TBB_store_with_release((addr),0) 935 #if ( __TBB_x86_32 || __TBB_x86_64 ) 943 if( !res ) __TBB_TryLockByteElidedCancel();
955 __TBB_TryLockByteElidedCancel();
964 #ifndef __TBB_ReverseByte 973 unsigned char *original = (
unsigned char *) &src;
974 unsigned char *reversed = (
unsigned char *) &dst;
976 for(
int i =
sizeof(T)-1; i >= 0; i-- )
static void store_with_release(volatile T &location, T value)
void __TBB_EXPORTED_FUNC __TBB_machine_store8(volatile void *ptr, __int64 value)
T __TBB_load_full_fence(const volatile T &location)
#define __TBB_MACHINE_DEFINE_STORE8_GENERIC_FENCED(M)
__TBB_atomic __TBB_Flag __TBB_atomic_flag
__int64 __TBB_EXPORTED_FUNC __TBB_machine_load8(const volatile void *ptr)
static const T byte_table[256]
bool __TBB_TryLockByte(__TBB_atomic_flag &flag)
T __TBB_load_with_acquire(const volatile T &location)
int8_t __TBB_CompareAndSwapGeneric< 1, int8_t >(volatile void *ptr, int8_t value, int8_t comparand)
static const int32_t LOOPS_BEFORE_YIELD
Time delay, in units of "pause" instructions.
static void store(volatile T &location, T value)
bool bounded_pause()
Pause for a few times and return false if saturated.
T __TBB_MaskedCompareAndSwap(volatile T *const ptr, const T value, const T comparand)
Base class for types that should not be copied or assigned.
unsigned char __TBB_ReverseByte(unsigned char src)
int16_t __TBB_CompareAndSwapGeneric< 2, int16_t >(volatile void *ptr, int16_t value, int16_t comparand)
__TBB_machine_type_with_alignment_32 member
void pause()
Pause for a while.
void __TBB_AtomicAND(volatile void *operand, uintptr_t addend)
int32_t __TBB_CompareAndSwapGeneric< 4, int32_t >(volatile void *ptr, int32_t value, int32_t comparand)
__TBB_DefineTypeWithAlignment(8) __TBB_DefineTypeWithAlignment(16) __TBB_DefineTypeWithAlignment(32) __TBB_DefineTypeWithAlignment(64) typedef __TBB_machine_type_with_alignment_64 __TBB_machine_type_with_strictest_alignment
__int16 __TBB_EXPORTED_FUNC __TBB_machine_cmpswp2(volatile void *ptr, __int16 value, __int16 comparand)
void store(atomic< T > &a, T value)
T load(const atomic< T > &a)
void atomic_fence()
Sequentially consistent full memory fence.
T __TBB_ReverseBits(T src)
void __TBB_store_full_fence(volatile T &location, V value)
__TBB_machine_type_with_alignment_64 member
static T load_with_acquire(const volatile T &location)
#define __TBB_acquire_consistency_helper()
#define __TBB_full_memory_fence()
static T load(const volatile T &location)
void __TBB_store_relaxed(volatile T &location, V value)
intptr_t __TBB_Log2(uintptr_t x)
#define __TBB_MACHINE_DEFINE_LOAD8_GENERIC_FENCED(M)
#define __TBB_release_consistency_helper()
__TBB_atomic __TBB_Flag __TBB_atomic_flag
void __TBB_EXPORTED_FUNC __TBB_machine_unlock_elided(volatile void *ptr)
T __TBB_FetchAndStoreGeneric(volatile void *ptr, T value)
__int8 __TBB_EXPORTED_FUNC __TBB_machine_cmpswp1(volatile void *ptr, __int8 value, __int8 comparand)
void spin_wait_while_eq(const volatile T &location, U value)
Spin WHILE the value of the variable is equal to a given value.
__declspec(dllimport) int __stdcall SwitchToThread(void)
int64_t __TBB_CompareAndSwapGeneric< 8, int64_t >(volatile void *ptr, int64_t value, int64_t comparand)
void const char const char int ITT_FORMAT __itt_group_sync x void const char ITT_FORMAT __itt_group_sync s void ITT_FORMAT __itt_group_sync p void ITT_FORMAT p void ITT_FORMAT p no args __itt_suppress_mode_t unsigned int void size_t ITT_FORMAT d void ITT_FORMAT p void ITT_FORMAT p __itt_model_site __itt_model_site_instance ITT_FORMAT p __itt_model_task __itt_model_task_instance ITT_FORMAT p void ITT_FORMAT p void ITT_FORMAT p void size_t ITT_FORMAT d void ITT_FORMAT p const wchar_t ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s no args void ITT_FORMAT p size_t ITT_FORMAT d no args const wchar_t const wchar_t ITT_FORMAT s __itt_heap_function void size_t int ITT_FORMAT d __itt_heap_function void ITT_FORMAT p __itt_heap_function void void size_t int ITT_FORMAT d no args no args unsigned int ITT_FORMAT u const __itt_domain __itt_id ITT_FORMAT lu const __itt_domain __itt_id __itt_id __itt_string_handle ITT_FORMAT p const __itt_domain __itt_id ITT_FORMAT p const __itt_domain __itt_id __itt_timestamp __itt_timestamp ITT_FORMAT lu const __itt_domain __itt_id __itt_id __itt_string_handle ITT_FORMAT p const __itt_domain ITT_FORMAT p const __itt_domain __itt_string_handle unsigned long long value
Class that implements exponential backoff.
void spin_wait_until_eq(const volatile T &location, const U value)
Spin UNTIL the value of the variable is equal to a given value.
void spin_wait_while(predicate_type condition)
T __TBB_load_relaxed(const volatile T &location)
static void store(T &location, T value)
static void __TBB_machine_try_lock_elided_cancel()
void const char const char int ITT_FORMAT __itt_group_sync x void const char ITT_FORMAT __itt_group_sync s void ITT_FORMAT __itt_group_sync p void ITT_FORMAT p void ITT_FORMAT p no args __itt_suppress_mode_t unsigned int mask
__TBB_machine_type_with_alignment_8 member
__TBB_machine_type_with_alignment_16 member
__TBB_Flag __TBB_LockByte(__TBB_atomic_flag &flag)
T __TBB_FetchAndAddGeneric(volatile void *ptr, T addend)
T __TBB_CompareAndSwapGeneric(volatile void *ptr, T value, T comparand)
__int8 __TBB_EXPORTED_FUNC __TBB_machine_try_lock_elided(volatile void *ptr)
void __TBB_store_with_release(volatile T &location, V value)
#define __TBB_machine_cmpswp8
#define __TBB_machine_cmpswp4
void __TBB_AtomicOR(volatile void *operand, uintptr_t addend)
void __TBB_Pause(int32_t)
static T load(const T &location)