Template Function sequant::detail::broadcast_operand_modes

Function Documentation

template<typename Labels>
container::svector<std::optional<std::size_t>> sequant::detail::broadcast_operand_modes(Labels const &operand, Labels const &result)

The operand mode of each mode of a Result::broadcast result.

Parameters:
  • operand – the operand’s mode labels

  • result – the result’s mode labels, a superset of operand's

Throws:

Exception – if a mode of operand is not a mode of result

Returns:

for each mode of result, its position in operand, or std::nullopt for a mode the broadcast adds