1
0
mirror of https://github.com/paboyle/Grid.git synced 2025-06-12 20:27:06 +01:00

Improved the gamma quite a bit.

Serial rng's which are set on node zero and broadcaste
This commit is contained in:
Peter Boyle
2015-04-24 20:21:40 +01:00
parent 42eac283e2
commit 9ec3529864
11 changed files with 151 additions and 28 deletions

View File

@ -6,6 +6,13 @@ namespace Grid {
// innerProduct Vector x Vector -> Scalar
// innerProduct Matrix x Matrix -> Scalar
///////////////////////////////////////////////////////////////////////////////////////
template<class sobj> inline RealD norm2l(sobj &arg){
typedef typename sobj::scalar_type scalar;
decltype(innerProduct(arg,arg)) nrm;
nrm = innerProduct(arg,arg);
return real(nrm);
}
template<class l,class r,int N> inline
auto innerProduct (const iVector<l,N>& lhs,const iVector<r,N>& rhs) -> iScalar<decltype(innerProduct(lhs._internal[0],rhs._internal[0]))>
{