Template Function sequant::eval::detail::run_ordered_schedule_pre_results¶
Defined in File ordered_executor.hpp
Function Documentation¶
-
template<Trace EvalTrace = Trace::Default, meta::can_evaluate_range Nodes, typename F, typename N, bool FHC, typename ScopeGuardFactory = ::sequant::make_no_scope_guard>
container::svector<ResultPtr> sequant::eval::detail::run_ordered_schedule_pre_results(Nodes const &forest, OrderedSchedule const &ordered, RichSchedule const &rich, F const &leaf_evaluator, CacheManager<N, FHC> &cache, std::function<std::size_t(Index const&)> const &target, ScopeGuardFactory const &make_scope_guard = {}, std::function<bool(std::ranges::range_value_t<Nodes> const&)> const &is_volatile = {})¶ The shared core every ordered whole-forest entry point (
evaluate_ordered_schedule'sforest-wide sum andevaluate_ordered_multiroot'sper-root map alike) delegates to — walksordered.root.steps(a root-levelBuildStepbuilt directly, a root-levelScopeBlockrealized viarun_ordered_contracted_block) and returns each forest root’s own unpermuted, already-builtvalue_result, aligned index-for-index withforest— i.e. exactly thepre_resultscombine_forest_rootsexpects, computed but not yet consumed by it. The upstream logic (schedule walk, cell table derivation, the run-completeness refusal) lives in the callers; see this file’s own.Note
on why a concatenated multi-root forest gets cross-root CSE for free from
compute_dag_boulevard'shash-keyedValueCellbucketing (built upstream of this function, inrich) with no new dedup logic needed here: a value shared across two independent root trees is just another repeated hash, indistinguishable from a value shared across two summands of one root’s own forest, which this same walk already builds once.- Parameters:
forest – Same requirement as
evaluate_ordered_schedule'sforest:the roots whose results are computed by this call — either the summand terms of one equation or several independent equations’ own root trees (the multi-root caller); this function does not care which, since it produces one unpermuted, unsummed result per element offoresteither way.- Returns:
Each element of
forest'sown already-built result, unpermuted, same order and length asforest.