nx_engram.nx
buildroot/runtime/nx_engram.nx
about
nx_engram.nx -- short-term memory / cache (hippocampal-class).
Biology: an engram is a physical/chemical change that represents
a stored memory. Hippocampal short-term memory consolidates into
long-term storage via repeated activation.
dependencies 2 imports · 1 importers
imports: nx_syscalls.nxnx_tier.nx
imported by: nx_engram_test.nx
structs
| 17 | struct NxEngramEntry |
| 28 | struct NxEngramCache |
consts
| 10 | const NX_EG_V_OK: nx_int = 0 |
| 11 | const NX_EG_V_HIT: nx_int = 1 |
| 12 | const NX_EG_V_MISS: nx_int = 2 |
| 13 | const NX_EG_V_EVICTED: nx_int = 3 |
| 14 | const NX_EG_V_NULL: nx_int = 4 |
| 15 | const NX_EG_V_N: nx_int = 5 |
| 26 | const NX_EG_ENT_BYTES: nx_int = 40 |
| 35 | const NX_EG_CACHE_BYTES: nx_int = 32 |
functions
| 37 | func nx_eg_v_is_valid(v: nx_int) -> nx_int called by 1: main |
| 43 | func _eg_at(c: *NxEngramCache, idx: nx_int) -> *NxEngramEntry |
| 49 | func nx_eg_cache_new(capacity: nx_int) -> *NxEngramCache |
| 60 | func nx_eg_find(c: *NxEngramCache, key_hash: nx_size) -> *NxEngramEntry |
| 71 | func nx_eg_insert(c: *NxEngramCache, |
| 103 | func nx_eg_lookup(c: *NxEngramCache, |
| 117 | func nx_eg_value_of(c: *NxEngramCache, key_hash: nx_size) -> nx_size |
| 124 | func nx_eg_should_consolidate(c: *NxEngramCache, key_hash: nx_size) -> nx_int |