Function sequant::eval::detail::populate_build_scope_walk

Function Documentation

inline void sequant::eval::detail::populate_build_scope_walk(ScopeBlock const &block, container::svector<ScopeBlockAxisLevel> const &enc, std::unordered_map<std::size_t, container::svector<ScopeBlockAxisLevel>> &build_scope)

compute_sliced_mode_assignment's block-tree walk: record, for every value produced (a BuildStep) or escaped (a block outputs entry), the ordered list of enclosing loop blocks (axis + level) it is evaluated under &#8212; i.e. the loops whose batch it reads its operands inside. This is the build-scope walk itself, keeping each block’s DagScopeLevel (not just its axis) so the map can name the runtime BatchContextEntry::level.

enc is the root-to-block path including block's own (axis, level) &#8212; a value built or escaping inside block reads its operands inside block's own loop, so the block’s own axis encloses that read (this walk always includes the block axis; only the home of an escape sits one level out, which is irrelevant here &#8212; we want the read/fetch scope, not the home).