Template Function sequant::make_evaluator¶
Defined in File eval.hpp
Function Documentation¶
-
template<class F, class ScopeGuardFactory = make_no_scope_guard>
auto sequant::make_evaluator(BatchPolicy const &policy, F yielder, ScopeGuardFactory make_scope_guard = {})¶ Builds a batched custom evaluator (see make_batched_custom_evaluator) from a
policyobject, lifting the policy’s canonical Tensor-based volatile-leaf predicate to the EvalNode predicate the batched evaluator expects.Exactly equivalent to calling make_batched_custom_evaluator with:
target_batch_size = policy.batch_target_size
accept = policy.is_batchable_index
make_scope_guard = make_scope_guard (forwarded)
is_volatile = EvalNode lift of policy.is_volatile_leaf: n.leaf() && n->is_tensor() && policy.is_volatile_leaf(n->as_tensor()) (when policy.is_volatile_leaf is empty, no node is volatile)
- Parameters:
policy – BatchPolicy carrying the three batchability predicates.
yielder – The leaf evaluator (captured and forwarded).
make_scope_guard – Optional scope-guard factory (same semantics as in make_batched_custom_evaluator; defaults to make_no_scope_guard).