![]() |
Pixie
|
A simple aligned storage for cache-line sized blocks. More...
#include <cache_line.h>
Public Member Functions | |
| AlignedStorage (size_t bits) | |
Construct storage for at least bits bytes, rounded up to 512 bits. | |
| void | resize (size_t bits) |
Resize storage to hold at least bits bits, rounded up to 512. | |
| std::span< CacheLine > | AsLines () |
| Mutable view as cache lines. | |
| std::span< const CacheLine > | AsConstLines () const |
| Const view as cache lines. | |
| std::span< uint64_t > | As64BitInts () |
| Mutable view as 64-bit words. | |
| std::span< const uint64_t > | AsConst64BitInts () const |
| Const view as 64-bit words. | |
| std::span< std::byte > | AsBytes () |
| Mutable view as bytes. | |
| std::span< const std::byte > | AsConstBytes () const |
| Const view as bytes. | |
| std::span< std::uint16_t > | As16BitInts () |
| Mutable view as bytes. | |
| std::span< const std::uint16_t > | AsConst16BitInts () const |
| Const view as bytes. | |
A simple aligned storage for cache-line sized blocks.
Provides typed views over the same underlying storage as cache lines, 64-bit words, or bytes. All spans are contiguous and sized to the total storage capacity.
|
inline |
Mutable view as bytes.
|
inline |
Mutable view as bytes.