Dune Core Modules (unstable)
communication.hh
Go to the documentation of this file.
3 // SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file LICENSE.md in module root
313 int gather (const T* in, T* out, int len, [[maybe_unused]] int root) const // note out must have same size as in
376 int scatter (const T* sendData, T* recvData, int len, [[maybe_unused]] int root) const // note out must have same size as in
466 int allgatherv (const T* in, int sendDataLen, T* out, [[maybe_unused]] int* recvDataLen, int* displ) const
helper classes to provide unique types for standard functions
Collective communication interface and sequential default implementation.
Definition: communication.hh:100
PseudoFuture< void > ibarrier() const
Nonblocking barrier.
Definition: communication.hh:275
PseudoFuture< T > irecv([[maybe_unused]] T &&data, [[maybe_unused]] int source_rank, [[maybe_unused]] int tag)
Receives the data from the source_rank nonblocking.
Definition: communication.hh:169
int allreduce(const Type *in, Type *out, int len) const
Compute something over all processes for each component of an array and return the result in every pr...
Definition: communication.hh:525
T max(const T &in) const
Compute the maximum of the argument over all processes and return the result in every process....
Definition: communication.hh:248
int gatherv(const T *in, int sendDataLen, T *out, [[maybe_unused]] int *recvDataLen, int *displ, [[maybe_unused]] int root) const
Gather arrays of variable size on root task.
Definition: communication.hh:350
int broadcast([[maybe_unused]] T *inout, [[maybe_unused]] int len, [[maybe_unused]] int root) const
Distribute an array from the process with rank root to all other processes.
Definition: communication.hh:284
int rank() const
Return rank, is between 0 and size()-1.
Definition: communication.hh:114
T sum(const T &in) const
Compute the sum of the argument over all processes and return the result in every process....
Definition: communication.hh:188
int prod([[maybe_unused]] T *inout, [[maybe_unused]] int len) const
Compute the product over all processes for each component of an array and return the result in every ...
Definition: communication.hh:219
int size() const
Number of processes in set, is greater than 0.
Definition: communication.hh:126
int scatterv(const T *sendData, int *sendDataLen, int *displ, T *recvData, [[maybe_unused]] int recvDataLen, [[maybe_unused]] int root) const
Scatter arrays of variable length from a root to all other tasks.
Definition: communication.hh:411
PseudoFuture< TOUT > iallreduce(TIN &&data_in, TOUT &&data_out)
Compute something over all processes nonblocking.
Definition: communication.hh:496
T min(const T &in) const
Compute the minimum of the argument over all processes and return the result in every process....
Definition: communication.hh:228
int allgather(const T *sbuf, int count, T *rbuf) const
Gathers data from all tasks and distribute it to all.
Definition: communication.hh:433
PseudoFuture< TOUT > iallgather(TIN &&data_in, TOUT &&data_out)
Gathers data from all tasks and distribute it to all nonblocking.
Definition: communication.hh:445
int scatter(const T *sendData, T *recvData, int len, [[maybe_unused]] int root) const
Scatter array from a root to all other task.
Definition: communication.hh:376
PseudoFuture< T > isend([[maybe_unused]] const T &&data, [[maybe_unused]] int dest_rank, [[maybe_unused]] int tag)
Sends the data to the dest_rank nonblocking.
Definition: communication.hh:146
Communication(const Communicator &)
Constructor with a given communicator.
Definition: communication.hh:110
PseudoFuture< T > iallreduce(T &&data)
Compute something over all processes nonblocking and in-place.
Definition: communication.hh:506
int gather(const T *in, T *out, int len, [[maybe_unused]] int root) const
Gather arrays on root task.
Definition: communication.hh:313
T prod(const T &in) const
Compute the product of the argument over all processes and return the result in every process....
Definition: communication.hh:208
PseudoFuture< T > ibroadcast(T &&data, int root) const
Distribute an array from the process with rank root to all other processes nonblocking.
Definition: communication.hh:295
int min([[maybe_unused]] T *inout, [[maybe_unused]] int len) const
Compute the minimum over all processes for each component of an array and return the result in every ...
Definition: communication.hh:239
PseudoFuture< TOUT > igather(TIN &&data_in, TOUT &&data_out, int root)
Gather arrays on root task nonblocking.
Definition: communication.hh:324
int send([[maybe_unused]] const T &data, [[maybe_unused]] int dest_rank, [[maybe_unused]] int tag)
Sends the data to the dest_rank.
Definition: communication.hh:135
T recv([[maybe_unused]] T &&data, [[maybe_unused]] int source_rank, [[maybe_unused]] int tag, [[maybe_unused]] void *status=0)
Receives the data from the source_rank.
Definition: communication.hh:157
int barrier() const
Wait until all processes have arrived at this point in the program.
Definition: communication.hh:267
int max([[maybe_unused]] T *inout, [[maybe_unused]] int len) const
Compute the maximum over all processes for each component of an array and return the result in every ...
Definition: communication.hh:259
PseudoFuture< TOUT > iscatter(TIN &&data_in, TOUT &&data_out, int root)
Scatter array from a root to all other task nonblocking.
Definition: communication.hh:387
int allgatherv(const T *in, int sendDataLen, T *out, [[maybe_unused]] int *recvDataLen, int *displ) const
Gathers data of variable length from all tasks and distribute it to all.
Definition: communication.hh:466
int sum([[maybe_unused]] T *inout, [[maybe_unused]] int len) const
Compute the sum over all processes for each component of an array and return the result in every proc...
Definition: communication.hh:199
Communication()
Construct default object.
Definition: communication.hh:103
int allreduce([[maybe_unused]] Type *inout, [[maybe_unused]] int len) const
Compute something over all processes for each component of an array and return the result in every pr...
Definition: communication.hh:486
Default exception if an error in the parallel communication of the program occurred.
Definition: exceptions.hh:287
A few common exception classes.
EnableIfInterOperable< T1, T2, bool >::type operator!=(const ForwardIteratorFacade< T1, V1, R1, D > &lhs, const ForwardIteratorFacade< T2, V2, R2, D > &rhs)
Checks for inequality.
Definition: iteratorfacades.hh:259
EnableIfInterOperable< T1, T2, bool >::type operator==(const ForwardIteratorFacade< T1, V1, R1, D > &lhs, const ForwardIteratorFacade< T2, V2, R2, D > &rhs)
Checks for equality.
Definition: iteratorfacades.hh:237
|
Legal Statements / Impressum |
Hosted by TU Dresden |
generated with Hugo v0.80.0
(Apr 23, 22:30, 2024)