PSCF v1.3.2
|
Functions that perform array reductions on the Cpu. More...
Functions | |
double | max (Array< double > const &in) |
Get maximum of array elements . | |
double | maxAbs (Array< double > const &in) |
Get maximum absolute magnitude of array elements . | |
double | min (Array< double > const &in) |
Get minimum of array elements . | |
double | minAbs (Array< double > const &in) |
Get minimum absolute magnitude of array elements . | |
double | sum (Array< double > const &in) |
Compute sum of array elements . | |
double | innerProduct (Array< double > const &a, Array< double > const &b) |
Compute inner product of two real arrays . |
Functions that perform array reductions on the 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::Prdc::Cpu::Reduce::max | ( | Array< double > const & | in | ) |
Get maximum of array elements .
in | input array |
Definition at line 20 of file Reduce.cpp.
References Util::Array< Data >::capacity(), max(), and UTIL_CHECK.
double Pscf::Prdc::Cpu::Reduce::maxAbs | ( | Array< double > const & | in | ) |
Get maximum absolute magnitude of array elements .
in | input array |
Definition at line 34 of file Reduce.cpp.
References Util::Array< Data >::capacity(), max(), and UTIL_CHECK.
double Pscf::Prdc::Cpu::Reduce::min | ( | Array< double > const & | in | ) |
Get minimum of array elements .
in | input array |
Definition at line 50 of file Reduce.cpp.
References Util::Array< Data >::capacity(), min(), and UTIL_CHECK.
double Pscf::Prdc::Cpu::Reduce::minAbs | ( | Array< double > const & | in | ) |
Get minimum absolute magnitude of array elements .
in | input array |
Definition at line 64 of file Reduce.cpp.
References Util::Array< Data >::capacity(), min(), and UTIL_CHECK.
double Pscf::Prdc::Cpu::Reduce::sum | ( | Array< double > const & | in | ) |
Compute sum of array elements .
in | input array |
Definition at line 80 of file Reduce.cpp.
References Util::Array< Data >::capacity(), sum(), and UTIL_CHECK.
Referenced by Pscf::Rpg::Solvent< D >::compute(), Pscf::Rpg::Simulator< D >::computeHamiltonian(), Pscf::Rpg::Propagator< D >::computeQ(), Pscf::Rpg::Block< D >::computeStressBead(), Pscf::Rpg::Block< D >::computeStressThread(), innerProduct(), Pscf::Rpg::ForceBiasMove< D >::move(), Pscf::Rpg::Mask< D >::rGridAverage(), and sum().
double Pscf::Prdc::Cpu::Reduce::innerProduct | ( | Array< double > const & | a, |
Array< double > const & | b ) |
Compute inner product of two real arrays .
a | first input array |
b | second input array |
Definition at line 94 of file Reduce.cpp.
References Util::Array< Data >::capacity(), sum(), and UTIL_CHECK.
Referenced by Pscf::Rpg::Simulator< D >::computeHamiltonian(), Pscf::Rpg::Propagator< D >::computeQ(), Pscf::Rpg::EinsteinCrystalPerturbation< D >::hamiltonian(), Pscf::Rpg::FilmFieldGenExt< D >::stress(), and Pscf::Rpg::FilmFieldGenMask< D >::stress().