Function sequant::opt::detail::memsize_counter¶
Defined in File single_term.hpp
Function Documentation¶
-
auto sequant::opt::detail::memsize_counter(has_index_extent auto &&ixex)¶
Cost function returning the total memory footprint of a binary tensor contraction.
The returned callable sums, over
lhs,rhs, andresult, the product of extents of each operand’s indices. Operands whose extent product is 1 contribute zero.- Parameters:
ixex – Invocable mapping an Index to its extent.
- Returns:
A callable
(lhs, rhs, result) -> doubleyielding the summed memory size of the three operands.