Cleanage.
[GPU.git] / WCudaMSE / Student_Cuda_Image / src / cpp / core / 02_Mandelbrot_Julia / moo / device / FractalDevice.cu
index 997b32b..a98ed36 100755 (executable)
@@ -1,8 +1,9 @@
+#include "FractalDevice.h"\r
+\r
 #include <iostream>\r
 \r
 #include "Indice2D.h"\r
 #include "IndiceTools.h"\r
-#include "DomaineMath.h"\r
 #include "cudaTools.h"\r
 #include "Device.h"\r
 \r
 using std::cout;\r
 using std::endl;\r
 \r
-__global__ void fractalMandelbrot(uchar4* ptrDevPixels, int w, int h, DomaineMath domaineMath, int n);\r
-__global__ void fractalJulia(uchar4* ptrDevPixels, int w, int h, DomaineMath domaineMath, int n, float c_r, float c_i);\r
-__device__ void fractal(uchar4* ptrDevPixels, int w, int h, const DomaineMath& domaineMath, int n, const FractalMath& fractalMath);\r
-\r
-__global__ void fractalMandelbrot(uchar4* ptrDevPixels, int w, int h, DomaineMath domaineMath, int n)\r
-    {\r
-    FractalMandelbrotMath fractalMath(n);\r
-    fractal(ptrDevPixels, w, h, domaineMath, n, fractalMath);\r
-    }\r
-\r
-__global__ void fractalJulia(uchar4* ptrDevPixels, int w, int h, DomaineMath domaineMath, int n, float c_r, float c_i)\r
-    {\r
-    FractalJuliaMath fractalMath(n, c_r, c_i);\r
-    fractal(ptrDevPixels, w, h, domaineMath, n, fractalMath);\r
-    }\r
-\r
 __device__ void fractal(uchar4* ptrDevPixels, int w, int h, const DomaineMath& domaineMath, int n, const FractalMath& fractalMath)\r
     {\r
     const int TID = Indice2D::tid();\r
@@ -55,3 +40,16 @@ __device__ void fractal(uchar4* ptrDevPixels, int w, int h, const DomaineMath& d
         s += NB_THREAD;\r
         }\r
     }\r
+\r
+__global__ void fractalMandelbrot(uchar4* ptrDevPixels, int w, int h, DomaineMath domaineMath, int n)\r
+    {\r
+    FractalMandelbrotMath fractalMath(n);\r
+    fractal(ptrDevPixels, w, h, domaineMath, n, fractalMath);\r
+    }\r
+\r
+__global__ void fractalJulia(uchar4* ptrDevPixels, int w, int h, DomaineMath domaineMath, int n, float c_r, float c_i)\r
+    {\r
+    FractalJuliaMath fractalMath(n, c_r, c_i);\r
+    fractal(ptrDevPixels, w, h, domaineMath, n, fractalMath);\r
+    }\r
+\r