7#ifndef QDP_SIMPLEWORD_H
8#define QDP_SIMPLEWORD_H
273inline float getSite(
float s1,
int innersite) {
return s1;}
274inline double getSite(
double s1,
int innersite) {
return s1;}
275inline int getSite(
int s1,
int innersite) {
return s1;}
276inline bool getSite(
bool s1,
int innersite) {
return s1;}
343 if (a)
return b;
else return c;
347float where(
bool a,
float b,
float c)
349 if (a)
return b;
else return c;
353double where(
bool a,
double b,
double c)
355 if (a)
return b;
else return c;
386unsigned int sum(
unsigned int s1)
417 return double(s1*s1);
423 return double(s1*s2);
428 return double(s1*s2);
446 return double(s1)*s2;
452 return double(s1)*s2;
458 return s1*double(s2);
464 return s1*double(s2);
UnaryReturn< C, FnSum >::Type_t sum(const QDPType< T, C > &s1)
OScalar = sum(source).
int toInt(const IScalar< T > &s)
QDP Int to int primitive in conversion routine.
WordType< IScalar< T > > toWordType(const IScalar< T > &s)
QDP Wordtype to primitive wordtype.
void zero_rep(IScalar< T > &dest)
dest = 0
void copymask(IScalar< T > &d, const IScalar< T1 > &mask, const IScalar< T > &s1)
dest = (mask) ? s1 : dest
double toDouble(const IScalar< T > &s)
QDP Double to double primitive in conversion routine.
bool toBool(const IScalar< T > &s)
QDP Boolean to bool primitive in conversion routine.
void cast_rep(T &d, const IScalar< T1 > &s1)
dest [float type] = source [int type]
void recast_rep(IScalar< T > &d, const IScalar< T1 > &s1)
dest [float type] = source [int type]
UnaryReturn< IScalar< T >, FnGetSite >::Type_t getSite(const IScalar< T > &s1, int innersite)
float toFloat(const IScalar< T > &s)
QDP Real to float primitive in conversion routine.
Yet another random number generator.
MakeReturn< TrinaryNode< FnWhere, typenameCreateLeaf< QDPType< T1, C1 > >::Leaf_t, typenameCreateLeaf< QDPType< T2, C2 > >::Leaf_t, typenameCreateLeaf< typenameSimpleScalar< typenameWordType< C1 >::Type_t >::Type_t >::Leaf_t >, typenameTrinaryReturn< C1, C2, typenameSimpleScalar< typenameWordType< C1 >::Type_t >::Type_t, FnWhere >::Type_t >::Expression_t where(const QDPType< T1, C1 > &a, const QDPType< T2, C2 > &b, const typename WordType< C1 >::Type_t &c)
MakeReturn< UnaryNode< FnTrace, typenameCreateLeaf< QDPExpr< T1, C1 > >::Leaf_t >, typenameUnaryReturn< C1, FnTrace >::Type_t >::Expression_t trace(const QDPExpr< T1, C1 > &l)
MakeReturn< UnaryNode< FnConjugate, typenameCreateLeaf< QDPExpr< T1, C1 > >::Leaf_t >, typenameUnaryReturn< C1, FnConjugate >::Type_t >::Expression_t conj(const QDPExpr< T1, C1 > &l)
MakeReturn< BinaryNode< FnLocalColorInnerProduct, typenameCreateLeaf< QDPType< T1, C1 > >::Leaf_t, typenameCreateLeaf< QDPExpr< T2, C2 > >::Leaf_t >, typenameBinaryReturn< C1, C2, FnLocalColorInnerProduct >::Type_t >::Expression_t localColorInnerProduct(const QDPType< T1, C1 > &l, const QDPExpr< T2, C2 > &r)
MakeReturn< BinaryNode< FnLocalInnerProduct, typenameCreateLeaf< QDPType< T1, C1 > >::Leaf_t, typenameCreateLeaf< QDPExpr< T2, C2 > >::Leaf_t >, typenameBinaryReturn< C1, C2, FnLocalInnerProduct >::Type_t >::Expression_t localInnerProduct(const QDPType< T1, C1 > &l, const QDPExpr< T2, C2 > &r)
MakeReturn< UnaryNode< FnTranspose, typenameCreateLeaf< QDPExpr< T1, C1 > >::Leaf_t >, typenameUnaryReturn< C1, FnTranspose >::Type_t >::Expression_t transpose(const QDPExpr< T1, C1 > &l)
MakeReturn< UnaryNode< FnLocalNorm2, typenameCreateLeaf< QDPExpr< T1, C1 > >::Leaf_t >, typenameUnaryReturn< C1, FnLocalNorm2 >::Type_t >::Expression_t localNorm2(const QDPExpr< T1, C1 > &l)