Function sequant::eval::detail::assert_global_level_axis_uniqueness¶
Defined in File ordered_schedule.hpp
Function Documentation¶
-
inline void sequant::eval::detail::assert_global_level_axis_uniqueness(ScopeBlock const &block, std::map<std::tuple<std::size_t, std::wstring, int, int>, Index> &seen)¶
Debug safety net:
compute_sliced_mode_assignment'scanonical level enumeration (enumerate_realized_levels, which folds every realizedScopeBlock'sDagScopeLevelinto oneLoopIdper distinct level) leans on(level.depth, level.space, level.ordinal) being unique globally across the whole realized tree — i.e. any two blocks sharing that triple must also share the same representativeaxis, or the enumeration could fold two structurally-different loops onto oneLoopId.well_formedonly checks ordinal uniqueness among a block’s own same-axis direct children (sibling-local, seeordered_schedule_block_well_formedabove) — it says nothing about two blocks at the same (depth, space, ordinal) that are not siblings (say, nested under different parents). Walk every block in the tree and assert the stronger, global invariant loudly: a violation means the scheduler emitted two structurally-distinct loops the level-to-LoopIdmapping cannot tell apart. Debug-only insurance; expected to never fire on any fixture.