Template Function sequant::apply_one_op¶
Defined in File eval.hpp
Function Documentation¶
-
template<meta::can_evaluate Node>
ResultPtr sequant::apply_one_op(Node const &node, ResultPtr const &left, ResultPtr const &right, BackendArrayOps const *aops, container::svector<BatchContextEntry> const &bctx)¶ The single-op compute kernel.
The raw op applied to already-evaluated operand results, dispatched by
node'sop type, with the contraction annotation computed fromnode. Value-in, value-out: it takes the operands’Resultbuffers and returns the op’s raw result, touching no cache and no value identity. It is exactly the innermostleft->adjoint/pow/broadcast/sum/prod(...)compute that both the tree-walkingevaluate_impland the value/occurrence-driven ordered executor perform, so both reach the op through this one function. Not handled here (all caller-side): a leaf (aleaf_evaluatorfetch, not an op), the shaped-product hook (the caller calls this only when the hook declines),apply_phase+ store, the in-place-Sum fast path, and all tally / trace / timing /last_op_flopssentinel.- Parameters:
aops – the backend array-ops, which shape the modes an EvalOp::Broadcast node adds to its operand
bctx – the enclosing batch loops: a mode a Broadcast node adds is restricted to the current batch of the loop over it
- Throws:
Exception – if
nodeis an EvalOp::Broadcast node andaopsis null