Reference
API Reference
Public interface shapes share the same four operations: LOAD, ACCUM, READ, SWAP. Treat kernel and hardware paths as evaluation surfaces until a workload-specific proof plan is agreed.
Python
pip install atomik-core- ▸ AtomikContext
- ▸ AtomikTable
- ▸ DeltaStream
- ▸ Fingerprint
C
#include "atomik_core.h"- ▸ atomik_ctx_t
- ▸ atomik_table_t
- ▸ atomik_fingerprint_t
Kernel Module
review software/atomik_kmod- ▸ ATOMIK_IOC_LOAD
- ▸ ATOMIK_IOC_ACCUM
- ▸ ATOMIK_IOC_READ
- ▸ ATOMIK_IOC_SWAP
- ▸ ATOMIK_IOC_BATCH
Review the SDK generation path
Request evaluation access if your workload needs generated Python, Rust, C, JavaScript, or Verilog interfaces from a shared schema definition.
Request Evaluation AccessCore Operations
The public SDK and interface examples use the same operation vocabulary. Select a language to review signatures, descriptions, and examples.
Context / Create
ctx = AtomikContext()Create a new ATOMiK context. A context holds a reference state and an accumulator, providing the four core delta-state operations.
A new context instance with reference = 0 and accumulator = 0.
from atomik_core import AtomikContext
ctx = AtomikContext()
# ctx.reference == 0, ctx.accumulator == 0load
ctx.load(value: int) -> NoneSet the reference state to the given value and reset the accumulator to zero. This establishes the baseline from which all subsequent deltas are measured.
None. The context is mutated in place.
ctx.load(0xCAFEBABE)
# reference = 0xCAFEBABE, accumulator = 0accum
ctx.accum(delta: int) -> NoneXOR a delta value into the accumulator. This records a state change without modifying the reference. Multiple accum calls compose: accum(a); accum(b) is equivalent to accum(a XOR b).
None. The accumulator is updated in place via XOR.
ctx.load(100)
ctx.accum(7) # accumulator ^= 7
ctx.accum(3) # accumulator ^= 3 (same as single accum(7^3))read
ctx.read() -> intReconstruct the current state by XOR-ing the reference with the accumulator. This is a pure computation: current_state = reference XOR accumulator. The context is not modified.
The reconstructed state value (reference XOR accumulator).
ctx.load(0xFF00)
ctx.accum(0x00FF)
state = ctx.read()
assert state == 0xFFFF # 0xFF00 ^ 0x00FFswap
ctx.swap() -> intCheckpoint the current state: sets reference = reference XOR accumulator, then resets accumulator to zero. After swap, read() returns the same value as before, but the accumulator is clean for a new round of deltas.
The checkpointed state value (the new reference). In C, returned as uint64_t.
ctx.load(1000)
ctx.accum(50)
saved = ctx.swap()
# saved == 1000 ^ 50 == 1018
# ctx.reference == 1018, ctx.accumulator == 0Multi-Context Tables
Track thousands of independent state channels in a single table.
Python
from atomik_core import AtomikTable
table = AtomikTable(num_contexts=256)
table.load(addr=0, initial_state=0xCAFEBABE)
table.accum(addr=0, delta=0x00000001)
assert table.read(addr=0) == 0xCAFEBABFC (single-header library)
#define ATOMIK_IMPLEMENTATION
#include "atomik_core.h"
atomik_table_t table;
atomik_table_init(&table, 256);
atomik_table_load(&table, 0, 0xCAFEBABE);
atomik_table_accum(&table, 0, 0x00000001);
uint64_t s = atomik_table_read(&table, 0);
// s == 0xCAFEBABF