From 2b2fc6453f34210b99350eaec7de85e02fdd0784 Mon Sep 17 00:00:00 2001 From: Lanny91 Date: Tue, 7 Feb 2017 13:59:29 +0000 Subject: [PATCH] Fixed single precision compatibility issues --- extras/Hadrons/Modules/MContraction/Meson.hpp | 2 +- extras/Hadrons/Modules/MSink/Wall.hpp | 2 +- extras/Hadrons/Modules/MSource/SeqGamma.hpp | 2 +- extras/Hadrons/Modules/MSource/Wall.hpp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/extras/Hadrons/Modules/MContraction/Meson.hpp b/extras/Hadrons/Modules/MContraction/Meson.hpp index a46dd445..1ea46eb6 100644 --- a/extras/Hadrons/Modules/MContraction/Meson.hpp +++ b/extras/Hadrons/Modules/MContraction/Meson.hpp @@ -181,7 +181,7 @@ void TMeson::execute(void) LatticeCoordinate(coor, mu); ph = ph + p[mu]*coor*((1./(env().getGrid()->_fdimensions[mu]))); } - ph = exp(-2*M_PI*i*ph); + ph = exp(-(Real)(2*M_PI)*i*ph); parseGammaString(gammaList); diff --git a/extras/Hadrons/Modules/MSink/Wall.hpp b/extras/Hadrons/Modules/MSink/Wall.hpp index 81780f62..9c39528b 100644 --- a/extras/Hadrons/Modules/MSink/Wall.hpp +++ b/extras/Hadrons/Modules/MSink/Wall.hpp @@ -133,7 +133,7 @@ void TWall::execute(void) LatticeCoordinate(coor, mu); ph = ph + p[mu]*coor*((1./(env().getGrid()->_fdimensions[mu]))); } - ph = exp(-2*M_PI*i*ph); + ph = exp(-(Real)(2*M_PI)*i*ph); sliceSum(ph*q, prop, Tp); } diff --git a/extras/Hadrons/Modules/MSource/SeqGamma.hpp b/extras/Hadrons/Modules/MSource/SeqGamma.hpp index fab3751f..366ebee7 100644 --- a/extras/Hadrons/Modules/MSource/SeqGamma.hpp +++ b/extras/Hadrons/Modules/MSource/SeqGamma.hpp @@ -152,7 +152,7 @@ void TSeqGamma::execute(void) LatticeCoordinate(coor, mu); ph = ph + p[mu]*coor*((1./(env().getGrid()->_fdimensions[mu]))); } - ph = exp(2*M_PI*i*ph); + ph = exp((Real)(2*M_PI)*i*ph); LatticeCoordinate(t, Tp); src = where((t >= par().tA) and (t <= par().tB), ph*(g*q), 0.*q); } diff --git a/extras/Hadrons/Modules/MSource/Wall.hpp b/extras/Hadrons/Modules/MSource/Wall.hpp index a8e88ee9..8722876f 100644 --- a/extras/Hadrons/Modules/MSource/Wall.hpp +++ b/extras/Hadrons/Modules/MSource/Wall.hpp @@ -134,7 +134,7 @@ void TWall::execute(void) LatticeCoordinate(coor, mu); ph = ph + p[mu]*coor*((1./(env().getGrid()->_fdimensions[mu]))); } - ph = exp(2*M_PI*i*ph); + ph = exp((Real)(2*M_PI)*i*ph); LatticeCoordinate(t, Tp); src = 1.; src = where((t == par().tW), src*ph, 0.*src);