3 #ifndef _INV_CONTAINERS__H
4 #define _INV_CONTAINERS__H
17 template <
typename T,
typename R>
inline
20 if(
s.hasOrderedRep()){
23 for(
int i=
s.start();
i <=
s.end();
i++)
24 for(
int ss(0);ss<Ns;ss++)
25 for(
int c(0);
c<Nc;
c++){
26 lf.elem(
i).elem(ss).elem(
c) = *(px+
count);
32 const int *tab =
s.siteTable().slice();
34 for(
int x=0;
x <
s.numSiteTable(); ++
x){
36 for(
int ss(0);ss<Ns;ss++)
37 for(
int c(0);
c<Nc;
c++){
38 lf.elem(
i).elem(ss).elem(
c) = *(px+
count);
48 template<
typename T,
typename R>
inline
52 if(
s.hasOrderedRep()){
55 for(
int i=
s.start();
i <=
s.end();
i++)
56 for(
int ss(0);ss<Ns;ss++)
57 for(
int c(0);
c<Nc;
c++){
58 *(px+
count) = lf.elem(
i).elem(ss).elem(
c) ;
64 const int *tab =
s.siteTable().slice();
66 for(
int x=0;
x <
s.numSiteTable(); ++
x){
68 for(
int ss(0);ss<Ns;ss++)
69 for(
int c(0);
c<Nc;
c++){
70 *(px+
count) = lf.elem(
i).elem(ss).elem(
c) ;
89 void init(
int ldh,
int lde_,
int nn){
102 #ifndef QDP_IS_QDPJIT
104 QDPIO::cerr<<
"CvToLatFerm: index out of range"<<std::endl ;
107 RComplex<float> *px = (RComplex<float> *)&
evecs[v*
lde];
108 CopyToLatFerm<LatticeFermion, float>(lf,px,
s);
114 #ifndef QDP_IS_QDPJIT
116 QDPIO::cerr<<
"CopyFromLatFerm: index out of range"<<std::endl ;
119 RComplex<float> *px = (RComplex<float> *)&
evecs[v*
lde];
120 CopyFromLatFerm<LatticeFermion, float>(px,lf,
s);
133 multi1d<Complex>
HU ;
205 for(
int i(0);
i<v.size();
i++)
210 for(
int i(0);
i<v.size();
i++)
233 multi1d<RComplex<R> >
H ;
234 void init(
int ldh,
int lde_,
int nn){
248 QDPIO::cerr<<
"CvToLatFerm: index out of range"<<std::endl ;
257 CopyToLatFerm<LatticeFermion, R>(lf,px,
s);
263 QDPIO::cerr<<
"CopyFromLatFerm: index out of range"<<std::endl ;
273 CopyFromLatFerm<LatticeFermion, R>(px,lf,
s);
302 QDPIO::cerr << __func__ <<
": length of value and std::vector arrays are not the same" << std::endl;
309 void AddVectors(
const multi1d<Double>& e,
const multi1d<T>& v,
const Subset&
s){
310 for(
int i(0);
i<e.size();
i++)
312 for(
int i(0);
i<v.size();
i++)
316 QDPIO::cerr << __func__ <<
": length of value and std::vector arrays are not the same" << std::endl;
336 if(v.size1() != v.size2())
337 QDPIO::cerr<<
"WARNING!!! Matrix should be square!! CHECK YOUR CODE!\n";
346 int ld()
const {
return mat.size1();}
373 QDPIO::cerr <<
"VectorArrays:" << __func__ <<
": size of 5D array inconsistent with stored value: Ls=" <<
Ls
374 <<
" v.size=" << v.size() << std::endl;
377 for(
int k=0;
k <
Ls; ++
k)
390 QDPIO::cerr <<
"VectorArrays:" << __func__ <<
": size of 5D array inconsistent with stored value: Ls=" <<
Ls
391 <<
" v.size=" << v.size() << std::endl;
394 for(
int k=0;
k <
Ls; ++
k)
407 QDPIO::cerr <<
"VectorArrays:" << __func__ <<
": size of 5D array inconsistent with stored value: Ls=" <<
Ls
408 <<
" v.size=" << v.size() << std::endl;
411 for(
int k=0;
k <
Ls; ++
k)
416 for(
int k=0;
k <
Ls; ++
k)
425 QDPIO::cerr <<
"VectorArrays:" << __func__ <<
": size of 5D array inconsistent with stored value: Ls=" <<
Ls
426 <<
" v.size=" << v.size() << std::endl;
429 for(
int i(0);
i<v.size2();
i++)
466 QDPIO::cerr << __func__ <<
": length of value and std::vector arrays are not the same" << std::endl;
473 void AddVectors(
const multi1d<Double>& e,
const multi2d<T>& v,
const Subset&
s){
474 for(
int i(0);
i<e.size();
i++)
476 for(
int i(0);
i<v.size2();
i++)
480 QDPIO::cerr << __func__ <<
": length of value and std::vector arrays are not the same" << std::endl;
Primary include file for CHROMA library code.
EigInfo(const OptEigInfo &o, const Subset &s)
void init(int ldh, int lde_)
multi1d< LatticeFermion > evecs
T & operator()(int i, int j)
Matrix(const multi2d< T > &v)
void CvToEigCGvec(const LatticeFermion &lf, const Subset &s, int v, const std::string &LR)
multi1d< RComplex< R > > evecsL
void CvToLatFerm(LatticeFermion &lf, const Subset &s, int v, const std::string &LR) const
multi1d< RComplex< R > > evecsR
void init(int ldh, int lde_, int nn)
multi1d< RComplex< R > > H
multi1d< RComplex< R > > evals
void CvToLatFerm(LatticeFermion &lf, const Subset &s, int v) const
void CvToEigCGvec(const LatticeFermion &lf, const Subset &s, int v)
void init(int ldh, int lde_, int nn)
Holds eigenvalues and arrays of eigenvectors for use in 5D work.
void AddVector(const Double &e, const multi1d< T > &v, const Subset &s)
void AddVectors(const multi1d< Double > &e, const multi2d< T > &v, const Subset &s)
RitzPairsArray(int N, int Ls)
Holds eigenvalues and eigenvectors.
void AddVector(const Double &e, const T &v, const Subset &s)
void AddVectors(const multi1d< Double > &e, const multi1d< T > &v, const Subset &s)
multi1d< T > operator[](int i)
void NormalizeAndAddVector(const multi1d< T > &v, const Double &inorm, const Subset &s)
void AddVector(const multi1d< T > &v, const Subset &s)
VectorArrays(int size2, int size1)
void AddOrReplaceVector(const multi1d< T > &v, const Subset &s)
void resize(int n2, int n1)
void AddVectors(multi2d< T > &v, const Subset &s)
VectorArrays(const multi2d< T > &v)
void AddVectors(multi1d< T > &v, const Subset &s)
void AddOrReplaceVector(const T &v, const Subset &s)
Vectors(const multi1d< T > &v)
void NormalizeAndAddVector(const T &v, const Double &inorm, const Subset &s)
void AddVector(const T &v, const Subset &s)
void AddVector(const T &v)
void AddVectors(multi1d< T > &v)
void CopyToLatFerm(T &lf, RComplex< R > *px, const Subset &s)
copies an EigCG std::vector to a LatticeFermion (Works only in single prec.
void CopyFromLatFerm(RComplex< R > *px, const T &lf, const Subset &s)
Asqtad Staggered-Dirac operator.
LinOpSysSolverMGProtoClover::T T
multi1d< LatticeFermion > s(Ncb)
FloatingPoint< double > Double