|
tess 0.4.0
Performance-first tile and path simulation substrate
|
#include <tess/path/field_product_cache.h>
Public Member Functions | |
| FieldProductCache (std::size_t byte_budget=std::numeric_limits< std::size_t >::max()) noexcept | |
| void | set_byte_budget (std::size_t byte_budget) |
| void | reserve_entries (std::size_t count) |
| void | clear () noexcept |
| void | reset_stats () noexcept |
| auto | stats () const noexcept -> FieldProductCacheStats |
| template<typename World, typename Tag> | |
| auto | lookup (const World &world, const GoalSet &goals) -> const DistanceFieldProduct * |
| template<typename World, typename Tag> | |
| auto | store (DistanceFieldProduct &&product) -> bool |
Owns LRU-cached distance-field products within a configurable byte budget.
Entries are keyed by field type, shape, and goals, but not by world identity; use one cache per world. Lookup pointers remain cache-owned and are invalidated when their entry is replaced, evicted, or cleared.