Template Function sequant::batch_axis(meta::eval_node auto const&, IndexPredicate const&)¶
Defined in File eval.hpp
Function Documentation¶
-
template<typename IndexPredicate>
inline std::optional<Index> sequant::batch_axis(meta::eval_node auto const &node, IndexPredicate const &accept)¶ A default axis to batch the subtree at
nodeover: the contracted index (see contracted_indices) that satisfiesaccept, choosing the one with the largest IndexSpace approximate size — typically the auxiliary/RI index, whose elimination most reduces the peak intermediate.- Parameters:
accept – a predicate
bool(Index const&)selecting which contracted indices are eligible to batch over (e.g. only those in a given IndexSpace). This lets a caller scope batching to specific modes.- Returns:
nullopt if no contracted index satisfies
accept.