X-Git-Url: http://git.euphorik.ch/?p=GPU.git;a=blobdiff_plain;f=WCudaMSE%2FStudent_Cuda_Image%2Fsrc%2Fcpp%2Fcore%2F03_Newton%2Fmoo%2Fdevice%2FNewtonDevice.cu;h=3399d926627ff278ad3d84ec3c7f07c2da11266c;hp=536b75bd3c0adbe09900a937f28c36c978aafc8e;hb=2d95edd9a2d09421e5eae56755bdf3105e12edf7;hpb=19015d26dfb874d075516772ef531ee5e42fa213 diff --git a/WCudaMSE/Student_Cuda_Image/src/cpp/core/03_Newton/moo/device/NewtonDevice.cu b/WCudaMSE/Student_Cuda_Image/src/cpp/core/03_Newton/moo/device/NewtonDevice.cu index 536b75b..3399d92 100755 --- a/WCudaMSE/Student_Cuda_Image/src/cpp/core/03_Newton/moo/device/NewtonDevice.cu +++ b/WCudaMSE/Student_Cuda_Image/src/cpp/core/03_Newton/moo/device/NewtonDevice.cu @@ -1,4 +1,6 @@ #include +#include +using namespace std; #include "Indice2D.h" #include "IndiceTools.h" @@ -8,9 +10,6 @@ #include "NewtonMath.h" -using std::cout; -using std::endl; - __global__ void newton(uchar4* ptrDevPixels, int w, int h, DomaineMath domaineMath) { const int TID = Indice2D::tid(); @@ -20,7 +19,7 @@ __global__ void newton(uchar4* ptrDevPixels, int w, int h, DomaineMath domaineMa NewtonMath newtonMath; uchar4 color; - color.z = 255; // Par défaut, l'image est opaque. + color.w = 255; // Par défaut, l'image est opaque. double x, y; int pixelI, pixelJ; @@ -30,8 +29,8 @@ __global__ void newton(uchar4* ptrDevPixels, int w, int h, DomaineMath domaineMa { IndiceTools::toIJ(s, w, &pixelI, &pixelJ); // update (pixelI, pixelJ) - // (i,j) domaine ecran - // (x,y) domaine math + // (i,j) domaine écran. + // (x,y) domaine math. domaineMath.toXY(pixelI, pixelJ, &x, &y); // (i,j) -> (x,y) newtonMath.colorXY(&color, x, y);