QDP++
QDP global reductions

Functions

template<class T, class C>
UnaryReturn< C, FnSum >::Type_t QDP::sum (const QDPType< T, C > &s1)
 OScalar = sum(source).
template<class T, class C>
UnaryReturn< C, FnSum >::Type_t QDP::sum (const QDPType< T, C > &s1, const Subset &s)
 OScalar = sum(source) under an explicit subset.
template<class T, class C>
UnaryReturn< C, FnNorm2 >::Type_t QDP::norm2 (const QDPType< T, C > &s1)
 OScalar = norm2(trace(adj(source)*source)).
template<class T, class C>
UnaryReturn< C, FnNorm2 >::Type_t QDP::norm2 (const QDPExpr< T, C > &s1)
template<class T, class C>
UnaryReturn< C, FnNorm2 >::Type_t QDP::norm2 (const QDPType< T, C > &s1, const Subset &s)
 OScalar = norm2(trace(adj(source)*source)) under an explicit subset.
template<class T, class C>
UnaryReturn< C, FnNorm2 >::Type_t QDP::norm2 (const QDPExpr< T, C > &s1, const Subset &s)
template<class T1, class C1, class T2, class C2>
BinaryReturn< C1, C2, FnInnerProduct >::Type_t QDP::innerProduct (const QDPType< T1, C1 > &s1, const QDPType< T2, C2 > &s2)
 OScalar = innerProduct(adj(source1)*source2).
template<class T1, class C1, class T2, class C2>
BinaryReturn< C1, C2, FnInnerProduct >::Type_t QDP::innerProduct (const QDPType< T1, C1 > &s1, const QDPExpr< T2, C2 > &s2)
template<class T1, class C1, class T2, class C2>
BinaryReturn< C1, C2, FnInnerProduct >::Type_t QDP::innerProduct (const QDPExpr< T1, C1 > &s1, const QDPType< T2, C2 > &s2)
template<class T1, class C1, class T2, class C2>
BinaryReturn< C1, C2, FnInnerProduct >::Type_t QDP::innerProduct (const QDPExpr< T1, C1 > &s1, const QDPExpr< T2, C2 > &s2)
template<class T1, class C1, class T2, class C2>
BinaryReturn< C1, C2, FnInnerProduct >::Type_t QDP::innerProduct (const QDPType< T1, C1 > &s1, const QDPType< T2, C2 > &s2, const Subset &s)
 OScalar = innerProduct(adj(source1)*source2) under an explicit subset.
template<class T1, class C1, class T2, class C2>
BinaryReturn< C1, C2, FnInnerProduct >::Type_t QDP::innerProduct (const QDPType< T1, C1 > &s1, const QDPExpr< T2, C2 > &s2, const Subset &s)
template<class T1, class C1, class T2, class C2>
BinaryReturn< C1, C2, FnInnerProduct >::Type_t QDP::innerProduct (const QDPExpr< T1, C1 > &s1, const QDPType< T2, C2 > &s2, const Subset &s)
template<class T1, class C1, class T2, class C2>
BinaryReturn< C1, C2, FnInnerProduct >::Type_t QDP::innerProduct (const QDPExpr< T1, C1 > &s1, const QDPExpr< T2, C2 > &s2, const Subset &s)
template<class T1, class C1, class T2, class C2>
BinaryReturn< C1, C2, FnInnerProductReal >::Type_t QDP::innerProductReal (const QDPType< T1, C1 > &s1, const QDPType< T2, C2 > &s2)
 OScalar = innerProductReal(adj(source1)*source2).
template<class T1, class C1, class T2, class C2>
BinaryReturn< C1, C2, FnInnerProductReal >::Type_t QDP::innerProductReal (const QDPType< T1, C1 > &s1, const QDPExpr< T2, C2 > &s2)
template<class T1, class C1, class T2, class C2>
BinaryReturn< C1, C2, FnInnerProductReal >::Type_t QDP::innerProductReal (const QDPExpr< T1, C1 > &s1, const QDPType< T2, C2 > &s2)
template<class T1, class C1, class T2, class C2>
BinaryReturn< C1, C2, FnInnerProductReal >::Type_t QDP::innerProductReal (const QDPExpr< T1, C1 > &s1, const QDPExpr< T2, C2 > &s2)
template<class T1, class C1, class T2, class C2>
BinaryReturn< C1, C2, FnInnerProductReal >::Type_t QDP::innerProductReal (const QDPType< T1, C1 > &s1, const QDPType< T2, C2 > &s2, const Subset &s)
 OScalar = innerProductReal(adj(source1)*source2) under an explicit subset.
