diff --git a/master/auxiliary_2norm_2api_8h_source.html b/master/auxiliary_2norm_2api_8h_source.html
index d44e33fc48..a17aac42cc 100644
--- a/master/auxiliary_2norm_2api_8h_source.html
+++ b/master/auxiliary_2norm_2api_8h_source.html
@@ -92,39 +92,41 @@
-
-
-
-
- 16namespace dlaf::auxiliary::internal {
+ 12#include <pika/execution.hpp>
+
+
+
+
- 18template <Backend backend, Device device,
class T>
-
-
-
-
-
22struct Norm<Backend::MC, Device::CPU, T> {
-
-
24 Matrix<const T, Device::CPU>& matrix);
-
-
-
27 Matrix<const T, Device::CPU>& matrix);
-
+
18namespace dlaf::auxiliary::internal {
+
+
20template <Backend backend, Device device,
class T>
+
+
+
+
+
24struct Norm<Backend::MC, Device::CPU, T> {
+
25 static pika::execution::experimental::unique_any_sender<dlaf::BaseType<T>> max_L(
+
+
+
28 static pika::execution::experimental::unique_any_sender<dlaf::BaseType<T>> max_G(
+
+
-
-
-
31#define DLAF_NORM_ETI(KWORD, DATATYPE) KWORD template struct Norm<Backend::MC, Device::CPU, DATATYPE>;
-
-
33DLAF_NORM_ETI(
extern,
float)
-
34DLAF_NORM_ETI(
extern,
double)
-
35DLAF_NORM_ETI(
extern, std::complex<float>)
-
36DLAF_NORM_ETI(
extern, std::complex<double>)
-
+
+
+
33#define DLAF_NORM_ETI(KWORD, DATATYPE) KWORD template struct Norm<Backend::MC, Device::CPU, DATATYPE>;
+
+
35DLAF_NORM_ETI(
extern,
float)
+
36DLAF_NORM_ETI(
extern,
double)
+
37DLAF_NORM_ETI(
extern, std::complex<float>)
+
38DLAF_NORM_ETI(
extern, std::complex<double>)
+
Definition communicator_grid.h:37
-
+
diff --git a/master/auxiliary_2norm_2mc_8h_source.html b/master/auxiliary_2norm_2mc_8h_source.html
index 9cb1e010d2..1176b6a80c 100644
--- a/master/auxiliary_2norm_2mc_8h_source.html
+++ b/master/auxiliary_2norm_2mc_8h_source.html
@@ -98,149 +98,169 @@
15#include <dlaf/auxiliary/norm/api.h>
-
-
-
-
-
-
- 24namespace dlaf::auxiliary::internal {
+
+
+
+
+ 22#include <dlaf/sender/transform_mpi.h>
+
+
-
-
-
-
-
-
-
-
+ 26namespace dlaf::auxiliary::internal {
+
+
+ 29T max_element(std::vector<T>&& values) {
+ 30 DLAF_ASSERT(!values.empty(),
"");
+ 31 return *std::max_element(values.begin(), values.end());
+
+
- 35dlaf::BaseType<T> Norm<Backend::MC, Device::CPU, T>::max_L(comm::CommunicatorGrid& comm_grid,
-
- 37 Matrix<const T, Device::CPU>& matrix) {
- 38 using namespace dlaf::matrix;
- 39 namespace ex = pika::execution::experimental;
- 40 using pika::this_thread::experimental::sync_wait;
-
-
-
-
- 45 using dlaf::tile::internal::lange;
- 46 using dlaf::tile::internal::lantr;
-
- 48 using NormT = dlaf::BaseType<T>;
-
- 50 const auto& distribution = matrix.distribution();
-
-
-
-
-
- 56 tiles_max.reserve(distribution.localNrTiles().rows() * distribution.localNrTiles().cols());
-
-
-
-
-
-
-
-
-
-
-
- 68 return lantr(lapack::Norm::Max, blas::Uplo::Lower, blas::Diag::NonUnit, tile);
-
- 70 return lange(lapack::Norm::Max, tile);
-
-
-
-
-
-
-
-
-
-
-
- 82 DLAF_ASSERT(!
values.empty(),
"");
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 101 using namespace dlaf::matrix;
- 102 namespace ex = pika::execution::experimental;
- 103 using pika::this_thread::experimental::sync_wait;
-
-
-
-
- 108 using dlaf::tile::internal::lange;
- 109 using dlaf::tile::internal::lantr;
+ 35pika::execution::experimental::unique_any_sender<T> reduce_in_place(
+ 36 pika::execution::experimental::unique_any_sender<dlaf::comm::CommunicatorPipelineExclusiveWrapper>
+
+ 38 comm::IndexT_MPI rank, MPI_Op reduce_op, pika::execution::experimental::unique_any_sender<T> value) {
+ 39 namespace ex = pika::execution::experimental;
+
+ 41 return std::move(value) | ex::let_value([pcomm = std::move(pcomm), rank, reduce_op](T& local)
mutable {
+ 42 using dlaf::comm::internal::transformMPI;
+ 43 return std::move(pcomm) |
+
+ 45 MPI_Request* req)
mutable {
+ 46 const bool is_root_rank = comm.
rank() == rank;
+ 47 void* in = is_root_rank ? MPI_IN_PLACE : &local;
+ 48 void* out = is_root_rank ? &local :
nullptr;
+
+ 50 reduce_op, rank, comm, req));
+
+ 52 ex::then([&local]() -> T {
return local; });
+
+
+
+
+
+
+
+
+
+
+
+
+ 65pika::execution::experimental::unique_any_sender<dlaf::BaseType<T>> Norm<
+ 66 Backend::MC, Device::CPU, T>::max_L(comm::CommunicatorGrid& comm_grid, comm::Index2D rank,
+ 67 Matrix<const T, Device::CPU>& matrix) {
+ 68 using namespace dlaf::matrix;
+ 69 namespace ex = pika::execution::experimental;
+
+
+
+ 73 using pika::execution::thread_stacksize;
+
+ 75 using dlaf::tile::internal::lange;
+ 76 using dlaf::tile::internal::lantr;
+
+ 78 using NormT = dlaf::BaseType<T>;
+
+ 80 const auto& distribution = matrix.distribution();
+
+
+
+
+
+ 86 tiles_max.reserve(distribution.localNrTiles().rows() * distribution.localNrTiles().cols());
+
+
+
+
+
+
+
+
+
+
+
+ 98 return lantr(lapack::Norm::Max, blas::Uplo::Lower, blas::Diag::NonUnit, tile);
+
+ 100 return lange(lapack::Norm::Max, tile);
+
+
+
+
+
+
+
+
+
- 111 using NormT = dlaf::BaseType<T>;
-
- 113 const auto& distribution = matrix.distribution();
-
-
- 116 tiles_max.reserve(distribution.localNrTiles().rows() * distribution.localNrTiles().cols());
+
+
+
+ 114 ex::when_all_vector(std::move(
tiles_max)) |
+
+
-
-
- 120 return lange(lapack::Norm::Max, tile);
-
-
-
-
-
-
-
+ 118 return reduce_in_place(
comm_grid.full_communicator_pipeline().exclusive(),
+
+
+
+
+ 123pika::execution::experimental::unique_any_sender<dlaf::BaseType<T>> Norm<
+
+
+ 126 using namespace dlaf::matrix;
+ 127 namespace ex = pika::execution::experimental;
-
-
-
- 132 DLAF_ASSERT(!
values.empty(),
"");
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+ 131 using pika::execution::thread_stacksize;
+
+ 133 using dlaf::tile::internal::lange;
+ 134 using dlaf::tile::internal::lantr;
+
+ 136 using NormT = dlaf::BaseType<T>;
+
+ 138 const auto& distribution = matrix.distribution();
+
+
+ 141 tiles_max.reserve(distribution.localNrTiles().rows() * distribution.localNrTiles().cols());
+
+
+
+ 145 dlaf::internal::whenAllLift(lapack::Norm::Max, matrix.read(
tile_wrt_local)) |
+
+
+
+
+
+
+
+
+
+
+ 156 ex::when_all_vector(std::move(
tiles_max)) |
+
+
+
+ 160 return reduce_in_place(
comm_grid.full_communicator_pipeline().exclusive(),
+
+
+
Definition communicator_grid.h:37
+Definition communicator.h:38
+IndexT_MPI rank() const noexcept
Return the rank of the current process in the Communicator.
auto make_data(Data &&data) noexcept
Definition data.h:78
+
dlaf::BaseType< T > lantr(const dlaf::internal::Policy< B > &p, const lapack::Norm norm, const blas::Uplo uplo, const blas::Diag diag, const Tile< T, D > &a)
dlaf::BaseType< T > lange(const dlaf::internal::Policy< B > &p, const lapack::Norm norm, const Tile< T, D > &a)
IterableRange2D< IndexT, Tag > iterate_range2d(Index2D< IndexT, Tag > begin_idx, Index2D< IndexT, Tag > end_idx) noexcept
Definition range2d.h:247
+Mapper between language types and basic MPI_Datatype.
Definition datatypes.h:24
-void reduce(const IndexT_MPI rank_root, Communicator &communicator, MPI_Op reduce_op, const DataIn input, const DataOut output)
Definition reduce.h:135
bool square_blocksize(const MatrixLike &m) noexcept
Returns true if the matrix block size is square.
Definition util_matrix.h:48
diff --git a/master/norm_8h.html b/master/norm_8h.html
index e69da444f9..09089fd039 100644
--- a/master/norm_8h.html
+++ b/master/norm_8h.html
@@ -92,13 +92,13 @@
|
-template<Backend backend, Device device, class T > |
-dlaf::BaseType< T > | dlaf::auxiliary::max_norm (comm::CommunicatorGrid &grid, comm::Index2D rank, blas::Uplo uplo, Matrix< const T, device > &A) |
- |
+template<Backend backend, Device device, class T > |
+pika::execution::experimental::unique_any_sender< dlaf::BaseType< T > > | dlaf::auxiliary::max_norm (comm::CommunicatorGrid &grid, comm::Index2D rank, blas::Uplo uplo, Matrix< const T, device > &A) |
+ |
-
-◆ max_norm()
+
+◆ max_norm()