X-Git-Url: http://git.euphorik.ch/?p=GPU.git;a=blobdiff_plain;f=WCudaMSE%2FStudent_Cuda_Image%2Fsrc%2Fcpp%2Fcore%2F01_Rippling%2Fmoo%2Fhost%2FRippling.cu;h=eb49b085b1b885697ae2ace347989101f0949909;hp=6bd9e0cebbecdf94eed9b36a54e12cc27e999696;hb=b1138708dfa104f784170fcf2d50989156e5c5d0;hpb=f4016003996bd8f9dd903ad9ba6ec6269140a928 diff --git a/WCudaMSE/Student_Cuda_Image/src/cpp/core/01_Rippling/moo/host/Rippling.cu b/WCudaMSE/Student_Cuda_Image/src/cpp/core/01_Rippling/moo/host/Rippling.cu index 6bd9e0c..eb49b08 100755 --- a/WCudaMSE/Student_Cuda_Image/src/cpp/core/01_Rippling/moo/host/Rippling.cu +++ b/WCudaMSE/Student_Cuda_Image/src/cpp/core/01_Rippling/moo/host/Rippling.cu @@ -38,18 +38,13 @@ extern __global__ void rippling(uchar4* ptrDevPixels, int w, int h, float t); \*-------------------------*/ Rippling::Rippling(int w, int h, float dt) + : w(w), h(h), dt(dt), t(0) { assert(w == h); - // Inputs - this->w = w; - this->h = h; - this->dt = dt; - // Tools - //this->dg = // TODO - //this->db = // TODO - this->t = 0; + this->dg = dim3(8, 8, 1); // disons a optimiser + this->db = dim3(16, 16, 1); // disons a optimiser // Outputs this->title = "Rippling Cuda"; @@ -72,7 +67,7 @@ Rippling::~Rippling() */ void Rippling::animationStep() { - // TODO + this->t += dt; } /** @@ -80,7 +75,7 @@ void Rippling::animationStep() */ void Rippling::runGPU(uchar4* ptrDevPixels) { - // TODO lancer le kernel avec <<>> + rippling<<>>(ptrDevPixels, this->w, this->h, this->t); } /*--------------*\