1 #include "Indice2D.h"
\r
2 #include "IndiceTools.h"
\r
3 #include "cudaTools.h"
\r
6 #include "VagueMath.h"
\r
8 // Attention : Choix du nom est impotant!
\r
9 // VagueDevice.cu et non Vague.cu
\r
10 // Dans ce dernier cas, problème de linkage, car le nom du .cu est le meme que le nom d'un .cpp (host)
\r
11 // On a donc ajouter Device (ou n'importequoi) pour que les noms soient différents!
\r
13 /*----------------------------------------------------------------------*\
\r
15 \*---------------------------------------------------------------------*/
\r
17 /*--------------------------------------*\
\r
19 \*-------------------------------------*/
\r
21 __global__ void vague(uchar4* ptrDevPixels,int w, int h,float t);
\r
23 /*--------------------------------------*\
\r
25 \*-------------------------------------*/
\r
27 /*----------------------------------------------------------------------*\
\r
28 |* Implementation *|
\r
29 \*---------------------------------------------------------------------*/
\r
31 /*--------------------------------------*\
\r
33 \*-------------------------------------*/
\r
35 __global__ void vague(uchar4* ptrDevPixels, int w, int h, float t)
\r
37 VagueMath vagueMath = VagueMath(w, h);
\r
39 const int TID = Indice2D::tid();
\r
40 const int NB_THREAD = Indice2D::nbThread();
\r
52 IndiceTools::toIJ(s, w, &pixelI, &pixelJ); // update (pixelI, pixelJ)
\r
54 vagueMath.colorIJ(&color,pixelI, pixelJ, t); // update color
\r
55 ptrDevPixels[s] = color;
\r
61 /*--------------------------------------*\
\r
63 \*-------------------------------------*/
\r
65 /*----------------------------------------------------------------------*\
\r
67 \*---------------------------------------------------------------------*/
\r