Function sequant::opt::detail::flops_counter

Function Documentation

auto sequant::opt::detail::flops_counter(has_index_extent auto &&ixex)

Cost function returning the flop count of a binary tensor contraction.

The returned callable computes the product of extents over the union of indices on lhs, rhs, and result. A product of 1 (scalar contraction) is reported as zero flops.

Parameters:

ixex – Invocable mapping an Index to its extent.

Returns:

A callable (lhs, rhs, result) -> double yielding the flop count of the contraction.