At build time, the model should:
- Start with the values (parameters and derived quantities) provided by the modules the user configured.
- Find which calculations can run with those values.
- Run this check repeatedly, adding newly-created outputs (derived quantities) each round,
- Stop when no new calculations can be added.
This gives us the list of calculations the model should execute.
Scope
- Add
inst/include/models/forward_pass.hpp with:
CalcDescriptor: describes one possible calculation (its inputs, outputs, and loop domain).
DimRule: rules for deciding output size/dimensions.
ResolvedOutput: output metadata after size/dims are finalized.
run_forward_pass(): function that builds the final list of active calculations.
- Start from an initial set of known quantities contributed by initialized modules.
- Repeatedly activate calculations whose required inputs are available.
- Compute output sizes/dimensions using
DimRule.
- Handle cases where two calculations can produce the same output in a fixed, predictable way.
Tasks
Acceptance criteria
At build time, the model should:
This gives us the list of calculations the model should execute.
Scope
inst/include/models/forward_pass.hppwith:CalcDescriptor: describes one possible calculation (its inputs, outputs, and loop domain).DimRule: rules for deciding output size/dimensions.ResolvedOutput: output metadata after size/dims are finalized.run_forward_pass(): function that builds the final list of active calculations.DimRule.Tasks
CalcDescriptor)DimRule)ResolvedOutput)DimRule.Acceptance criteria