From: gburri Date: Wed, 1 Oct 2014 21:03:47 +0000 (+0200) Subject: Initialize le tableau à zero. X-Git-Url: http://git.euphorik.ch/index.cgi?a=commitdiff_plain;h=d8613c8e60ee8b1f79466d0427d865138d29761f;p=GPU.git Initialize le tableau à zero. --- 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;