17 #if !defined(__TBB_machine_H) || defined(__TBB_msvc_armv7_H)
18 #error Do not #include this internal file directly; use public TBB headers instead.
21 #define __TBB_msvc_armv7_H
26 #define __TBB_WORDSIZE 4
28 #define __TBB_ENDIANNESS __TBB_ENDIAN_UNSUPPORTED
30 #if defined(TBB_WIN32_USE_CL_BUILTINS)
32 #pragma intrinsic(_ReadWriteBarrier)
33 #pragma intrinsic(_mm_mfence)
34 #define __TBB_compiler_fence() _ReadWriteBarrier()
35 #define __TBB_full_memory_fence() _mm_mfence()
36 #define __TBB_control_consistency_helper() __TBB_compiler_fence()
37 #define __TBB_acquire_consistency_helper() __TBB_compiler_fence()
38 #define __TBB_release_consistency_helper() __TBB_compiler_fence()
42 #define __TBB_compiler_fence() __dmb(_ARM_BARRIER_SY)
43 #define __TBB_full_memory_fence() __dmb(_ARM_BARRIER_SY)
44 #define __TBB_control_consistency_helper() __TBB_compiler_fence()
45 #define __TBB_acquire_consistency_helper() __TBB_full_memory_fence()
46 #define __TBB_release_consistency_helper() __TBB_full_memory_fence()
61 #define __TBB_MACHINE_DEFINE_ATOMICS_CMPSWP(S,T,F) \
62 inline T __TBB_machine_cmpswp##S( volatile void *ptr, T value, T comparand ) { \
63 return _InterlockedCompareExchange##F(reinterpret_cast<volatile T *>(ptr),value,comparand); \
66 #define __TBB_MACHINE_DEFINE_ATOMICS_FETCHADD(S,T,F) \
67 inline T __TBB_machine_fetchadd##S( volatile void *ptr, T value ) { \
68 return _InterlockedExchangeAdd##F(reinterpret_cast<volatile T *>(ptr),value); \
76 #if defined(TBB_WIN32_USE_CL_BUILTINS)
78 #define __TBB_64BIT_ATOMICS 0
93 #define __TBB_CPU_CTL_ENV_PRESENT 1
98 template <
typename T,
size_t S>
99 struct machine_load_store_relaxed {
100 static inline T
load (
const volatile T& location ) {
101 const T
value = location;
129 #define __TBB_CompareAndSwap4(P,V,C) __TBB_machine_cmpswp4(P,V,C)
130 #define __TBB_CompareAndSwap8(P,V,C) __TBB_machine_cmpswp8(P,V,C)
131 #define __TBB_Pause(V) __TBB_machine_pause(V)
134 #define __TBB_USE_FETCHSTORE_AS_FULL_FENCED_STORE 1
135 #define __TBB_USE_GENERIC_HALF_FENCED_LOAD_STORE 1
136 #define __TBB_USE_GENERIC_PART_WORD_FETCH_ADD 1
137 #define __TBB_USE_GENERIC_PART_WORD_FETCH_STORE 1
138 #define __TBB_USE_GENERIC_FETCH_STORE 1
139 #define __TBB_USE_GENERIC_DWORD_LOAD_STORE 1
140 #define __TBB_USE_GENERIC_SEQUENTIAL_CONSISTENCY_LOAD_STORE 1
142 #if defined(TBB_WIN32_USE_CL_BUILTINS)
143 #if !__TBB_WIN8UI_SUPPORT
144 extern "C" __declspec(dllimport)
int __stdcall SwitchToThread(
void );
145 #define __TBB_Yield() SwitchToThread()
148 #define __TBB_Yield() std::this_thread::yield()
151 #define __TBB_Yield() __yield()
155 #define __TBB_AtomicOR(P,V) __TBB_machine_OR(P,V)
156 #define __TBB_AtomicAND(P,V) __TBB_machine_AND(P,V)
158 template <
typename T1,
typename T2>
160 _InterlockedOr((
long volatile *)operand, (
long)addend);
163 template <
typename T1,
typename T2>
165 _InterlockedAnd((
long volatile *)operand, (
long)addend);
void __TBB_machine_pause(int32_t delay)
void __TBB_machine_AND(T1 *operand, T2 addend)
#define __TBB_MACHINE_DEFINE_ATOMICS_FETCHADD(S, T, F)
#define __TBB_MACHINE_DEFINE_ATOMICS_CMPSWP(S, T, F)
void __TBB_machine_OR(T1 *operand, T2 addend)
#define __TBB_acquire_consistency_helper()
#define __TBB_compiler_fence()
__declspec(dllimport) int __stdcall SwitchToThread(void)
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
bool operator!=(const cpu_ctl_env &ctl) const
static void store(volatile T &location, T value)
static T load(const volatile T &location)