|
PSCF v1.4.0
|
Functions that perform array reductions on a CPU. More...
Functions | |
| double | Pscf::Reduce::sum (Array< double > const &in) |
| Compute sum of array elements (real). | |
| double | Pscf::Reduce::sum (Array< double > const &in, int begin, int end) |
| Compute sum of elements of an array slice (real). | |
| double | Pscf::Reduce::sumSq (Array< double > const &in) |
| Compute sum of of squares of array elements (real). | |
| double | Pscf::Reduce::innerProduct (Array< double > const &a, Array< double > const &b) |
| Compute Euclidean inner product of two real arrays . | |
| double | Pscf::Reduce::max (Array< double > const &in) |
| Get maximum of array elements (real). | |
| double | Pscf::Reduce::max (Array< double > const &in, int begin, int end) |
| Get value of maximum element in an array slice (real). | |
| double | Pscf::Reduce::maxAbs (Array< double > const &in) |
| Get maximum absolute magnitude of array elements . | |
| double | Pscf::Reduce::min (Array< double > const &in) |
| Get minimum of array elements . | |
| double | Pscf::Reduce::min (Array< double > const &in, int begin, int end) |
| Get value of minimum element in an array slice (real). | |
| double | Pscf::Reduce::minAbs (Array< double > const &in) |
| Get minimum absolute magnitude of array elements . | |
| std::complex< double > | Pscf::Reduce::sum (Array< fftw_complex > const &a) |
| Compute sum of all elements of an array (complex). | |
| std::complex< double > | Pscf::Reduce::sum (Array< fftw_complex > const &a, int begin, int end) |
| Compute sum of elements of an array slice (complex). | |
| std::complex< double > | Pscf::Reduce::sumSq (Array< fftw_complex > const &a) |
| Compute sum of squares of elements of a complex array. | |
| std::complex< double > | Pscf::Reduce::sumProduct (Array< fftw_complex > const &a, Array< fftw_complex > const &b) |
| Compute sum of complex products of elements of two arrays (complex). | |
Functions that perform array reductions on a CPU.
A reduction is any operation that involves reducing all of the elements of an array or set of arrays to a single scalar.
Examples include taking the sum or finding the maximum of all array elements, or taking an inner product of two arrays.
| double Pscf::Reduce::sum | ( | Array< double > const & | in | ) |
Compute sum of array elements (real).
| in | input array |
Definition at line 20 of file Reduce.cpp.
References Util::Array< Data >::capacity(), sum(), and UTIL_CHECK.
Referenced by Pscf::Rp::Solvent< D, Rpc::Types< D > >::associate(), Pscf::Rp::FourthOrderParameter< D, T >::compute(), Pscf::Rp::Propagator< D, T >::computeQ(), Pscf::Rpg::Block< D >::computeStressBead(), Pscf::Rpg::Block< D >::computeStressThread(), innerProduct(), innerProduct(), sum(), sum(), sum(), sum(), sum(), sum(), sum(), sum(), sumProduct(), sumSq(), sumSq(), sumSq(), sumSq(), and sumSqAbs().
| double Pscf::Reduce::sum | ( | Array< double > const & | in, |
| int | begin, | ||
| int | end ) |
Compute sum of elements of an array slice (real).
| in | input array |
| begin | index of first element in slice |
| end | index one past the last in slice |
Definition at line 50 of file Reduce.cpp.
References Util::Array< Data >::capacity(), sum(), and UTIL_CHECK.
| double Pscf::Reduce::sumSq | ( | Array< double > const & | in | ) |
Compute sum of of squares of array elements (real).
| in | input array |
Definition at line 82 of file Reduce.cpp.
References Util::Array< Data >::capacity(), sum(), and UTIL_CHECK.
Referenced by Pscf::Rp::EinsteinCrystalPerturbation< D, T >::hamiltonian().
Compute Euclidean inner product of two real arrays .
| a | first input array |
| b | second input array |
Definition at line 117 of file Reduce.cpp.
References Util::Array< Data >::capacity(), sum(), and UTIL_CHECK.
Referenced by Pscf::Rp::Propagator< D, T >::computeQ(), Pscf::Rpg::FilmFieldGenExt< D >::stress(), and Pscf::Rpg::FilmFieldGenMask< D >::stress().
| double Pscf::Reduce::max | ( | Array< double > const & | in | ) |
Get maximum of array elements (real).
| in | input array |
Definition at line 151 of file Reduce.cpp.
References Util::Array< Data >::capacity(), max(), and UTIL_CHECK.
Referenced by max(), max(), max(), max(), maxAbs(), and maxAbs().
| double Pscf::Reduce::max | ( | Array< double > const & | in, |
| int | begin, | ||
| int | end ) |
Get value of maximum element in an array slice (real).
| in | input array |
| begin | index of first element in slice |
| end | index one past the last in slice |
Definition at line 165 of file Reduce.cpp.
References Util::Array< Data >::capacity(), max(), and UTIL_CHECK.
| double Pscf::Reduce::maxAbs | ( | Array< double > const & | in | ) |
Get maximum absolute magnitude of array elements .
| in | input array |
Definition at line 182 of file Reduce.cpp.
References Util::Array< Data >::capacity(), max(), and UTIL_CHECK.
| double Pscf::Reduce::min | ( | Array< double > const & | in | ) |
Get minimum of array elements .
| in | input array |
Definition at line 198 of file Reduce.cpp.
References Util::Array< Data >::capacity(), min(), and UTIL_CHECK.
Referenced by min(), min(), min(), min(), minAbs(), and minAbs().
| double Pscf::Reduce::min | ( | Array< double > const & | in, |
| int | begin, | ||
| int | end ) |
Get value of minimum element in an array slice (real).
| in | input array |
| begin | index of first element in slice |
| end | index one past the last in slice |
Definition at line 212 of file Reduce.cpp.
References Util::Array< Data >::capacity(), min(), and UTIL_CHECK.
| double Pscf::Reduce::minAbs | ( | Array< double > const & | in | ) |
Get minimum absolute magnitude of array elements .
| in | input array |
Definition at line 229 of file Reduce.cpp.
References Util::Array< Data >::capacity(), min(), and UTIL_CHECK.
| std::complex< double > Pscf::Reduce::sum | ( | Array< fftw_complex > const & | a | ) |
Compute sum of all elements of an array (complex).
| a | input array |
Definition at line 17 of file ReduceCx.cpp.
References Util::Array< Data >::capacity(), sum(), and UTIL_CHECK.
| std::complex< double > Pscf::Reduce::sum | ( | Array< fftw_complex > const & | a, |
| int | begin, | ||
| int | end ) |
Compute sum of elements of an array slice (complex).
| a | input array |
| begin | index of first element of slice |
| end | index one past the last element |
Definition at line 34 of file ReduceCx.cpp.
References Util::Array< Data >::capacity(), sum(), and UTIL_CHECK.
| std::complex< double > Pscf::Reduce::sumSq | ( | Array< fftw_complex > const & | a | ) |
Compute sum of squares of elements of a complex array.
| a | input array |
Definition at line 55 of file ReduceCx.cpp.
References Util::Array< Data >::capacity(), sum(), and UTIL_CHECK.
| std::complex< double > Pscf::Reduce::sumProduct | ( | Array< fftw_complex > const & | a, |
| Array< fftw_complex > const & | b ) |
Compute sum of complex products of elements of two arrays (complex).
| a | first input array |
| b | second input array |
Definition at line 75 of file ReduceCx.cpp.
References Util::Array< Data >::capacity(), sum(), and UTIL_CHECK.