tetl 0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
hardware_interference_size.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: BSL-1.0
2
3#ifndef TETL_NEW_HARDWARE_INTERFERENCE_SIZE_HPP
4#define TETL_NEW_HARDWARE_INTERFERENCE_SIZE_HPP
5
7
11#if defined(__aarch64__)
12 #define TETL_CACHELINE_SIZE 64
13#elif defined(__ARM_ARCH_5T__)
14 #define TETL_CACHELINE_SIZE 32
15#elif defined(__ARM_ARCH_7A__)
16 #define TETL_CACHELINE_SIZE 64
17#elif defined(__PPC64__)
18 #define TETL_CACHELINE_SIZE 128
19#elif defined(__i386__) || defined(__x86_64__)
20 #define TETL_CACHELINE_SIZE 64
21#else
22 #define TETL_CACHELINE_SIZE alignof(max_align_t)
23#endif
24
25namespace etl {
26
30
34
35} // namespace etl
36
37#endif // TETL_NEW_HARDWARE_INTERFERENCE_SIZE_HPP
#define TETL_CACHELINE_SIZE
Cache line sizes for ARM values are not strictly correct since cache line sizes depend on implementat...
Definition hardware_interference_size.hpp:22
Definition adjacent_find.hpp:8
constexpr auto hardware_constructive_interference_size
Minimum offset between two objects to avoid false sharing. Guaranteed to be at least alignof(max_alig...
Definition hardware_interference_size.hpp:29
constexpr auto hardware_destructive_interference_size
Maximum size of contiguous memory to promote true sharing. Guaranteed to be at least alignof(max_alig...
Definition hardware_interference_size.hpp:33