Donner SVG main
0.8.0 ยท 766e862a0.8.0 main
SVG editor and embeddable C⁠+⁠+⁠20 engine.
Loading...
Searching...
No Matches
FalseSharing.h File Reference

The alignment that keeps data written by different threads off one cache line. More...

#include <cstddef>
Include dependency graph for FalseSharing.h:
This graph shows which files directly or indirectly include this file:

Namespaces

namespace  donner
 Top-level Donner namespace, which is split into different sub-namespaces such as donner::svg and donner::css.

Variables

constexpr std::size_t donner::tasks::kFalseSharingBytes = 128
 Bytes that separate data different threads write, so a write by one does not invalidate a line another is reading.

Detailed Description

The alignment that keeps data written by different threads off one cache line.

Variable Documentation

◆ kFalseSharingBytes

std::size_t donner::tasks::kFalseSharingBytes = 128
inlineconstexpr

Bytes that separate data different threads write, so a write by one does not invalidate a line another is reading.

128 rather than one 64-byte line: some cores fetch lines in adjacent pairs, and Apple silicon's lines are 128 bytes. Used as an alignas value.