macOS clang is buggy, it does not implement __cpp_lib_hardware_interference_size

correctly.
This commit is contained in:
Vojtech Bubnik 2023-05-02 19:26:33 +02:00
parent 0c6f2261a3
commit d0f38cd0b4

View File

@ -36,7 +36,7 @@
#include <boost/thread/mutex.hpp>
#include <boost/thread/lock_guard.hpp>
#ifdef __cpp_lib_hardware_interference_size
#if defined(__cpp_lib_hardware_interference_size) && ! defined(__APPLE__)
using std::hardware_destructive_interference_size;
#else
// 64 bytes on x86-64 │ L1_CACHE_BYTES │ L1_CACHE_SHIFT │ __cacheline_aligned │ ...