|
Oakfield API Documentation 1.0.0
Numerical core APIs
|
Elementwise math operator with discrete-friendly operations. More...


Go to the source code of this file.
Classes | |
| struct | SimElementwiseMathOperatorConfig |
| Configuration parameters for the elementwise math operator. More... | |
Typedefs | |
| typedef enum SimElementwiseMathMode | SimElementwiseMathMode |
| Elementwise math operations. | |
| typedef enum SimElementwiseMathRhsSource | SimElementwiseMathRhsSource |
| RHS source for binary operations. | |
| typedef struct SimElementwiseMathOperatorConfig | SimElementwiseMathOperatorConfig |
| Configuration parameters for the elementwise math operator. | |
Enumerations | |
| enum | SimElementwiseMathMode { SIM_ELEMENTWISE_MATH_FLOOR = 0 , SIM_ELEMENTWISE_MATH_FRACT , SIM_ELEMENTWISE_MATH_MOD , SIM_ELEMENTWISE_MATH_STEP , SIM_ELEMENTWISE_MATH_EQ , SIM_ELEMENTWISE_MATH_LT , SIM_ELEMENTWISE_MATH_GT , SIM_ELEMENTWISE_MATH_SELECT } |
| Elementwise math operations. More... | |
| enum | SimElementwiseMathRhsSource { SIM_ELEMENTWISE_MATH_RHS_FIELD = 0 , SIM_ELEMENTWISE_MATH_RHS_CONSTANT } |
| RHS source for binary operations. More... | |
Functions | |
| SimResult | sim_add_elementwise_math_operator (struct SimContext *context, const SimElementwiseMathOperatorConfig *config, size_t *out_index) |
| Register an elementwise math operator with the provided configuration. | |
| SimResult | sim_elementwise_math_config (struct SimContext *context, size_t operator_index, SimElementwiseMathOperatorConfig *out_config) |
| Retrieve the configuration currently bound to a math operator. | |
| SimResult | sim_elementwise_math_update (struct SimContext *context, size_t operator_index, const SimElementwiseMathOperatorConfig *config) |
| Update an existing math operator in-place. | |
Elementwise math operator with discrete-friendly operations.
Elementwise math operations.
| SimResult sim_add_elementwise_math_operator | ( | struct SimContext * | context, |
| const SimElementwiseMathOperatorConfig * | config, | ||
| size_t * | out_index | ||
| ) |
Register an elementwise math operator with the provided configuration.
| context | Simulation context that will own the operator. | |
| config | Optional elementwise math configuration; NULL selects normalized defaults. | |
| [out] | out_index | Optional destination for the registered operator index. |
| SimResult sim_elementwise_math_config | ( | struct SimContext * | context, |
| size_t | operator_index, | ||
| SimElementwiseMathOperatorConfig * | out_config | ||
| ) |
Retrieve the configuration currently bound to a math operator.
| context | Simulation context containing the operator. | |
| operator_index | Index returned by sim_add_elementwise_math_operator(). | |
| [out] | out_config | Receives the normalized configuration. |
| SimResult sim_elementwise_math_update | ( | struct SimContext * | context, |
| size_t | operator_index, | ||
| const SimElementwiseMathOperatorConfig * | config | ||
| ) |
Update an existing math operator in-place.
Passing NULL for config keeps the current configuration and reapplies normalization. A successful update validates field/type compatibility, refreshes symbolic metadata, and invalidates the scheduler plan.
| context | Simulation context containing the operator. |
| operator_index | Index of the elementwise math operator to update. |
| config | Optional replacement elementwise math configuration. |