Template Function sequant::opt::single_term_opt

Function Documentation

template<OptFor Metric = OptFor::Flops, has_index_extent IdxToSz>
ExprPtr sequant::opt::single_term_opt(Product const &prod, IdxToSz &&idxsz, bool subnet_cse = false)

Note

prod is assumed to consist of only Tensor expressions

Template Parameters:

Metric – Cost metric to optimize for (Flops by default; Memsize minimizes total operand memory rather than flops).

Parameters:
  • prodProduct to be optimized.

  • idxsz – An invocable object that maps an Index object to size.

Returns:

Parenthesized product expression.