← Back to C-Kernel-Engine Docs Doxygen Source Documentation
Loading...
Searching...
No Matches
ckernel_checked_frame_loop.h
Go to the documentation of this file.
1#ifndef CKERNEL_CHECKED_FRAME_LOOP_H
2#define CKERNEL_CHECKED_FRAME_LOOP_H
3
4#include <stddef.h>
5#include <stdint.h>
6
7#ifdef __cplusplus
8extern "C" {
9#endif
10
11typedef int (*ck_checked_frame_entry)(uint8_t *arena, size_t arena_bytes);
12typedef int (*ck_checked_frame_cancel)(void *context);
13
14enum {
21};
22
23/* The offsets are byte offsets into one compiler-planned arena. Each entry
24 * executes the neural graph declared by its circuit; this shell only repeats
25 * the frame entry and collects its checked integer outputs. The caller owns
26 * arena, staging and published output. A failed or budget-limited run leaves
27 * output_codes unchanged and publishes zero valid frames. */
46
48
49/* The callback is sampled before prefill and between complete frame entries.
50 * It must be safe to call from the execution thread and return nonzero when
51 * cancellation is requested. Cancellation publishes no codes or valid frames.
52 * An entry already in progress runs to its next checked boundary. */
58
60 const ck_checked_frame_loop_control *request);
61
62#ifdef __cplusplus
63}
64#endif
65
66#endif
@ CK_FRAME_LOOP_INVALID_OUTPUT
@ CK_FRAME_LOOP_BUDGET_EXHAUSTED
@ CK_FRAME_LOOP_CANCELLED
@ CK_FRAME_LOOP_ENTRY_FAILED
int(* ck_checked_frame_cancel)(void *context)
int ck_run_checked_frame_loop(const ck_checked_frame_loop *request)
int ck_run_checked_frame_loop_control(const ck_checked_frame_loop_control *request)
int(* ck_checked_frame_entry)(uint8_t *arena, size_t arena_bytes)
ck_checked_frame_entry prefill