Oakfield API Documentation 1.0.0
Numerical core APIs
Loading...
Searching...
No Matches
sim_field_topology_runtime.h
Go to the documentation of this file.
1
10#pragma once
11
12#include <stdbool.h>
13#include <stddef.h>
14#include <stdint.h>
15
16#include "field.h"
17#include "sim_field_topology.h"
18
19#ifdef __cplusplus
20extern "C" {
21#endif
22
27 uint32_t *labels;
28 uint8_t *visited;
29 uint8_t *seam_chain;
30 uint8_t *ambiguity;
31 size_t capacity;
33
56
63
70
77
88 size_t height);
89
96
106 const struct SimField *field, size_t step_index);
107
120 size_t capacity, size_t *out_width, size_t *out_height,
121 size_t *out_bytes);
122
123#ifdef __cplusplus
124}
125#endif
Multidimensional contiguous field abstraction with configurable layout.
SimResult
Return codes shared by libsimcore modules.
Definition field.h:29
Phase-topology extraction helpers for complex simulation fields.
void sim_field_topology_runtime_mark_dirty(SimFieldTopologyRuntimeState *state)
Mark cached topology stale.
void sim_field_topology_runtime_free(SimFieldTopologyRuntimeState *state)
Free cached topology buffers and reinitialize the state.
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.
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.
void sim_field_topology_runtime_init(SimFieldTopologyRuntimeState *state)
Initialize runtime topology state with default configuration.
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.
void sim_field_topology_runtime_reset(SimFieldTopologyRuntimeState *state)
Invalidate cached topology while retaining allocated buffers.
Per-cell phase-topology measurement.
Definition sim_field_topology.h:48
Tunable thresholds used by phase-topology extraction.
Definition sim_field_topology.h:71
Reusable runtime state for one field's topology cache.
Definition sim_field_topology_runtime.h:37
bool valid
Definition sim_field_topology_runtime.h:39
uint64_t skip_count
Definition sim_field_topology_runtime.h:49
size_t last_computed_step
Definition sim_field_topology_runtime.h:45
uint64_t request_count
Definition sim_field_topology_runtime.h:47
SimFieldTopologyCell * cells
Definition sim_field_topology_runtime.h:53
bool enabled
Definition sim_field_topology_runtime.h:38
SimFieldTopologyWorkspace workspace
Definition sim_field_topology_runtime.h:54
bool dirty
Definition sim_field_topology_runtime.h:40
size_t cadence_steps
Definition sim_field_topology_runtime.h:44
uint64_t recompute_count
Definition sim_field_topology_runtime.h:48
uint64_t pack_count
Definition sim_field_topology_runtime.h:50
size_t height
Definition sim_field_topology_runtime.h:42
uint64_t generation
Definition sim_field_topology_runtime.h:46
SimFieldTopologySummary summary
Definition sim_field_topology_runtime.h:51
SimFieldTopologyConfig config
Definition sim_field_topology_runtime.h:52
size_t width
Definition sim_field_topology_runtime.h:41
size_t cell_capacity
Definition sim_field_topology_runtime.h:43
Aggregate counts reported by a topology extraction pass.
Definition sim_field_topology.h:60
Scratch arrays reserved for topology cache and future graph-style passes.
Definition sim_field_topology_runtime.h:26
size_t capacity
Definition sim_field_topology_runtime.h:31
uint32_t * labels
Definition sim_field_topology_runtime.h:27
uint8_t * ambiguity
Definition sim_field_topology_runtime.h:30
uint8_t * seam_chain
Definition sim_field_topology_runtime.h:29
uint8_t * visited
Definition sim_field_topology_runtime.h:28
Owning multidimensional field.
Definition field.h:157