Function sequant::contracted_indices¶
Defined in File eval.hpp
Function Documentation¶
-
inline Index::index_vector sequant::contracted_indices(meta::eval_node auto const &node)¶
The indices contracted at a binary evaluation node.
These are the indices present in both children’s (canonical) result indices but absent from the node’s own result indices — i.e. the indices summed over by this node’s product. Empty for leaves, for sums, and for products with no contracted index (e.g. a pure outer/Hadamard product).
Each such index
Kis a valid axis to evaluate the subtree rooted atnodein batches: the node computesR = sum_K f(K), soR = sum_{blocks b} sum_{K in b} f(K)— evaluating per-block and summing bounds the peak memory ofK-carrying intermediates in the subtree. A custom evaluator (see CacheManager::custom_evaluator_type) can use this to implement batched evaluation.