From 09551ae85bc92d919fb9718c2fbca1d33e257386 Mon Sep 17 00:00:00 2001 From: Guilhem Lavaux Date: Sun, 11 Nov 2012 13:30:41 -0500 Subject: [PATCH] Fixed index computation in dot-product --- src/fourier/euclidian.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fourier/euclidian.hpp b/src/fourier/euclidian.hpp index 1fbd480..56d6964 100644 --- a/src/fourier/euclidian.hpp +++ b/src/fourier/euclidian.hpp @@ -195,7 +195,7 @@ namespace CosmoTool { for (long p = 0; p < plane_size; p++) { - long idx = q0+N0*p; + long idx = q0+dims[0]*p; assert(idx < this->size()); result += 2*(conj(d1[idx]) * d2[idx]).real(); }