Template Function sequant::try_custom_eval¶
Defined in File eval.hpp
Function Documentation¶
-
template<Trace EvalTrace = Trace::Default, meta::can_evaluate Node, typename N, bool FHC>
ResultPtr sequant::try_custom_eval(Node const &node, CacheManager<N, FHC> &cache)¶ Consult the cache chain’s custom evaluator on
node.The subtree-pruning seam (see
CacheManager::custom_evaluator_type): a non-null return replaces the whole production — the node’s own operands are never evaluated — and a null return declines to the standard scheme. Shared byevaluate_impl'sEnter stage and by the ordered executor’sdetail::compute_cell, which consult it at the same point in a production (after the operand reads have been resolved for this consumer, before any of them is performed), with the same trace event.- Returns:
the intercepted result, or null when there is no custom evaluator or it declined. Leaves are the caller’s business (the seam is non-leaf only), as is what to do with a non-null result.