Function sequant::opt::detail::footprint_counter¶
Defined in File single_term.hpp
Function Documentation¶
-
auto sequant::opt::detail::footprint_counter(has_index_extent auto &&ixex)¶
Cost function returning the storage footprint (element count) of a single tensor: the product of the extents of its indices.
Used to apply a per-intermediate memory-footprint penalty in single-term optimization (see OptimizeOptions::footprint_weight). A scalar (no indices) contributes zero.
- Parameters:
ixex – Invocable mapping an Index to its extent.
- Returns:
A callable
(result) -> doubleyielding the element count of the result tensor.