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=534e37f16c466cb6ad53a0310baef84dfe6436ce;hp=3399d926627ff278ad3d84ec3c7f07c2da11266c;hb=7753d7abc9c1cdf90793a2936221aa4951c574b3;hpb=cb39d6a91b65d2862018430d65e633d2a8fdc818 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 3399d92..534e37f 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 @@ -2,21 +2,23 @@ #include using namespace std; +#include "NewtonDevice.h" + #include "Indice2D.h" #include "IndiceTools.h" -#include "DomaineMath.h" #include "cudaTools.h" #include "Device.h" #include "NewtonMath.h" -__global__ void newton(uchar4* ptrDevPixels, int w, int h, DomaineMath domaineMath) +__global__ +void newton(uchar4* ptrDevPixels, int w, int h, DomaineMath domaineMath, int n, float epsilon) { const int TID = Indice2D::tid(); const int NB_THREAD = Indice2D::nbThread(); const int WH = w * h; - NewtonMath newtonMath; + NewtonMath newtonMath(n, epsilon); uchar4 color; color.w = 255; // Par défaut, l'image est opaque. @@ -31,7 +33,7 @@ __global__ void newton(uchar4* ptrDevPixels, int w, int h, DomaineMath domaineMa // (i,j) domaine écran. // (x,y) domaine math. - domaineMath.toXY(pixelI, pixelJ, &x, &y); // (i,j) -> (x,y) + domaineMath.toXY(pixelI, pixelJ, &x, &y); // (i,j) -> (x,y). newtonMath.colorXY(&color, x, y);