Oakfield API Documentation 1.0.0
Numerical core APIs
Loading...
Searching...
No Matches
math_operator.h
Go to the documentation of this file.
1
5#ifndef OAKFIELD_MATH_OPERATOR_H
6#define OAKFIELD_MATH_OPERATOR_H
7
9
10#include <stdbool.h>
11#include <stddef.h>
12
13#ifdef __cplusplus
14extern "C" {
15#endif
16
17struct SimContext;
18
32
40
58
70 size_t *out_index);
71
82SimResult sim_elementwise_math_config(struct SimContext *context, size_t operator_index,
84
98SimResult sim_elementwise_math_update(struct SimContext *context, size_t operator_index,
100
101#ifdef __cplusplus
102}
103#endif
104
105#endif /* OAKFIELD_MATH_OPERATOR_H */
SimResult
Return codes shared by libsimcore modules.
Definition field.h:29
SimElementwiseMathRhsSource
RHS source for binary operations.
Definition math_operator.h:36
@ SIM_ELEMENTWISE_MATH_RHS_CONSTANT
Definition math_operator.h:38
@ SIM_ELEMENTWISE_MATH_RHS_FIELD
Definition math_operator.h:37
SimResult sim_elementwise_math_update(struct SimContext *context, size_t operator_index, const SimElementwiseMathOperatorConfig *config)
Update an existing math operator in-place.
SimElementwiseMathMode
Elementwise math operations.
Definition math_operator.h:22
@ SIM_ELEMENTWISE_MATH_SELECT
Definition math_operator.h:30
@ SIM_ELEMENTWISE_MATH_FLOOR
Definition math_operator.h:23
@ SIM_ELEMENTWISE_MATH_GT
Definition math_operator.h:29
@ SIM_ELEMENTWISE_MATH_STEP
Definition math_operator.h:26
@ SIM_ELEMENTWISE_MATH_EQ
Definition math_operator.h:27
@ SIM_ELEMENTWISE_MATH_LT
Definition math_operator.h:28
@ SIM_ELEMENTWISE_MATH_FRACT
Definition math_operator.h:24
@ SIM_ELEMENTWISE_MATH_MOD
Definition math_operator.h:25
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_add_elementwise_math_operator(struct SimContext *context, const SimElementwiseMathOperatorConfig *config, size_t *out_index)
Register an elementwise math operator with the provided configuration.
Declarative complex-first operator splitting (substep expansion at plan time).
Simulation runtime state.
Definition sim_context.h:70
Configuration parameters for the elementwise math operator.
Definition math_operator.h:44
double epsilon
Definition math_operator.h:52
size_t lhs_field
Definition math_operator.h:45
SimElementwiseMathRhsSource rhs_source
Definition math_operator.h:49
bool scale_by_dt
Definition math_operator.h:56
double false_value
Definition math_operator.h:54
size_t output_field
Definition math_operator.h:47
double rhs_constant
Definition math_operator.h:50
bool accumulate
Definition math_operator.h:55
SimElementwiseMathMode mode
Definition math_operator.h:48
size_t rhs_field
Definition math_operator.h:46
double threshold
Definition math_operator.h:51
double true_value
Definition math_operator.h:53