8#ifndef QDP_PRIMCOLORMAT_H
9#define QDP_PRIMCOLORMAT_H
57template<
class T1,
int N>
64template<
class T1,
int N>
70template<
class T1,
int N>
79template<
class T,
int N>
85template<
class T,
int N>
91template<
class T,
int N>
101template<
class T1,
int N,
class Op>
107template<
class T1,
class T2,
int N,
class Op>
113template<
class T1,
class T2,
int N,
class Op>
119template<
class T1,
int N,
class T2,
class Op>
126template<
class T1,
class T2,
int N>
131template<
class T1,
class T2,
int N>
136template<
class T1,
class T2,
int N>
141template<
class T1,
class T2,
int N>
147template<
class T1,
class T2,
int N>
152template<
class T1,
class T2,
int N>
157template<
class T1,
class T2,
int N>
162template<
class T1,
class T2,
int N>
167template<
class T1,
class T2,
int N>
175template<
class T,
int N>
180template<
class T,
int N>
185template<
class T,
int N>
190template<
class T,
int N>
195template<
class T,
int N>
200template<
class T,
int N>
205template<
class T1,
class T2,
int N>
210template<
class T1,
class T2,
int N>
215template<
class T1,
class T2,
int N>
220template<
class T1,
class T2,
int N>
225template<
class T1,
class T2,
int N>
230template<
class T1,
class T2,
int N>
235template<
class T1,
class T2,
int N>
240template<
class T1,
class T2,
int N>
245template<
class T1,
class T2,
int N>
250template<
class T1,
class T2,
int N>
255template<
class T1,
class T2,
int N>
260template<
class T1,
class T2,
int N>
265template<
class T1,
class T2,
int N>
270template<
class T1,
class T2,
int N>
275template<
class T1,
class T2,
int N>
293template<
class T,
int N>
298template<
class T,
int N>
306 d.elem() = s1.
elem(0,0);
307 for(
int i=1; i < N; ++i)
308 d.elem() += s1.
elem(i,i);
315template<
class T1,
class T2,
int N>
320template<
class T1,
class T2,
int N>
327 d.elem() = l.
elem(0,0) * r.
elem(0,0);
328 for(
int k=1; k < N; ++k)
329 d.elem() += l.
elem(0,k) * r.
elem(k,0);
331 for(
int j=1; j < N; ++j)
332 for(
int k=0; k < N; ++k)
333 d.elem() += l.
elem(j,k) * r.
elem(k,j);
339template<
class T1,
class T2,
int N>
344template<
class T1,
class T2,
int N,
template<
class,
int>
class C>
352 for(
int k=1; k < N; ++k)
359template<
class T1,
class T2,
int N>
364template<
class T1,
class T2,
int N>
372 for(
int k=1; k < N; ++k)
380template <
class T,
int N>
387template<
class T,
int N>
393 for(
int i=0; i < N; i++) {
394 for(
int j=0; j < N; j++) {
396 d.elem(i,j) = s1.
elem(j,i);
409template<
class T1,
class T2,
int N>
414template<
class T1,
class T2,
int N>
420 for(
int i=0; i < N; ++i)
421 for(
int j=0; j < N; ++j)
432template<
class T,
int N>
437template<
class T,
int N>
444 d.elem() = l.
elem(row,col);
449template<
class T1,
class T2,
int N>
450inline PColorMatrix<T1,N>&
462template<
class T1,
class T2,
class T3,
int N>
474template<
class T1,
class T2,
class T3>
483 d.elem() = (s1.
elem(0,0)*s2.
elem(1,1)
537template<
class T1,
class T2,
class T3>
544 QDPIO::cerr << __func__ <<
": not written for Nc=1" << std::endl;
561template<
class T1,
class T2,
class T3>
568 QDPIO::cerr << __func__ <<
": not written for Nc=2" << std::endl;
585template<
class T1,
class T2,
class T3>
592 QDPIO::cerr << __func__ <<
": not written for Nc=4" << std::endl;
609template<
class T1,
class T2>
620 d.elem(0,0) = s1.
elem(1,1)*s2.
elem(2,2)
628 d.elem(0,1) = s1.
elem(2,1)*s2.
elem(0,2)
636 d.elem(0,2) = s1.
elem(0,1)*s2.
elem(1,2)
644 d.elem(1,0) = s1.
elem(1,2)*s2.
elem(2,0)
652 d.elem(1,1) = s1.
elem(2,2)*s2.
elem(0,0)
660 d.elem(1,2) = s1.
elem(0,2)*s2.
elem(1,0)
668 d.elem(2,0) = s1.
elem(1,0)*s2.
elem(2,1)
676 d.elem(2,1) = s1.
elem(2,0)*s2.
elem(0,1)
684 d.elem(2,2) = s1.
elem(0,0)*s2.
elem(1,1)
705template<
class T1,
class T2>
712 QDPIO::cerr << __func__ <<
": not written for Nc=1" << std::endl;
731template<
class T1,
class T2>
738 QDPIO::cerr << __func__ <<
": not written for Nc=2" << std::endl;
757template<
class T1,
class T2>
764 QDPIO::cerr << __func__ <<
": not written for Nc=4" << std::endl;
Primitive color Matrix class.
PColorMatrix & operator=(const PScalar< T1 > &rhs)
PColorMatrix = PScalar.
PColorMatrix & operator=(const PColorMatrix< T1, N > &rhs)
PColorMatrix = PColorMatrix.
Primitive color Vector class.
CC & assign(const PScalar< T1 > &rhs)
OLattice< PScalar< PColorMatrix< RComplexFloat, 3 > > > C
BinaryReturn< PColorMatrix< T1, 3 >, PColorMatrix< T2, 3 >, FnQuarkContractXX >::Type_t quarkContractXX(const PColorMatrix< T1, 3 > &s1, const PColorMatrix< T2, 3 > &s2)
dest = QuarkContractXX(Qprop1,Qprop2)
BinaryReturn< PColorMatrix< T1, N >, PColorMatrix< T2, N >, FnTraceColorMultiply >::Type_t traceColorMultiply(const PColorMatrix< T1, N > &l, const PColorMatrix< T2, N > &r)
StandardOutputStream cerr
Yet another random number generator.
MakeReturn< UnaryNode< FnPeekColorMatrix, typenameCreateLeaf< QDPExpr< T1, C1 > >::Leaf_t >, C1 >::Expression_t peekColor(const QDPExpr< T1, C1 > &l, int row, int col)
MakeReturn< TrinaryNode< FnColorContract, 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, FnColorContract >::Type_t >::Expression_t colorContract(const QDPType< T1, C1 > &a, const QDPType< T2, C2 > &b, const typename WordType< C1 >::Type_t &c)
MakeReturn< UnaryNode< FnTraceColor, typenameCreateLeaf< QDPExpr< T1, C1 > >::Leaf_t >, typenameUnaryReturn< C1, FnTraceColor >::Type_t >::Expression_t traceColor(const QDPExpr< T1, C1 > &l)
MakeReturn< UnaryNode< FnTransposeColor, typenameCreateLeaf< QDPExpr< T1, C1 > >::Leaf_t >, typenameUnaryReturn< C1, FnTransposeColor >::Type_t >::Expression_t transposeColor(const QDPExpr< T1, C1 > &l)
MakeReturn< BinaryNode< FnOuterProduct, typenameCreateLeaf< QDPType< T1, C1 > >::Leaf_t, typenameCreateLeaf< QDPExpr< T2, C2 > >::Leaf_t >, typenameBinaryReturn< C1, C2, FnOuterProduct >::Type_t >::Expression_t outerProduct(const QDPType< T1, C1 > &l, const QDPExpr< T2, C2 > &r)
C1 & pokeColor(QDPType< T1, C1 > &l, const QDPExpr< T2, C2 > &r, int row, int col)
void QDP_abort(int status)
Panic button.
PScalar< typename BinaryReturn< T1, T2, FnInnerProductReal >::Type_t > Type_t
PScalar< typename BinaryReturn< T1, T2, FnInnerProduct >::Type_t > Type_t
PScalar< typename BinaryReturn< T1, T2, FnTraceMultiply >::Type_t > Type_t
PColorMatrix< T1, N > & Type_t
PColorMatrix< T1, N > & Type_t
PColorMatrix< T1, N > & Type_t
PColorMatrix< T1, N > & Type_t
PColorMatrix< typename BinaryReturn< T1, T2, Op >::Type_t, N > Type_t
PScalar< typename BinaryReturn< T1, T2, FnTraceColorMultiply >::Type_t > Type_t
PScalar< typename BinaryReturn< T1, T2, FnLocalInnerProductReal >::Type_t > Type_t
PScalar< typename BinaryReturn< T1, T2, FnLocalInnerProduct >::Type_t > Type_t
PScalar< typename BinaryReturn< T1, T2, FnInnerProductReal >::Type_t > Type_t
PScalar< typename BinaryReturn< T1, T2, FnInnerProduct >::Type_t > Type_t
PScalar< typename BinaryReturn< T1, T2, FnLocalInnerProductReal >::Type_t > Type_t
PScalar< typename BinaryReturn< T1, T2, FnLocalInnerProduct >::Type_t > Type_t
PScalar< typename BinaryReturn< T1, T2, FnTraceColorMultiply >::Type_t > Type_t
PScalar< typename BinaryReturn< T1, T2, FnTraceMultiply >::Type_t > Type_t
PColorMatrix< T1, N > & Type_t
PColorMatrix< T1, N > & Type_t
PColorMatrix< T1, N > & Type_t
PColorMatrix< T1, N > & Type_t
PColorMatrix< T1, N > & Type_t
PColorMatrix< typename BinaryReturn< T1, T2, Op >::Type_t, N > Type_t
PColorMatrix< typename BinaryReturn< T1, T2, FnOuterProduct >::Type_t, N > Type_t
PScalar< typename BinaryReturn< T1, T2, FnInnerProductReal >::Type_t > Type_t
PScalar< typename BinaryReturn< T1, T2, FnInnerProduct >::Type_t > Type_t
PScalar< typename BinaryReturn< T1, T2, FnLocalInnerProductReal >::Type_t > Type_t
PScalar< typename BinaryReturn< T1, T2, FnLocalInnerProduct >::Type_t > Type_t
PScalar< typename BinaryReturn< T1, T2, FnTraceColorMultiply >::Type_t > Type_t
PScalar< typename BinaryReturn< T1, T2, FnTraceMultiply >::Type_t > Type_t
PColorMatrix< typename BinaryReturn< T1, T2, Op >::Type_t, N > Type_t
PColorMatrix< typename DoublePrecType< T1 >::Type_t, N > Type_t
Structure for extracting color matrix components.
PScalar< typename InternalScalar< T >::Type_t > Type_t
Construct simple word type used at some level within primitives.
PColorMatrix< typename LatticeScalar< T >::Type_t, N > Type_t
Makes a lattice scalar leaving primitive indices alone.
PScalar< typename PrimitiveScalar< T >::Type_t > Type_t
Makes a primitive scalar leaving grid alone.
PColorMatrix< typename SinglePrecType< T1 >::Type_t, N > Type_t
PScalar< typename TrinaryReturn< T1, T2, T3, FnColorContract >::Type_t > Type_t
PColorMatrix< typename UnaryReturn< T1, Op >::Type_t, N > Type_t
PScalar< typename UnaryReturn< T, FnImagTrace >::Type_t > Type_t
PScalar< typename UnaryReturn< T, FnLocalNorm2 >::Type_t > Type_t
PScalar< typename UnaryReturn< T, FnNorm2 >::Type_t > Type_t
PScalar< typename UnaryReturn< T, FnPeekColorMatrix >::Type_t > Type_t
PScalar< typename UnaryReturn< T, FnRealTrace >::Type_t > Type_t
PColorMatrix< typename UnaryReturn< T, FnSumMulti >::Type_t, N > Type_t
PScalar< typename UnaryReturn< T, FnTraceColor >::Type_t > Type_t
PScalar< typename UnaryReturn< T, FnTrace >::Type_t > Type_t
PColorMatrix< typename UnaryReturn< T, FnTransposeColor >::Type_t, N > Type_t
WordType< T1 >::Type_t Type_t
Find the underlying word type of a field.