Template Function sequant::make_batched_custom_evaluator

Function Documentation

template<Trace EvalTrace = Trace::Default, typename F, typename IndexPredicate = accept_any_index, typename ScopeGuardFactory = make_no_scope_guard, typename IsVolatile = never_volatile>
auto sequant::make_batched_custom_evaluator(F leaf_evaluator, std::function<std::size_t(Index const&)> target_batch_size, IndexPredicate accept = {}, ScopeGuardFactory make_scope_guard = {}, IsVolatile is_volatile = {}, bool persistent_only = false, std::size_t depth = 0, PeakSink peak = nullptr)
Template Parameters:

EvalTrace – trace level for the evaluator’s own nested re-entries (the per-batch/per-member evaluate_impl calls on the scratch cache, and the re-installed inner evaluators). It is an explicit template parameter rather than an in-body Trace::Default because the returned closure’s mangled name does not otherwise encode it: two TUs that disagree about Trace::Default (e.g. one of them defines SEQUANT_EVAL_TRACE) would emit the same closure symbol with different bodies and the linker would silently keep one of them, so a trace-enabled caller could end up running the untraced body &#8212; and with it none of the compile-time-gated note_working_set() calls the peak sink folds. Defaulting to Trace::Default keeps every existing call site unchanged, while the value now rides in the type.