Template Function sequant::fetch_leaf_traced

Function Documentation

template<Trace EvalTrace = Trace::Default, meta::can_evaluate Node, typename F, typename N, bool FHC>
ResultPtr sequant::fetch_leaf_traced(Node const &node, F const &leaf_evaluator, CacheManager<N, FHC> &cache)

Run the leaf evaluator on node, with the trace event and peak accounting a leaf fetch carries.

A leaf is accessed, not computed (the evaluator hands back a precomputed input), but it still enters the working set, so the event is emitted exactly as for an op. Shared by evaluate_impl's leaf branch and by the ordered executor’s detail::compute_cell &#8212; which runs the evaluator itself on a leaf operand’s first touch, before recording it as that leaf’s cell &#8212; so both account for it the same way.

Returns:

the leaf’s own oriented result, whole (never sliced: the declared slice of a read is applied by CellReadResolver::fetch).