|
Continuum C++ API
Unified runtime for token + tensor execution
|
#include <memo_table.hpp>
Public Member Functions | |
| MemoTable (std::size_t max_entries=4096, std::size_t version=0) | |
| std::optional< MemoEntry > | lookup (const MemoKey &key) const |
| void | insert (MemoKey key, MemoEntry entry) |
| void | invalidate_version (std::size_t version) |
| void | invalidate_node (const std::string &node_kind_str) |
| void | clear () |
| std::size_t | size () const |
| std::size_t | max_entries () const |
| Capacity in entries passed at construction. | |
| std::size_t | estimated_bytes () const |
| Approximate resident bytes: keys, cached outputs, and per-entry overhead. | |
| std::size_t | version () const |
| void | set_version (std::size_t v) |
| MemoKey | make_key (const ir::Node &node, const std::vector< continuum::Value > &inputs, const std::string &cache_namespace={}) const |
Static Public Member Functions | |
| static std::vector< std::uint8_t > | serialize_value (const continuum::Value &v) |
| static std::optional< continuum::Value > | deserialize_value (const std::vector< std::uint8_t > &bytes) |
Exact-match memo tier.
Eviction: least-recently-used. lookup hits and insert both refresh an entry's recency; once size() would exceed max_entries the entry with the oldest access is dropped. Stale-version entries are dropped lazily on lookup or eagerly via invalidate_version.
|
explicit |
| void continuum::runtime::MemoTable::clear | ( | ) |
|
static |
| std::size_t continuum::runtime::MemoTable::estimated_bytes | ( | ) | const |
Approximate resident bytes: keys, cached outputs, and per-entry overhead.
| void continuum::runtime::MemoTable::invalidate_node | ( | const std::string & | node_kind_str | ) |
| void continuum::runtime::MemoTable::invalidate_version | ( | std::size_t | version | ) |
| MemoKey continuum::runtime::MemoTable::make_key | ( | const ir::Node & | node, |
| const std::vector< continuum::Value > & | inputs, | ||
| const std::string & | cache_namespace = {} |
||
| ) | const |
|
inline |
Capacity in entries passed at construction.
|
static |
| void continuum::runtime::MemoTable::set_version | ( | std::size_t | v | ) |
| std::size_t continuum::runtime::MemoTable::size | ( | ) | const |
| std::size_t continuum::runtime::MemoTable::version | ( | ) | const |