Function sequant::opt::detail::memsize_counter

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, and result, 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) -> double yielding the summed memory size of the three operands.