|
Oakfield API Documentation 1.0.0
Numerical core APIs
|
Neural inference operator scaffolding. More...


Go to the source code of this file.
Classes | |
| struct | SimNeuralInferenceRequest |
| Inference request metadata passed to neural callbacks. More... | |
| struct | SimNeuralBaseConfig |
| Shared base configuration for neural operators. More... | |
Macros | |
| #define | SIM_NEURAL_MODEL_ID_MAX 63U |
Typedefs | |
| typedef struct SimNeuralInferenceRequest | SimNeuralInferenceRequest |
| Inference request metadata passed to neural callbacks. | |
| typedef SimResult(* | SimNeuralInferenceFn) (void *userdata, const SimField *input, SimField *output, const SimNeuralInferenceRequest *request) |
| Callback surface for pluggable neural inference backends. | |
| typedef struct SimNeuralBaseConfig | SimNeuralBaseConfig |
| Shared base configuration for neural operators. | |
| typedef SimNeuralBaseConfig | SimNeuralInferOperatorConfig |
| Configuration for inference-only neural operator. | |
Functions | |
| SimResult | sim_add_neural_infer_operator (struct SimContext *context, const SimNeuralInferOperatorConfig *config, size_t *out_index) |
| Register an inference-only neural operator. | |
| SimResult | sim_neural_infer_config (struct SimContext *context, size_t operator_index, SimNeuralInferOperatorConfig *out_config) |
| Copy the current neural inference configuration from a registered operator. | |
| SimResult | sim_neural_infer_update (struct SimContext *context, size_t operator_index, const SimNeuralInferOperatorConfig *config) |
| Replace the configuration of a registered neural inference operator. | |
Neural inference operator scaffolding.
| #define SIM_NEURAL_MODEL_ID_MAX 63U |
Maximum model identifier length (excluding null terminator).
| typedef SimResult(* SimNeuralInferenceFn) (void *userdata, const SimField *input, SimField *output, const SimNeuralInferenceRequest *request) |
Callback surface for pluggable neural inference backends.
Implementations write model outputs into output using the same shape and element type as configured fields.
| userdata | Opaque backend pointer from the operator configuration. | |
| input | Source field snapshot for the inference request. | |
| [out] | output | Field storage that receives model predictions. |
| request | Normalized inference request metadata. |
| SimResult sim_add_neural_infer_operator | ( | struct SimContext * | context, |
| const SimNeuralInferOperatorConfig * | config, | ||
| size_t * | out_index | ||
| ) |
Register an inference-only neural operator.
| context | Simulation context that will own the operator. | |
| config | Optional neural inference configuration; NULL selects normalized defaults. | |
| [out] | out_index | Optional destination for the registered operator index. |
| SimResult sim_neural_infer_config | ( | struct SimContext * | context, |
| size_t | operator_index, | ||
| SimNeuralInferOperatorConfig * | out_config | ||
| ) |
Copy the current neural inference configuration from a registered operator.
| context | Simulation context containing the operator. | |
| operator_index | Index returned by sim_add_neural_infer_operator(). | |
| [out] | out_config | Receives the normalized configuration. |
| SimResult sim_neural_infer_update | ( | struct SimContext * | context, |
| size_t | operator_index, | ||
| const SimNeuralInferOperatorConfig * | config | ||
| ) |
Replace the configuration of a registered neural inference operator.
config is required. The replacement is normalized and field/shape compatibility is checked before storing it.
| context | Simulation context containing the operator. |
| operator_index | Index of the neural inference operator to update. |
| config | Replacement neural inference configuration. |