From d8613c8e60ee8b1f79466d0427d865138d29761f Mon Sep 17 00:00:00 2001 From: gburri Date: Wed, 1 Oct 2014 23:03:47 +0200 Subject: [PATCH] =?utf8?q?Initialize=20le=20tableau=20=C3=A0=20zero.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../src/cpp/core/omp/02_pi/02_pi_entrelacer_promotionTab.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/WCudaMSE/Student_OMP/src/cpp/core/omp/02_pi/02_pi_entrelacer_promotionTab.cpp b/WCudaMSE/Student_OMP/src/cpp/core/omp/02_pi/02_pi_entrelacer_promotionTab.cpp index db48e25..12b8577 100755 --- a/WCudaMSE/Student_OMP/src/cpp/core/omp/02_pi/02_pi_entrelacer_promotionTab.cpp +++ b/WCudaMSE/Student_OMP/src/cpp/core/omp/02_pi/02_pi_entrelacer_promotionTab.cpp @@ -1,4 +1,7 @@ #include + +#include + #include "00_pi_tools.h" #include "OmpTools.h" @@ -48,6 +51,7 @@ double piOMPEntrelacerPromotionTab(int n) const int NB_THREAD = OmpTools::setAndGetNaturalGranularity(); double* tabSums = new double[NB_THREAD]; + memset(tabSums, 0, NB_THREAD * sizeof(double)); const double DX = 1.0/(double)n; -- 2.43.0