49    auto dims = a.shape();
 
   50    mpi::broadcast(dims, comm, root);
 
   56    if (a.is_contiguous() and a.has_positive_strides()) {
 
   57      auto a_span = std::span{a.data(), 
static_cast<std::size_t
>(a.size())};
 
   58      mpi::broadcast_range(a_span, comm, root);
 
   60      mpi::broadcast_range(a, comm, root);
 
 
Provides basic functions to create and manipulate arrays and views.
 
void resize_or_check_if_view(A &a, std::array< long, A::rank > const &sha)
Resize a given regular array to the given shape or check if a given view as the correct shape.
 
void mpi_broadcast(A &&a, mpi::communicator comm={}, int root=0)
Implementation of an MPI broadcast for nda::basic_array or nda::basic_array_view types.
 
constexpr bool is_regular_or_view_v
Constexpr variable that is true if type A is either a regular array or a view.
 
Provides type traits for the nda library.