Template Function sequant::slicing_signature

Function Documentation

template<meta::eval_node Node>
container::svector<std::optional<std::size_t>> sequant::slicing_signature(Node const &node, container::svector<Index> const &modes)

The slicing signature of node over modes: the canonical result-slot position of each mode (via index_position), or nullopt where node does not carry that mode on its result.

The signature is a function of the canonical node alone, so it is identical across canonically-equal occurrences except where the modes bind different physical indices &#8212; which is exactly the divergence the batched runtime must not share (see make_batched_scratch in eval.hpp, and the as-built design doc/dev/specs/2026-09-12-batched-array-dag-eval-as-built.md, section 5). It is the unified form of that path’s per-node sig (the batch mode’s position) plus ext_sig (the external modes’ positions): pass {batch_mode} followed by the external axes as modes.