16 #include <xmmintrin.h> 39 constexpr spin_delay() noexcept = default;
40 constexpr spin_delay(spin_delay const &) noexcept = default;
41 constexpr spin_delay(spin_delay &&) noexcept = default;
42 constexpr spin_delay & operator=(spin_delay const &) noexcept = default;
43 constexpr spin_delay & operator=(spin_delay &&) noexcept = default;
44 ~spin_delay() noexcept = default;
56 if (current <= max_repetitions)
58 for (int_fast32_t i = 0; i < current; ++i)
71 void pause_processor()
73 #if defined(__SSE2__) // AMD and Intel 75 #elif defined(__ia64__) // IA64 76 __asm__ __volatile__ (
"hint @pause");
77 #else // everything else. 78 asm volatile (
"nop" :::
"memory");
83 static constexpr int_fast32_t max_repetitions{16};
85 int_fast32_t current{1};
Definition: aligned_sequence_concept.hpp:35