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 – which is exactly the divergence the batched runtime must not share (see make_batched_scratch in eval.hpp, and the developer guide doc/developer/batched_evaluation.rst, “Loop identity and value identity”). 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.