diff --git a/src/TiledArray/tensor/type_traits.h b/src/TiledArray/tensor/type_traits.h index 059ad141c8..2bf3ce0072 100644 --- a/src/TiledArray/tensor/type_traits.h +++ b/src/TiledArray/tensor/type_traits.h @@ -176,6 +176,26 @@ template inline constexpr const bool is_tensor_of_tensor_v = is_tensor_of_tensor::value; +//////////////////////////////////////////////////////////////////////////////// +/// It is sometimes desirable to distinguish between DistArrays with +/// tensor-of-scalars tiles vs tensor-of-tensors tiles. + +/// +/// True if the @tparam Array is a DistArray with tensor-of-scalars tile type. +/// e.g. DistArray>; +/// +template +concept array_tos = + is_array_v && is_tensor_v; + +/// +/// True if the @tparam Array is a DistArray with tensor-of-tensors tile type. +/// e.g. DistArray>>; +/// +template +concept array_tot = + is_array_v && is_tensor_of_tensor_v; + //////////////////////////////////////////////////////////////////////////////// template