diff options
Diffstat (limited to 'boost/context/detail/config.hpp')
-rw-r--r-- | boost/context/detail/config.hpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/boost/context/detail/config.hpp b/boost/context/detail/config.hpp index 84dd238100..15d03574b1 100644 --- a/boost/context/detail/config.hpp +++ b/boost/context/detail/config.hpp @@ -104,4 +104,15 @@ # endif #endif +#if ! defined(BOOST_NO_CXX11_CONSTEXPR) +// modern architectures have cachelines with 64byte length +// ARM Cortex-A15 32/64byte, Cortex-A9 16/32/64bytes +// MIPS 74K: 32byte, 4KEc: 16byte +// ist should be safe to use 64byte for all +static constexpr std::size_t cache_alignment{ 64 }; +static constexpr std::size_t cacheline_length{ 64 }; +// lookahead size for prefetching +static constexpr std::size_t prefetch_stride{ 4 * cacheline_length }; +#endif + #endif // BOOST_CONTEXT_DETAIL_CONFIG_H |