the minimum over the processes of a value of each, by reductions that do not block
More...
#include <ADS/distributed/MPIExecutor.h>
|
| | DistributedMin (MPI_Comm comm=MPI_COMM_WORLD) |
| | the minima over the processes of comm
|
| | DistributedMin (const DistributedMin &)=delete |
| | no copy, since MPI writes into the object
|
| DistributedMin & | operator= (const DistributedMin &)=delete |
| | no copy, since MPI writes into the object
|
| | ~DistributedMin () |
| | waits for the reduction in flight, if any
|
| bool | start (T v) |
| | starts the reduction of the value \( v \) of this process, unless one is in flight, and tells whether it did
|
| std::optional< T > | test (void) |
| | the minimum of the last reduction if it has completed, nothing if it is still in flight or none was started
|
| T | wait (void) |
| | the minimum of the reduction in flight, waiting for it
|
| bool | inFlight (void) const |
| | whether a reduction is in flight
|
template<class T>
class ADS::DistributedMin< T >
the minimum over the processes of a value of each, by reductions that do not block
◆ DistributedMin() [1/2]
the minima over the processes of comm
◆ DistributedMin() [2/2]
no copy, since MPI writes into the object
◆ ~DistributedMin()
waits for the reduction in flight, if any
◆ inFlight()
whether a reduction is in flight
◆ operator=()
no copy, since MPI writes into the object
◆ start()
starts the reduction of the value \( v \) of this process, unless one is in flight, and tells whether it did
In pseudocode (beyond the book):
\[\class{pseudocode}{\begin{array}{r@{\quad}l}
1 & \textbf{function}\ \mathrm{start}( v ) \cr
2 & \quad \textbf{if}\ \text{a reduction is in flight}\ \textbf{then}
\ \textbf{return false} \cr
3 & \quad \mathit{in} \gets v;\ \mathrm{MPI\_Iallreduce}( \mathit{in} ,
\mathit{out} , \min );\ \textbf{return true}
\end{array}}
\]
◆ test()
the minimum of the last reduction if it has completed, nothing if it is still in flight or none was started
◆ wait()
the minimum of the reduction in flight, waiting for it
- Precondition
- a reduction is in flight
The documentation for this class was generated from the following file: