← Back to C-Kernel-Engine Docs Doxygen Source Documentation
Loading...
Searching...
No Matches
ckernel_checked_diffusion_schedule.h
Go to the documentation of this file.
1#ifndef CKERNEL_CHECKED_DIFFUSION_SCHEDULE_H
2#define CKERNEL_CHECKED_DIFFUSION_SCHEDULE_H
3
4#include <stddef.h>
5#include <stdint.h>
6
7/* Offsets refer to verified typed bindings in one generated step arena. */
8typedef struct {
9 size_t latent, next_latent; /* FP64 [latent_elements] */
10 size_t noise, gamma; /* FP64 [latent_elements] or SIZE_MAX, FP64 [2] */
11 size_t self_condition, conditional_mean; /* FP32 [latent_elements] */
12 size_t token_ids; /* int32 [token_count] */
14
15typedef struct {
16 int (*step)(uint8_t *arena, size_t bytes);
17 uint8_t *arena;
21 const double *initial_latent;
22 const double *schedule;
24 const double *noise;
26 int32_t *output_ids;
28 int (*should_cancel)(void *context);
31
32/* One denoising block. The caller prepares model weights, positions, visibility,
33 * read-only clean prefix and guidance in the arena. Noise is explicit, with
34 * one row per transition. Deterministic transitions set the noise offset to
35 * SIZE_MAX and supply no noise span. A final evaluation commits IDs.
36 * Outputs remain untouched on rejection, step failure or cancellation. */
38
39#endif
int ck_run_checked_diffusion_schedule(const ck_diffusion_schedule_request *request)
int(* step)(uint8_t *arena, size_t bytes)