template<class T1, class C1, class T2, class C2>
BinaryReturn< C1, C2, FnInnerProductReal >::Type_t QDP::innerProductReal (const QDPType< T1, C1 > &s1, const QDPExpr< T2, C2 > &s2, const Subset &s)
template<class T1, class C1, class T2, class C2>
BinaryReturn< C1, C2, FnInnerProductReal >::Type_t QDP::innerProductReal (const QDPExpr< T1, C1 > &s1, const QDPType< T2, C2 > &s2, const Subset &s)
template<class T1, class C1, class T2, class C2>
BinaryReturn< C1, C2, FnInnerProductReal >::Type_t QDP::innerProductReal (const QDPExpr< T1, C1 > &s1, const QDPExpr< T2, C2 > &s2, const Subset &s)
template<class T, class C>
UnaryReturn< C, FnSumMulti >::Type_t QDP::sumMulti (const QDPType< T, C > &s1, const Set &ss)
 dest = sumMulti(source1,Set)
template<class T, class C>
UnaryReturn< C, FnGlobalMax >::Type_t QDP::globalMax (const QDPType< T, C > &s1)
 OScalar = globalMax(source).
template<class T, class C>
UnaryReturn< C, FnGlobalMin >::Type_t QDP::globalMin (const QDPType< T, C > &s1)
 OScalar = globalMin(source).
template<class T, class C>
bool QDP::isnan (const QDPExpr< T, C > &s1)
 bool = isnan(source)
template<class T, class C>
bool QDP::isinf (const QDPExpr< T, C > &s1)
 bool = isinf(source)
template<class T, class C>
bool QDP::isnormal (const QDPExpr< T, C > &s1)
 bool = isnormal(source)
template<class T, class C>
bool QDP::isfinite (const QDPExpr< T, C > &s1)
 bool = isfinite(source)

Detailed Description

Global reductions, like sum, norm2, etc.

Function Documentation

◆ globalMax()

template<class T, class C>
UnaryReturn< C, FnGlobalMax >::Type_t QDP::globalMax ( const QDPType< T, C > & s1)
inline

OScalar = globalMax(source).

Find the maximum of an object across the lattice

Definition at line 265 of file qdp_globalfuncs.h.

References globalMax(), and PETE_identity().

Referenced by globalMax(), globalMax(), and globalMax().

◆ globalMin()

template<class T, class C>
UnaryReturn< C, FnGlobalMin >::Type_t QDP::globalMin ( const QDPType< T, C > & s1)
inline

OScalar = globalMin(source).

Find the minimum of an object across the lattice

Definition at line 277 of file qdp_globalfuncs.h.

References globalMin(), and PETE_identity().

Referenced by globalMin(), globalMin(), and globalMin().

◆ innerProduct() [1/8]

template<class T1, class C1, class T2, class C2>
BinaryReturn< C1, C2, FnInnerProduct >::Type_t QDP::innerProduct ( const QDPExpr< T1, C1 > & s1,
const QDPExpr< T2, C2 > & s2 )
inline

Definition at line 119 of file qdp_globalfuncs.h.

References localInnerProduct(), and sum().

◆ innerProduct() [2/8]

template<class T1, class C1, class T2, class C2>
BinaryReturn< C1, C2, FnInnerProduct >::Type_t QDP::innerProduct ( const QDPExpr< T1, C1 > & s1,
const QDPExpr< T2, C2 > & s2,
const Subset & s )
inline

Definition at line 157 of file qdp_globalfuncs.h.

References localInnerProduct(), and sum().

◆ innerProduct() [3/8]

template<class T1, class C1, class T2, class C2>
BinaryReturn< C1, C2, FnInnerProduct >::Type_t QDP::innerProduct ( const QDPExpr< T1, C1 > & s1,
const QDPType< T2, C2 > & s2 )
inline

Definition at line 112 of file qdp_globalfuncs.h.

References localInnerProduct(), and sum().

◆ innerProduct() [4/8]

template<class T1, class C1, class T2, class C2>
BinaryReturn< C1, C2, FnInnerProduct >::Type_t QDP::innerProduct ( const QDPExpr< T1, C1 > & s1,
const QDPType< T2, C2 > & s2,
const Subset & s )
inline

Definition at line 149 of file qdp_globalfuncs.h.

References localInnerProduct(), and sum().

◆ innerProduct() [5/8]

template<class T1, class C1, class T2, class C2>
BinaryReturn< C1, C2, FnInnerProduct >::Type_t QDP::innerProduct ( const QDPType< T1, C1 > & s1,
const QDPExpr< T2, C2 > & s2 )
inline

Definition at line 105 of file qdp_globalfuncs.h.

References localInnerProduct(), and sum().

◆ innerProduct() [6/8]

