Fixed types

This commit is contained in:
Guilhem Lavaux 2014-03-03 19:06:31 +01:00
parent 126e1461b9
commit a2373d8919

View File

@ -36,6 +36,7 @@ knowledge of the CeCILL license and that you accept its terms.
#ifndef __DETAILS_EUCLIDIAN_MAPS #ifndef __DETAILS_EUCLIDIAN_MAPS
#define __DETAILS_EUCLIDIAN_MAPS #define __DETAILS_EUCLIDIAN_MAPS
#include <cmath>
namespace CosmoTool namespace CosmoTool
{ {
@ -246,7 +247,7 @@ namespace CosmoTool
{ {
long idx = q0+dims[0]*p; long idx = q0+dims[0]*p;
assert(idx < this->size()); assert(idx < this->size());
result += 2*(conj(d1[idx]) * d2[idx]).real(); result += T(2)*(std::conj(d1[idx]) * d2[idx]).real();
} }
} }
if (even0) if (even0)
@ -254,8 +255,8 @@ namespace CosmoTool
for (long p = 0; p < plane_size; p++) for (long p = 0; p < plane_size; p++)
{ {
long q0 = N0*p, q1 = (p+1)*N0-1; long q0 = N0*p, q1 = (p+1)*N0-1;
result += 2*conj(d1[q0]) * d2[q0]; result += T(2)*std::conj(d1[q0]) * d2[q0];
result += 2*conj(d1[q1]) * d2[q1]; result += T(2)*std::conj(d1[q1]) * d2[q1];
} }
} }
return result; return result;