mirror of
https://github.com/paboyle/Grid.git
synced 2025-04-27 22:25:56 +01:00
No compile make tests fix
This commit is contained in:
parent
cfe3cd76d1
commit
abc4de0fd2
@ -751,8 +751,8 @@ inline Grid_simd<std::complex<R>, V> toComplex(const Grid_simd<R, V> &in) {
|
|||||||
|
|
||||||
conv.v = in.v;
|
conv.v = in.v;
|
||||||
for (int i = 0; i < Rsimd::Nsimd(); i += 2) {
|
for (int i = 0; i < Rsimd::Nsimd(); i += 2) {
|
||||||
assert(conv.s[i + 1] ==
|
assert(conv.s[i + 1] == conv.s[i]);
|
||||||
conv.s[i]); // trap any cases where real was not duplicated
|
// trap any cases where real was not duplicated
|
||||||
// indicating the SIMD grids of real and imag assignment did not correctly
|
// indicating the SIMD grids of real and imag assignment did not correctly
|
||||||
// match
|
// match
|
||||||
conv.s[i + 1] = 0.0; // zero imaginary parts
|
conv.s[i + 1] = 0.0; // zero imaginary parts
|
||||||
|
@ -156,11 +156,18 @@ class iScalar {
|
|||||||
|
|
||||||
// convert from a something to a scalar via constructor of something arg
|
// convert from a something to a scalar via constructor of something arg
|
||||||
template <class T, typename std::enable_if<!isGridTensor<T>::value, T>::type * = nullptr>
|
template <class T, typename std::enable_if<!isGridTensor<T>::value, T>::type * = nullptr>
|
||||||
strong_inline iScalar<vtype> operator=(T arg) {
|
strong_inline iScalar<vtype> operator=(T arg) {
|
||||||
_internal = arg;
|
_internal = arg;
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Convert elements
|
||||||
|
template <class ttype>
|
||||||
|
strong_inline iScalar<vtype> operator=(iScalar<ttype> &&arg) {
|
||||||
|
_internal = arg._internal;
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
friend std::ostream &operator<<(std::ostream &stream,const iScalar<vtype> &o) {
|
friend std::ostream &operator<<(std::ostream &stream,const iScalar<vtype> &o) {
|
||||||
stream << "S {" << o._internal << "}";
|
stream << "S {" << o._internal << "}";
|
||||||
return stream;
|
return stream;
|
||||||
|
@ -80,8 +80,11 @@ template<class vtype, int N> inline iVector<vtype, N> Exponentiate(const iVector
|
|||||||
mat iQ2 = arg*arg*alpha*alpha;
|
mat iQ2 = arg*arg*alpha*alpha;
|
||||||
mat iQ3 = arg*iQ2*alpha;
|
mat iQ3 = arg*iQ2*alpha;
|
||||||
// sign in c0 from the conventions on the Ta
|
// sign in c0 from the conventions on the Ta
|
||||||
c0 = -imag( trace(iQ3) ) * one_over_three;
|
scalar imQ3, reQ2;
|
||||||
c1 = -real( trace(iQ2) ) * one_over_two;
|
imQ3 = imag( trace(iQ3) );
|
||||||
|
reQ2 = real( trace(iQ2) );
|
||||||
|
c0 = -imQ3 * one_over_three;
|
||||||
|
c1 = -reQ2 * one_over_two;
|
||||||
|
|
||||||
// Cayley Hamilton checks to machine precision, tested
|
// Cayley Hamilton checks to machine precision, tested
|
||||||
tmp = c1 * one_over_three;
|
tmp = c1 * one_over_three;
|
||||||
|
@ -73,7 +73,7 @@ int main (int argc, char ** argv)
|
|||||||
|
|
||||||
std::vector<LatticeColourMatrix> U(4,&Fine);
|
std::vector<LatticeColourMatrix> U(4,&Fine);
|
||||||
|
|
||||||
NerscField header;
|
FieldMetaData header;
|
||||||
|
|
||||||
std::string file("./ckpoint_lat.4000");
|
std::string file("./ckpoint_lat.4000");
|
||||||
NerscIO::readConfiguration(Umu,header,file);
|
NerscIO::readConfiguration(Umu,header,file);
|
||||||
|
@ -90,7 +90,7 @@ int main (int argc, char ** argv)
|
|||||||
|
|
||||||
std::vector<LatticeColourMatrix> U(4,&Fine);
|
std::vector<LatticeColourMatrix> U(4,&Fine);
|
||||||
|
|
||||||
NerscField header;
|
FieldMetaData header;
|
||||||
|
|
||||||
std::string file("./ckpoint_lat.4000");
|
std::string file("./ckpoint_lat.4000");
|
||||||
NerscIO::readConfiguration(Umu,header,file);
|
NerscIO::readConfiguration(Umu,header,file);
|
||||||
|
@ -336,7 +336,7 @@ int main(int argc, char **argv) {
|
|||||||
|
|
||||||
std::cout << GridLogMessage << "norm cMmat : " << norm2(cMat)
|
std::cout << GridLogMessage << "norm cMmat : " << norm2(cMat)
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
cMat = expMat(cMat, ComplexD(1.0, 0.0));
|
cMat = expMat(cMat,1.0);// ComplexD(1.0, 0.0));
|
||||||
std::cout << GridLogMessage << "norm expMat: " << norm2(cMat)
|
std::cout << GridLogMessage << "norm expMat: " << norm2(cMat)
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
peekSite(cm, cMat, mysite);
|
peekSite(cm, cMat, mysite);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user