|
Continuum C++ API
Unified runtime for token + tensor execution
|
#include <prefetch.hpp>
Public Member Functions | |
| FutureCache (std::size_t max_entries=256, std::chrono::milliseconds ttl=std::chrono::milliseconds(30000)) | |
| std::optional< std::vector< std::uint8_t > > | get (const std::string &key) const |
| void | put (const std::string &key, std::vector< std::uint8_t > output) |
| bool | has (const std::string &key) const |
| void | invalidate (const std::string &key) |
| 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, outputs, and per-entry overhead. | |
Speculative-prefetch tier.
Eviction: time-to-live first, then first-in-first-out. Entries older than ttl are invisible to get / has and are purged on the next put; if the table still exceeds max_entries the oldest-created entry is dropped.
|
explicit |
| void continuum::runtime::FutureCache::clear | ( | ) |
| std::size_t continuum::runtime::FutureCache::estimated_bytes | ( | ) | const |
Approximate resident bytes: keys, outputs, and per-entry overhead.
| std::optional< std::vector< std::uint8_t > > continuum::runtime::FutureCache::get | ( | const std::string & | key | ) | const |
| bool continuum::runtime::FutureCache::has | ( | const std::string & | key | ) | const |
| void continuum::runtime::FutureCache::invalidate | ( | const std::string & | key | ) |
|
inline |
Capacity in entries passed at construction.
| void continuum::runtime::FutureCache::put | ( | const std::string & | key, |
| std::vector< std::uint8_t > | output | ||
| ) |
| std::size_t continuum::runtime::FutureCache::size | ( | ) | const |