qb  2.0.0.0
C++17 Actor Framework
qb Issue Watch Star Fork Follow @isndev
Loading...
Searching...
No Matches

Utilities for querying CPU and system properties. More...

Collaboration diagram for System Information:

Functions

constexpr std::size_t cache_line_size ()
 Determines the optimal cache line size for the current platform at compile time.

Detailed Description

Utilities for querying CPU and system properties.

Contains `qb::CPU` and `qb::endian`.

Function Documentation

◆ cache_line_size()

std::size_t cache_line_size ( )
constexpr

Determines the optimal cache line size for the current platform at compile time.

Returns
The cache line size in bytes.

Uses KNOWN_L1_CACHE_LINE_SIZE if defined, std::hardware_destructive_interference_size if available (C++17), or defaults to 64 bytes as a common fallback. This value is used to define QB_LOCKFREE_CACHELINE_BYTES.