|
Oakfield API Documentation 1.0.0
Numerical core APIs
|
Declarative complex-first operator splitting (substep expansion at plan time). More...
#include "operator.h"
Go to the source code of this file.
Classes | |
| struct | SimSplitAccess |
| Per-substep access to a descriptor port. More... | |
| struct | SimSplitSubstep |
| One executable step inside a split operator sequence. More... | |
| struct | SimSplitPort |
| Binding between a split port and a context field. More... | |
| struct | SimSplitScratchRequest |
| Optional per-thread scratch request for split substeps. More... | |
| struct | SimSplitDescriptor |
| Full declarative description of a split operator sequence. More... | |
Typedefs | |
| typedef enum SimAccessMode | SimAccessMode |
| Field access mode declared by a split-operator substep. | |
| typedef struct SimSplitAccess | SimSplitAccess |
| Per-substep access to a descriptor port. | |
| typedef struct SimSplitSubstep | SimSplitSubstep |
| One executable step inside a split operator sequence. | |
| typedef struct SimSplitPort | SimSplitPort |
| Binding between a split port and a context field. | |
| typedef struct SimSplitScratchRequest | SimSplitScratchRequest |
| Optional per-thread scratch request for split substeps. | |
| typedef struct SimSplitDescriptor | SimSplitDescriptor |
| Full declarative description of a split operator sequence. | |
Enumerations | |
| enum | SimAccessMode { SIM_ACCESS_READ = 0 , SIM_ACCESS_WRITE = 1 , SIM_ACCESS_RW = 2 } |
| Field access mode declared by a split-operator substep. More... | |
Functions | |
| SimResult | sim_split_register (struct SimContext *context, const SimSplitDescriptor *desc, const size_t *dependencies, size_t dependency_count, size_t *out_first, size_t *out_last) |
| Register a split operator which expands into sequential substeps. | |
| const char * | sim_split_symbolic (const struct SimOperator *op) |
| Return the symbolic form string for any generated substep operator. | |
| void * | sim_split_state (struct SimOperator *op) |
| Return the shared descriptor state for any generated substep operator. | |
| void * | sim_operator_state (struct SimOperator *op) |
| Return operator state regardless of split or kernel-backed registration. | |
Declarative complex-first operator splitting (substep expansion at plan time).
A split descriptor registers a sequence of ordinary SimOperator instances that share one user state pointer. Access declarations become read/write hazards for the scheduler, optional scratch is reserved per split operator, and later substeps depend on earlier substeps to preserve sequence order.
| typedef struct SimSplitDescriptor SimSplitDescriptor |
Full declarative description of a split operator sequence.
The descriptor, port array, substep array, and access arrays are cloned during registration, but the state pointer remains caller-provided shared state. When the registered substep operators are destroyed, the optional destroy callback receives that shared state once.
| enum SimAccessMode |
| void * sim_operator_state | ( | struct SimOperator * | op | ) |
Return operator state regardless of split or kernel-backed registration.
| op | Operator to inspect. |
| SimResult sim_split_register | ( | struct SimContext * | context, |
| const SimSplitDescriptor * | desc, | ||
| const size_t * | dependencies, | ||
| size_t | dependency_count, | ||
| size_t * | out_first, | ||
| size_t * | out_last | ||
| ) |
Register a split operator which expands into sequential substeps.
Registers one operator per substep. The first substep depends on the provided dependencies; each subsequent substep depends on the previous substep. Field access declarations are converted into scheduler read/write masks and index arrays. Complex requirements are checked before registration completes.
| context | Target simulation context. | |
| desc | Split operator description; arrays are copied, state is not copied. | |
| dependencies | Optional dependency list for the first substep. | |
| dependency_count | Length of dependencies. | |
| [out] | out_first | Optional receiver for the first generated operator index. |
| [out] | out_last | Optional receiver for the final generated operator index. |
| void * sim_split_state | ( | struct SimOperator * | op | ) |
Return the shared descriptor state for any generated substep operator.
| op | Generated split operator. |
op is not a split operator. | const char * sim_split_symbolic | ( | const struct SimOperator * | op | ) |
Return the symbolic form string for any generated substep operator.
| op | Generated split operator. |