PSCF v1.3.2
Pscf::Prdc::Cpu::Reduce Namespace Reference

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 .

Detailed Description

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.

Function Documentation

◆ max()

double Pscf::Prdc::Cpu::Reduce::max ( Array< double > const & in)

Get maximum of array elements .

Parameters
ininput array

Definition at line 20 of file Reduce.cpp.

References Util::Array< Data >::capacity(), max(), and UTIL_CHECK.

Referenced by max(), and maxAbs().

◆ maxAbs()

double Pscf::Prdc::Cpu::Reduce::maxAbs ( Array< double > const & in)

Get maximum absolute magnitude of array elements .

Parameters
ininput array

Definition at line 34 of file Reduce.cpp.

References Util::Array< Data >::capacity(), max(), and UTIL_CHECK.

◆ min()

double Pscf::Prdc::Cpu::Reduce::min ( Array< double > const & in)

Get minimum of array elements .

Parameters
ininput array

Definition at line 50 of file Reduce.cpp.

References Util::Array< Data >::capacity(), min(), and UTIL_CHECK.

Referenced by min(), and minAbs().

◆ minAbs()

double Pscf::Prdc::Cpu::Reduce::minAbs ( Array< double > const & in)

Get minimum absolute magnitude of array elements .

Parameters
ininput array

Definition at line 64 of file Reduce.cpp.

References Util::Array< Data >::capacity(), min(), and UTIL_CHECK.

◆ sum()

◆ innerProduct()

double Pscf::Prdc::Cpu::Reduce::innerProduct ( Array< double > const & a,
Array< double > const & b )