Go to the source code of this file.
|
template<typename T > |
void | gsum (T &, int) |
| dummy declarations to be specialized More...
|
|
template<> |
void | gsum (int &g, int gid) |
|
template<unsigned N> |
void | gsum (qmcplusplus::TinyVector< double, N > &g, int gid) |
|
template<> |
void | gsum (std::vector< int > &g, int gid) |
|
template<> |
void | gsum (double &g, int gid) |
|
template<unsigned N> |
void | gsum (qmcplusplus::TinyVector< int, N > &g, int gid) |
|
template<> |
void | gsum (std::vector< double > &g, int gid) |
|
template<> |
void | gsum (qmcplusplus::Matrix< double > &g, int gid) |
|
template<> |
void | gsum (std::vector< std::complex< double >> &g, int gid) |
|
◆ gsum() [1/9]
dummy declarations to be specialized
Definition at line 23 of file CommOperatorsMPI.h.
25 throw std::runtime_error(
"Need specialization for gsum(T&, int)");
◆ gsum() [2/9]
void gsum |
( |
int & |
g, |
|
|
int |
gid |
|
) |
| |
|
inline |
Definition at line 147 of file CommOperatorsMPI.h.
150 MPI_Allreduce(&(gt), &(g), 1, MPI_INT, MPI_SUM, MPI_COMM_WORLD);
◆ gsum() [3/9]
◆ gsum() [4/9]
void gsum |
( |
std::vector< int > & |
g, |
|
|
int |
gid |
|
) |
| |
|
inline |
Definition at line 164 of file CommOperatorsMPI.h.
166 std::vector<int> gt(g.size(), 0);
167 MPI_Allreduce(&(g[0]), &(gt[0]), g.size(), MPI_INT, MPI_SUM, MPI_COMM_WORLD);
◆ gsum() [5/9]
void gsum |
( |
double & |
g, |
|
|
int |
gid |
|
) |
| |
|
inline |
Definition at line 172 of file CommOperatorsMPI.h.
175 MPI_Allreduce(&(gt), &(g), 1, MPI_DOUBLE, MPI_SUM, MPI_COMM_WORLD);
◆ gsum() [6/9]
◆ gsum() [7/9]
void gsum |
( |
std::vector< double > & |
g, |
|
|
int |
gid |
|
) |
| |
|
inline |
Definition at line 189 of file CommOperatorsMPI.h.
191 std::vector<double> gt(g.size(), 0.0);
192 MPI_Allreduce(&(g[0]), &(gt[0]), g.size(), MPI_DOUBLE, MPI_SUM, MPI_COMM_WORLD);
◆ gsum() [8/9]
Definition at line 197 of file CommOperatorsMPI.h.
References Matrix< T, Alloc >::begin(), copy(), Matrix< T, Alloc >::data(), Matrix< T, Alloc >::end(), and Matrix< T, Alloc >::size().
201 std::vector<double> gt(g.
size());
203 MPI_Allreduce(g.
data(), >[0], g.
size(), MPI_DOUBLE, MPI_SUM, MPI_COMM_WORLD);
204 copy(gt.begin(), gt.end(), g.
data());
Container_t::iterator begin()
void copy(const Array< T1, 3 > &src, Array< T2, 3 > &dest)
Container_t::iterator end()
◆ gsum() [9/9]
void gsum |
( |
std::vector< std::complex< double >> & |
g, |
|
|
int |
gid |
|
) |
| |
|
inline |
Definition at line 902 of file CommOperatorsMPI.h.
904 std::vector<std::complex<double>> gt(g.size(), 0.0);
905 MPI_Allreduce(&(g[0]), &(gt[0]), 2 * g.size(), MPI_DOUBLE, MPI_SUM, MPI_COMM_WORLD);