PSCF v1.3
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

◆ maxAbs()

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

Get maximum absolute magnitude of array elements .

Parameters
ininput array

◆ min()

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

Get minimum of array elements .

Parameters
ininput array

◆ minAbs()

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

Get minimum absolute magnitude of array elements .

Parameters
ininput array

◆ sum()

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

Compute sum of array elements .

Parameters
ininput array

◆ innerProduct()

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

Compute inner product of two real arrays .

Parameters
afirst input array
bsecond input array