18#ifndef SEQAN3_HAS_MM_PAUSE
19# if defined(__SSE2__) && __has_include(<xmmintrin.h>)
20# include <xmmintrin.h>
21# define SEQAN3_HAS_MM_PAUSE 1
28namespace seqan3::detail
47 constexpr spin_delay() noexcept = default;
48 constexpr spin_delay(spin_delay const &) noexcept = default;
49 constexpr spin_delay(spin_delay &&) noexcept = default;
50 constexpr spin_delay & operator=(spin_delay const &) noexcept = default;
51 constexpr spin_delay & operator=(spin_delay &&) noexcept = default;
52 ~spin_delay() noexcept = default;
65 if (current <= max_repetitions)
67 for (int_fast32_t i = 0; i < current; ++i)
79 void pause_processor()
81#if SEQAN3_HAS_MM_PAUSE
83#elif defined(__armel__) \
85 asm volatile(
"nop" :::
"memory");
86#elif defined(__arm__) || defined(__aarch64__)
87 __asm__ __volatile__(
"yield" :::
"memory");
88#elif defined(__ia64__)
89 __asm__ __volatile__(
"hint @pause");
90#elif defined(__powerpc__) || defined(__ppc__) || defined(__PPC__)
91 __asm__ __volatile__(
"or 27,27,27" :::
"memory");
93 asm volatile(
"nop" :::
"memory");
98 static constexpr int_fast32_t max_repetitions{16};
100 int_fast32_t current{1};