Function sequant::eval::detail::slicing_instance¶
Defined in File cell_table_builder.hpp
Function Documentation¶
-
inline std::optional<LoopKey> sequant::eval::detail::slicing_instance(RichSchedule const &rich, std::size_t vid, std::size_t p, container::svector<std::pair<LoopKey, int>> const &path, container::svector<std::wstring> const &path_spaces)¶
The loop instance among
path(with its axis basis keys) that slices carried positionpof valuevid:an enclosing entry whose basis key (IndexBasis::base_key()) is the position’s own and whose slot is the fusion slot any occurrence of the value records for that position. Every occurrence is tested, not just the production one, because that is the runtime’s own test: a value CSE-shared by several consumers is sliced on this loop if any of its occurrences was bound to that slot, and the first occurrence is not privileged.Note
The match is on (basis key, slot), and so relies on fusion never giving two levels of the same basis key one slot – were that to happen, a position could match the wrong level of its own basis key. Outermost enclosing entry wins (
pathis outermost-first).