Function sequant::mode_to_level_from_signature¶
Defined in File slicing_signature.hpp
Function Documentation¶
-
inline ModeToLevel sequant::mode_to_level_from_signature(std::size_t rank, container::svector<std::optional<std::size_t>> const &sig, container::svector<DagScopeLevel> const &levels)¶
Zips a
slicing_signature(one entry per loop axis, in nest order) with the matchinglevels(same order) into aModeToLevelsized to the node’srank— the single point turning “positions of loop axes on a node” into “mode->level”.- Parameters:
rank – the node’s result rank (i.e.
node->canon_indices().size()), used to sizeModeToLevel::by_mode.sig – a slicing signature (as returned by
slicing_signature): one optional mode-position per loop axis.levels – the DAG-scope loop level of each loop axis in
sig, same size and order assig.
- Pre:
sig.size()== levels.size()