Template Function sequant::make_ta_array_ops

Function Documentation

template<typename FlatArray, typename ToTArray = FlatArray>
BackendArrayOps sequant::make_ta_array_ops(std::map<std::wstring, TA::TiledRange1> tr1_of_base, TA::World &world)

Build a BackendArrayOps for the TiledArray backend from a per-space tiling map.

The two closures are the TA realization of external-axis batching’s backend needs (see BackendArrayOps): make_zeros builds a zero destination &#8212; flat or nested per the descriptor’s proto structure, with a nested result’s inner tiles left empty for the scatter writes to fill &#8212; and axis_batches chunks an axis on its space’s tile boundaries. Tiling is a property of the space, so both are sourced from tr1_of_base alone; no array in the DAG is consulted. Both mpqc (from its orbital/basis registries) and unit tests (from the tranges they build their leaves with) supply the map and call this.

Template Parameters:
  • FlatArray – the flat (Tensor-of-Scalars) TA::DistArray type;

  • ToTArray – the nested (Tensor-of-Tensor) TA::DistArray type.

Parameters:
  • tr1_of_base – space base_key -> the space’s full TA::TiledRange1.

  • world – the World the zero destinations are built in; it must outlive the returned closures’ use.