From f4016003996bd8f9dd903ad9ba6ec6269140a928 Mon Sep 17 00:00:00 2001 From: gburri Date: Wed, 8 Oct 2014 22:20:44 +0200 Subject: [PATCH] Clean-up. --- .../src/cpp/core/01_Rippling/b_moo/RipplingMOO.cpp | 8 +++----- .../src/cpp/core/00_Vague_warmup/02_cuda/vague0.cu | 4 ++-- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/WCudaMSE/Student_OMP_Image/src/cpp/core/01_Rippling/b_moo/RipplingMOO.cpp b/WCudaMSE/Student_OMP_Image/src/cpp/core/01_Rippling/b_moo/RipplingMOO.cpp index 18f672d..18f7e3b 100755 --- a/WCudaMSE/Student_OMP_Image/src/cpp/core/01_Rippling/b_moo/RipplingMOO.cpp +++ b/WCudaMSE/Student_OMP_Image/src/cpp/core/01_Rippling/b_moo/RipplingMOO.cpp @@ -49,10 +49,10 @@ RipplingMOO::~RipplingMOO(void) void RipplingMOO::process(uchar4* ptrTabPixels, int w, int h) // Pourquoi w et h ne sont pas utilisé?? { - if (this->isEntrelacement)x - this->entrelacementOMP(ptrTabPixels); // Plus lent + if (this->isEntrelacement) + this->entrelacementOMP(ptrTabPixels); // Plus lent. else - this->forAutoOMP(ptrTabPixels); // Plus rapide + this->forAutoOMP(ptrTabPixels); // Plus rapide. this->isEntrelacement = ! this->isEntrelacement; // Pour tester que les deux implementations fonctionnent } @@ -109,14 +109,12 @@ void RipplingMOO::forAutoOMP(uchar4* ptrTabPixels) #pragma omp parallel for for (int i = 0; i < h; i++) - { for (int j = 0; j < w; j++) { // int s = i * W + j; const int s = IndiceTools::toS(w, i, j); // i[0,H[ j[0,W[ --> s[0,W*H[ ripplingMath.colorIJ(&ptrTabPixels[s], i, j,t); } - } } /*----------------------------------------------------------------------*\ diff --git a/WCudaMSE/Tuto_Image_Cuda/src/cpp/core/00_Vague_warmup/02_cuda/vague0.cu b/WCudaMSE/Tuto_Image_Cuda/src/cpp/core/00_Vague_warmup/02_cuda/vague0.cu index 0f55f38..a25438d 100755 --- a/WCudaMSE/Tuto_Image_Cuda/src/cpp/core/00_Vague_warmup/02_cuda/vague0.cu +++ b/WCudaMSE/Tuto_Image_Cuda/src/cpp/core/00_Vague_warmup/02_cuda/vague0.cu @@ -43,9 +43,9 @@ void launchKernelVague0(uchar4* ptrDevPixels, int w, int h, float t) dim3 db = dim3(16, 16, 1); // disons, a optimiser !! //Device::print(dg, db); - Device::checkDimError(dg,db); + Device::checkDimError(dg,db); - vague0<<>>(ptrDevPixels,w,h,t); + vague0<<>>(ptrDevPixels,w,h,t); Device::checkKernelError("vague0"); } -- 2.43.0