|
Oakfield API Documentation 1.0.0
Numerical core APIs
|
Runtime cache and texture-packing state for field-topology extraction. More...
#include <stdbool.h>#include <stddef.h>#include <stdint.h>#include "field.h"#include "sim_field_topology.h"

Go to the source code of this file.
Classes | |
| struct | SimFieldTopologyWorkspace |
| Scratch arrays reserved for topology cache and future graph-style passes. More... | |
| struct | SimFieldTopologyRuntimeState |
| Reusable runtime state for one field's topology cache. More... | |
Typedefs | |
| typedef struct SimFieldTopologyWorkspace | SimFieldTopologyWorkspace |
| Scratch arrays reserved for topology cache and future graph-style passes. | |
| typedef struct SimFieldTopologyRuntimeState | SimFieldTopologyRuntimeState |
| Reusable runtime state for one field's topology cache. | |
Functions | |
| void | sim_field_topology_runtime_init (SimFieldTopologyRuntimeState *state) |
| Initialize runtime topology state with default configuration. | |
| void | sim_field_topology_runtime_reset (SimFieldTopologyRuntimeState *state) |
| Invalidate cached topology while retaining allocated buffers. | |
| void | sim_field_topology_runtime_mark_dirty (SimFieldTopologyRuntimeState *state) |
| Mark cached topology stale. | |
| SimResult | sim_field_topology_runtime_resize (SimFieldTopologyRuntimeState *state, size_t width, size_t height) |
| Ensure cached cell and workspace storage can hold a topology grid. | |
| void | sim_field_topology_runtime_free (SimFieldTopologyRuntimeState *state) |
| Free cached topology buffers and reinitialize the state. | |
| bool | sim_field_topology_runtime_recompute (SimFieldTopologyRuntimeState *state, const struct SimField *field, size_t step_index) |
| Recompute cached topology when enabled, dirty, or past the cadence interval. | |
| bool | sim_field_topology_runtime_pack_rgba8 (SimFieldTopologyRuntimeState *state, uint8_t *dest, size_t capacity, size_t *out_width, size_t *out_height, size_t *out_bytes) |
| Pack cached topology cells into an RGBA8 image. | |
Runtime cache and texture-packing state for field-topology extraction.
SimFieldTopologyRuntimeState keeps reusable cell storage, scratch arrays, cadence counters, and a packed-summary cache for context-owned fields. Callers mark the state dirty when the source field changes and request recomputation on demand.
| void sim_field_topology_runtime_free | ( | SimFieldTopologyRuntimeState * | state | ) |
Free cached topology buffers and reinitialize the state.
| state | State object to free; ignored when NULL. |
| void sim_field_topology_runtime_init | ( | SimFieldTopologyRuntimeState * | state | ) |
Initialize runtime topology state with default configuration.
| [out] | state | State object to initialize; ignored when NULL. |
| void sim_field_topology_runtime_mark_dirty | ( | SimFieldTopologyRuntimeState * | state | ) |
Mark cached topology stale.
| state | State object to mark; ignored when NULL. |
| bool sim_field_topology_runtime_pack_rgba8 | ( | SimFieldTopologyRuntimeState * | state, |
| uint8_t * | dest, | ||
| size_t | capacity, | ||
| size_t * | out_width, | ||
| size_t * | out_height, | ||
| size_t * | out_bytes | ||
| ) |
Pack cached topology cells into an RGBA8 image.
| state | Runtime cache state with valid topology. | |
| [out] | dest | Destination byte buffer. |
| capacity | Destination capacity in bytes. | |
| [out] | out_width | Optional packed image width. |
| [out] | out_height | Optional packed image height. |
| [out] | out_bytes | Optional number of bytes written. |
dest had enough capacity. | bool sim_field_topology_runtime_recompute | ( | SimFieldTopologyRuntimeState * | state, |
| const struct SimField * | field, | ||
| size_t | step_index | ||
| ) |
Recompute cached topology when enabled, dirty, or past the cadence interval.
| state | Runtime cache state. |
| field | Source field to inspect. |
| step_index | Current simulation step index. |
| void sim_field_topology_runtime_reset | ( | SimFieldTopologyRuntimeState * | state | ) |
Invalidate cached topology while retaining allocated buffers.
| state | State object to reset; ignored when NULL. |
| SimResult sim_field_topology_runtime_resize | ( | SimFieldTopologyRuntimeState * | state, |
| size_t | width, | ||
| size_t | height | ||
| ) |
Ensure cached cell and workspace storage can hold a topology grid.
| state | State object to resize. |
| width | Required topology width. |
| height | Required topology height. |