Template Function sequant::evaluate(Nodes const&, BatchPolicy const&, auto const&, F const&, CacheManager<N, FHC>&, std::initializer_list<std::wstring>, ScopeGuardFactory)¶
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 = make_no_scope_guard>
ResultPtr sequant::evaluate(Nodes const &forest, BatchPolicy const &policy, auto const &layout, F const &leaf_evaluator, CacheManager<N, FHC> &cache, std::initializer_list<std::wstring> mode_order = {}, ScopeGuardFactory make_scope_guard = {})¶ The batched-evaluation driver entry. Routes a whole-forest evaluation to either the per-tree forest descent (
sequant::evaluate(Nodes const&, layout, leaf_evaluator, cache), eval.hpp — called unchanged) or the ordered executor (eval::evaluate_ordered), selected bypolicy.scheduler.policy.scheduler== BatchScheduler::forest_descent (the default) is an unconditional forward to the existingsequant::evaluate(Nodes const&, layout, leaf_evaluator, cache)overload — no schedule is built, nothing else runs on this path. Because this is an additive overload (distinguished by the extrapolicyargument), a caller reaches this driver only by supplying aBatchPolicyexplicitly; every other call resolves to the policy-free overload.policy.scheduler== BatchScheduler::ordered builds the schedule fromforest'sown placement and drives the ordered executor — seeeval::evaluate_ordered, to whichmode_orderandmake_scope_guardare forwarded verbatim.- Parameters:
mode_order – Ranks the canonical loop-chain order (outermost first); only consulted on the ordered arm. See
eval::evaluate_ordered.make_scope_guard – Backend scope-guard factory; only consulted (and only constructed) on the ordered arm.