Template Function sequant::opt::detail::run_single_term_opt_axes¶
Defined in File cost_model.hpp
Function Documentation¶
-
template<class Model, typename TIdxs>
std::pair<EvalSequence, container::vector<NodeBatchAnnotation>> sequant::opt::detail::run_single_term_opt_axes(Model const &m, TensorNetwork const &network, TIdxs const &tidxs)¶ Companion to run_single_term_opt that also reports, for each contraction (
-1) node of the returnedEvalSequencein emission order, the sliced-set of batchableIndexvalues realized at that node. RequiresModelto additionally exposereconstruct_batched_modes(currently only PeakBatchedModel does); see its doc comment for the precise per-node convention (RPN / post-order, left-first, matching the sharedbuildrecursion used by reconstruct).- Returns:
The optimal EvalSequence, paired with one
container::svectorof slicedIndexper-1token of that sequence, in the same left-first post-order the sequence itself was emitted in. For the nt==1 shortcut (no contractions) the modes vector is empty; for the nt==2 shortcut (single contraction, no DP context is built) the modes vector holds one empty entry (no batching info available).