3 #ifndef DUNE_COLLECTIVECOMMUNICATION_HH
4 #define DUNE_COLLECTIVECOMMUNICATION_HH
105 int sum (T* inout,
int len)
const
124 int prod (T* inout,
int len)
const
143 int min (T* inout,
int len)
const
162 int max (T* inout,
int len)
const
194 int gather (T* in, T* out,
int len,
int root)
const
196 for (
int i=0; i<len; i++)
214 int scatter (T* send, T* recv,
int len,
int root)
const
216 for (
int i=0; i<len; i++)
236 for(T* end=sbuf+count; sbuf < end; ++sbuf, ++rbuf)
252 template<
typename BinaryFunction,
typename Type>
270 template<
typename BinaryFunction,
typename Type>
273 std::copy(in, in+len, out);
int max(T *inout, int len) const
Compute the maximum over all processes for each component of an array and return the result in every ...
Definition: parallel/collectivecommunication.hh:162
int sum(T *inout, int len) const
Compute the sum over all processes for each component of an array and return the result in every proc...
Definition: parallel/collectivecommunication.hh:105
Dune namespace.
Definition: alignment.hh:13
A few common exception classes.
int barrier() const
Wait until all processes have arrived at this point in the program.
Definition: parallel/collectivecommunication.hh:169
int allgather(T *sbuf, int count, T *rbuf) const
Gathers data from all tasks and distribute it to all.
Definition: parallel/collectivecommunication.hh:234
CollectiveCommunication()
Construct default object.
Definition: parallel/collectivecommunication.hh:75
int prod(T *inout, int len) const
Compute the product over all processes for each component of an array and return the result in every ...
Definition: parallel/collectivecommunication.hh:124
int min(T *inout, int len) const
Compute the minimum over all processes for each component of an array and return the result in every ...
Definition: parallel/collectivecommunication.hh:143
T prod(T &in) const
Compute the product of the argument over all processes and return the result in every process...
Definition: parallel/collectivecommunication.hh:114
int rank() const
Return rank, is between 0 and size()-1.
Definition: parallel/collectivecommunication.hh:81
Definition: parallel/collectivecommunication.hh:41
T min(T &in) const
Compute the minimum of the argument over all processes and return the result in every process...
Definition: parallel/collectivecommunication.hh:133
T max(T &in) const
Compute the maximum of the argument over all processes and return the result in every process...
Definition: parallel/collectivecommunication.hh:152
int gather(T *in, T *out, int len, int root) const
Gather arrays on root task.
Definition: parallel/collectivecommunication.hh:194
int scatter(T *send, T *recv, int len, int root) const
Scatter array from a root to all other task.
Definition: parallel/collectivecommunication.hh:214
T sum(T &in) const
Compute the sum of the argument over all processes and return the result in every process...
Definition: parallel/collectivecommunication.hh:96
int allreduce(Type *inout, int len) const
Compute something over all processes for each component of an array and return the result in every pr...
Definition: parallel/collectivecommunication.hh:253
int size() const
Number of processes in set, is greater than 0.
Definition: parallel/collectivecommunication.hh:87
Collective communication interface and sequential default implementation.
Definition: parallel/collectivecommunication.hh:71
int broadcast(T *inout, int len, int root) const
Distribute an array from the process with rank root to all other processes.
Definition: parallel/collectivecommunication.hh:177
void allreduce(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: parallel/collectivecommunication.hh:271
CollectiveCommunication(const C &)
Definition: parallel/collectivecommunication.hh:77