|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Phase 15 tile-based out-of-core storage for Aleph::CA.
More...
#include <array>#include <cstddef>#include <cstdint>#include <cstring>#include <filesystem>#include <fstream>#include <list>#include <string>#include <type_traits>#include <unordered_map>#include <utility>#include <vector>#include <ah-errors.H>#include <ca-traits.H>Go to the source code of this file.
Classes | |
| struct | Aleph::CA::Tile_Cache_Stats |
Statistics surfaced by Tile_Cache::stats(). More... | |
| class | Aleph::CA::Tile_Cache< State, TileSide > |
| Out-of-core 2D tile cache with LRU eviction. More... | |
| struct | Aleph::CA::Tile_Cache< State, TileSide >::Tile_Entry |
Namespaces | |
| namespace | Aleph |
| Main namespace for Aleph-w library functions. | |
| namespace | Aleph::CA |
| namespace | Aleph::CA::ca_stream_detail |
Functions | |
| constexpr std::uint64_t | Aleph::CA::ca_stream_detail::tile_key (const std::uint32_t row, const std::uint32_t col) noexcept |
Pack (row, col) into a stable 64-bit key for the tile map. | |
Phase 15 tile-based out-of-core storage for Aleph::CA.
Tile_Cache<State, TileSide> exposes a logical 2D grid of any size while keeping only a bounded set of resident tiles in RAM. Tiles that fall out of the LRU cache are evicted to disk as raw little-endian binary files; subsequent accesses page them back in transparently.
The cache is intentionally simple compared to a full mmap-backed engine: it favours portability (works on any filesystem with no POSIX dependencies) and inspectability (each tile is a separate file you can examine with a hex dump). When more aggressive out-of-core performance is required, the same tile layout can be consumed by a custom mmap loader without changing client code.
Design contract:
TileSide (compile-time constant).TileSide. Out-of-bound tiles are not allocated.tile_<row>_<col>.bin, with TileSide * TileSide * sizeof(State) raw bytes.Typical usage:
Definition in file ca-streaming-storage.H.