Remplacement des 'powf(a, 2)' par 'a*a'.
[GPU.git] / WCudaMSE / Student_Cuda_Image / src / cpp / core / 03_Newton / moo / device / NewtonDevice.cu
index 3399d92..534e37f 100755 (executable)
@@ -2,21 +2,23 @@
 #include <stdio.h>\r
 using namespace std;\r
 \r
+#include "NewtonDevice.h"\r
+\r
 #include "Indice2D.h"\r
 #include "IndiceTools.h"\r
-#include "DomaineMath.h"\r
 #include "cudaTools.h"\r
 #include "Device.h"\r
 \r
 #include "NewtonMath.h"\r
 \r
-__global__ void newton(uchar4* ptrDevPixels, int w, int h, DomaineMath domaineMath)\r
+__global__\r
+void newton(uchar4* ptrDevPixels, int w, int h, DomaineMath domaineMath, int n, float epsilon)\r
     {\r
     const int TID = Indice2D::tid();\r
     const int NB_THREAD = Indice2D::nbThread();\r
     const int WH = w * h;\r
 \r
-    NewtonMath newtonMath;\r
+    NewtonMath newtonMath(n, epsilon);\r
 \r
     uchar4 color;\r
     color.w = 255; // Par défaut, l'image est opaque.\r
@@ -31,7 +33,7 @@ __global__ void newton(uchar4* ptrDevPixels, int w, int h, DomaineMath domaineMa
 \r
         // (i,j) domaine écran.\r
         // (x,y) domaine math.\r
-        domaineMath.toXY(pixelI, pixelJ, &x, &y); //  (i,j) -> (x,y)\r
+        domaineMath.toXY(pixelI, pixelJ, &x, &y); // (i,j) -> (x,y).\r
 \r
         newtonMath.colorXY(&color, x, y);\r
 \r