X-Git-Url: http://git.euphorik.ch/?a=blobdiff_plain;f=WCudaMSE%2FStudent_Cuda_Image%2Fsrc%2Fcpp%2Fcore%2F03_Newton%2Fmoo%2Fdevice%2FNewtonDevice.cu;h=cc0b8a8ed943930e6fe31b1de067e51dc91fe027;hb=f2c6a4fc79746e2d5c6678699bd2ca93ffc49bcc;hp=3399d926627ff278ad3d84ec3c7f07c2da11266c;hpb=2d95edd9a2d09421e5eae56755bdf3105e12edf7;p=GPU.git 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..cc0b8a8 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 @@ -4,19 +4,20 @@ using namespace std; #include "Indice2D.h" #include "IndiceTools.h" -#include "DomaineMath.h" #include "cudaTools.h" #include "Device.h" +#include "NewtonDevice.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 +32,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);