Template Function sequant::eval::detail::cell_footprint¶
Defined in File peak_profile.hpp
Function Documentation¶
-
template<typename BlockOfFn>
inline std::size_t sequant::eval::detail::cell_footprint(container::svector<Index> const &carried, container::svector<Index> const &home_modes, dryrun::CostModel const &cm, BlockOfFn const &block_of, container::svector<Index> const &divergent_modes = {})¶ Home-relative footprint of a cell via the existing
dryrun::CostModel::memsize.A cell homed at
home_modes(depth) sizes each carried moded = home_depth_of(
home_modes, ectx)
mat block extent (viablock_of) ifm’s loop encloses the home — i.e.mappears inectxat a level<= d— else at full (nominal regime) extent. Builds thedryrun::ExtentOverridesmapping exactly those block-sized modes to their block extent, then delegates the actual extent-product / composite-moment math tocm.memsize()verbatim: no sizing logic is reimplemented here.block_ofis anyIndex -> std::size_tcallable giving the block (sliced) element count for a mode.divergent_modesis informational only, and is retained for signature compatibility with existing callers. A divergent value homed at a sub-scope is un-folded into two non-divergentValueCells, each priced once here at its own home; peak co-residency is priced structurally bypeak_profile_sweepover the two cells’ liveness intervals (which keys onvalue_id, so two cells of one hash need no sweep change), and the replication recompute is a separate, report-only term.