X-Git-Url: http://git.euphorik.ch/?a=blobdiff_plain;f=WCudaMSE%2FStudent_Cuda_Image%2Fsrc%2Fcpp%2Fcore%2F01_Rippling%2Fmoo%2Fhost%2FRippling.cu;h=43068a275836ea146d576d9384d9db2030984638;hb=HEAD;hp=6bd9e0cebbecdf94eed9b36a54e12cc27e999696;hpb=8d08c12b29c2a14684f35c023ee39e694bb80d25;p=GPU.git 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..43068a2 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,22 +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), + dg(8, 8, 1), + db(16, 16, 1), + title("Rippling Cuda") { assert(w == h); - // Inputs - this->w = w; - this->h = h; - this->dt = dt; - - // Tools - //this->dg = // TODO - //this->db = // TODO - this->t = 0; - - // Outputs - this->title = "Rippling Cuda"; - //print(dg, db); Device::assertDim(dg, db); } @@ -72,7 +63,7 @@ Rippling::~Rippling() */ void Rippling::animationStep() { - // TODO + this->t += dt; } /** @@ -80,7 +71,7 @@ void Rippling::animationStep() */ void Rippling::runGPU(uchar4* ptrDevPixels) { - // TODO lancer le kernel avec <<>> + rippling<<>>(ptrDevPixels, this->w, this->h, this->t); } /*--------------*\