template<class T1, class C1, class T2, class C2>
BinaryReturn< C1, C2, FnInnerProduct >::Type_t QDP::innerProduct ( const QDPType< T1, C1 > & s1,
const QDPExpr< T2, C2 > & s2,
const Subset & s )
inline

Definition at line 141 of file qdp_globalfuncs.h.

References localInnerProduct(), and sum().

◆ innerProduct() [7/8]

template<class T1, class C1, class T2, class C2>
BinaryReturn< C1, C2, FnInnerProduct >::Type_t QDP::innerProduct ( const QDPType< T1, C1 > & s1,
const QDPType< T2, C2 > & s2 )
inline

OScalar = innerProduct(adj(source1)*source2).

return sum(trace(adj(source1)*source2))

Sum over the lattice

Definition at line 98 of file qdp_globalfuncs.h.

References localInnerProduct(), and sum().

Referenced by innerProduct(), and innerProduct().

◆ innerProduct() [8/8]

template<class T1, class C1, class T2, class C2>
BinaryReturn< C1, C2, FnInnerProduct >::Type_t QDP::innerProduct ( const QDPType< T1, C1 > & s1,
const QDPType< T2, C2 > & s2,
const Subset & s )
inline

OScalar = innerProduct(adj(source1)*source2) under an explicit subset.

return sum(trace(adj(source1)*source2))

Sum over the lattice

Definition at line 133 of file qdp_globalfuncs.h.

References localInnerProduct(), and sum().

◆ innerProductReal() [1/8]

template<class T1, class C1, class T2, class C2>
BinaryReturn< C1, C2, FnInnerProductReal >::Type_t QDP::innerProductReal ( const QDPExpr< T1, C1 > & s1,
const QDPExpr< T2, C2 > & s2 )
inline

Definition at line 193 of file qdp_globalfuncs.h.

References localInnerProductReal(), and sum().

◆ innerProductReal() [2/8]

template<class T1, class C1, class T2, class C2>
BinaryReturn< C1, C2, FnInnerProductReal >::Type_t QDP::innerProductReal ( const QDPExpr< T1, C1 > & s1,
const QDPExpr< T2, C2 > & s2,
const Subset & s )
inline

Definition at line 231 of file qdp_globalfuncs.h.

References localInnerProductReal(), and sum().

◆ innerProductReal() [3/8]

template<class T1, class C1, class T2, class C2>
BinaryReturn< C1, C2, FnInnerProductReal >::Type_t QDP::innerProductReal ( const QDPExpr< T1, C1 > & s1,
const QDPType< T2, C2 > & s2 )
inline

Definition at line 186 of file qdp_globalfuncs.h.

References localInnerProductReal(), and sum().

◆ innerProductReal() [4/8]

template<class T1, class C1, class T2, class C2>
BinaryReturn< C1, C2, FnInnerProductReal >::Type_t QDP::innerProductReal ( const QDPExpr< T1, C1 > & s1,
const QDPType< T2, C2 > & s2,
const Subset & s )
inline

Definition at line 223 of file qdp_globalfuncs.h.

References localInnerProductReal(), and sum().

◆ innerProductReal() [5/8]

template<class T1, class C1, class T2, class C2>
BinaryReturn< C1, C2, FnInnerProductReal >::Type_t QDP::innerProductReal ( const QDPType< T1, C1 > & s1,
const QDPExpr< T2, C2 > & s2 )
inline

Definition at line 179 of file qdp_globalfuncs.h.

References localInnerProductReal(), and sum().

◆ innerProductReal() [6/8]

template<class T1, class C1, class T2, class C2>
BinaryReturn< C1, C2, FnInnerProductReal >::Type_t QDP::innerProductReal ( const QDPType< T1, C1 > & s1,
const QDPExpr< T2, C2 > & s2,
const Subset & s )
inline

Definition at line 215 of file qdp_globalfuncs.h.

References localInnerProductReal(), and sum().

◆ innerProductReal() [7/8]

template<class T1, class C1, class T2, class C2>
BinaryReturn< C1, C2, FnInnerProductReal >::Type_t QDP::innerProductReal ( const QDPType< T1, C1 > & s1,
const QDPType< T2, C2 > & s2 )
inline

OScalar = innerProductReal(adj(source1)*source2).

return sum(trace(adj(source1)*source2))

Sum over the lattice

Definition at line 172 of file qdp_globalfuncs.h.

References localInnerProductReal(), and sum().

Referenced by innerProductReal(), and innerProductReal().

◆ innerProductReal() [8/8]

template<class T1, class C1, class T2, class C2>
BinaryReturn< C1, C2, FnInnerProductReal >::Type_t QDP::innerProductReal ( const QDPType< T1, C1 > & s1,
const QDPType< T2, C2 > & s2,
const Subset & s )
inline

