Template Function sequant::try_custom_eval

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 &#8212; the node’s own operands are never evaluated &#8212; and a null return declines to the standard scheme. Shared by evaluate_impl's Enter stage and by the ordered executor’s detail::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.