OScalar = innerProductReal(adj(source1)*source2) under an explicit subset.

return sum(trace(adj(source1)*source2))

Sum over the lattice

Definition at line 207 of file qdp_globalfuncs.h.

References localInnerProductReal(), and sum().

◆ isfinite()

template<class T, class C>
bool QDP::isfinite ( const QDPExpr< T, C > & s1)
inline

bool = isfinite(source)

Return true if all the values in source are finite floating point numbers

Definition at line 324 of file qdp_globalfuncs.h.

References isfinite().

Referenced by isfinite(), isfinite(), isfinite(), isfinite(), isfinite(), isfinite(), isfinite(), isfinite(), and isfinite().

◆ isinf()

template<class T, class C>
bool QDP::isinf ( const QDPExpr< T, C > & s1)
inline

bool = isinf(source)

Return true if there is an Inf anywhere in the source

Definition at line 302 of file qdp_globalfuncs.h.

References isinf().

Referenced by isinf(), isinf(), isinf(), isinf(), isinf(), isinf(), isinf(), isinf(), isinf(), and isnormal().

◆ isnan()

template<class T, class C>
bool QDP::isnan ( const QDPExpr< T, C > & s1)
inline

bool = isnan(source)

Return true if there is a NaN anywhere in the source

Definition at line 291 of file qdp_globalfuncs.h.

References isnan().

Referenced by isnan(), isnan(), isnan(), isnan(), isnan(), isnan(), isnan(), isnan(), and isnan().

◆ isnormal()

template<class T, class C>
bool QDP::isnormal ( const QDPExpr< T, C > & s1)
inline

bool = isnormal(source)

Return true if all the values in source are normal floating point numbers

Definition at line 313 of file qdp_globalfuncs.h.

References isnormal().

Referenced by isnormal(), isnormal(), isnormal(), isnormal(), isnormal(), isnormal(), isnormal(), and isnormal().

◆ norm2() [1/4]

template<class T, class C>
UnaryReturn< C, FnNorm2 >::Type_t QDP::norm2 ( const QDPExpr< T, C > & s1)
inline

Definition at line 62 of file qdp_globalfuncs.h.

References localNorm2(), and sum().

◆ norm2() [2/4]

template<class T, class C>
UnaryReturn< C, FnNorm2 >::Type_t QDP::norm2 ( const QDPExpr< T, C > & s1,
const Subset & s )
inline

Definition at line 84 of file qdp_globalfuncs.h.

References localNorm2(), and sum().

◆ norm2() [3/4]

template<class T, class C>
UnaryReturn< C, FnNorm2 >::Type_t QDP::norm2 ( const QDPType< T, C > & s1)
inline

OScalar = norm2(trace(adj(source)*source)).

return num(trace(adj(source)*source))

Sum over the lattice Allow a global sum that sums over all indices

Definition at line 55 of file qdp_globalfuncs.h.

References localNorm2(), and sum().

Referenced by norm2(), and norm2().

◆ norm2() [4/4]

template<class T, class C>
UnaryReturn< C, FnNorm2 >::Type_t QDP::norm2 ( const QDPType< T, C > & s1,
const Subset & s )
inline

OScalar = norm2(trace(adj(source)*source)) under an explicit subset.

return num(trace(adj(source)*source))

Sum over the lattice Allow a global sum that sums over all indices

Definition at line 77 of file qdp_globalfuncs.h.

References localNorm2(), and sum().

◆ sum() [1/2]

template<class T, class C>
UnaryReturn< C, FnSum >::Type_t QDP::sum ( const QDPType< T, C > & s1)
inline

◆ sum() [2/2]

template<class T, class C>
UnaryReturn< C, FnSum >::Type_t QDP::sum ( const QDPType< T, C > & s1,
const Subset & s )
inline

OScalar = sum(source) under an explicit subset.

Allow a global sum that sums over the lattice, but returns an object of the same primitive type. E.g., contract only over lattice indices

Definition at line 40 of file qdp_globalfuncs.h.

References PETE_identity(), and sum().

◆ sumMulti()

template<class T, class C>
UnaryReturn< C, FnSumMulti >::Type_t QDP::sumMulti ( const QDPType< T, C > & s1,
const Set & ss )
inline

dest = sumMulti(source1,Set)

Compute the global sum on multiple subsets specified by Set

This is a very simple implementation. There is no need for anything fancier unless global sums are just so extraordinarily slow. Otherwise, generalized sums happen so infrequently the slow version is fine.

Definition at line 251 of file qdp_globalfuncs.h.

References PETE_identity(), and sumMulti().

Referenced by sumMulti().