X-Git-Url: http://git.euphorik.ch/?p=GPU.git;a=blobdiff_plain;f=WCudaMSE%2FStudent_Cuda_Image%2Fsrc%2Fcpp%2Fcore%2F03_Newton%2Fmoo%2Fhost%2FNewton.cu;fp=WCudaMSE%2FStudent_Cuda_Image%2Fsrc%2Fcpp%2Fcore%2F03_Newton%2Fmoo%2Fhost%2FNewton.cu;h=eaa92eae6c5bd8b51d37d329151ae61d4d8a893e;hp=a468b057e7cbefa56a64834ad11979fa4de6d367;hb=f2c6a4fc79746e2d5c6678699bd2ca93ffc49bcc;hpb=ebdad7dc732d4742d09fd72d312175cb07d27a59 diff --git a/WCudaMSE/Student_Cuda_Image/src/cpp/core/03_Newton/moo/host/Newton.cu b/WCudaMSE/Student_Cuda_Image/src/cpp/core/03_Newton/moo/host/Newton.cu index a468b05..eaa92ea 100755 --- a/WCudaMSE/Student_Cuda_Image/src/cpp/core/03_Newton/moo/host/Newton.cu +++ b/WCudaMSE/Student_Cuda_Image/src/cpp/core/03_Newton/moo/host/Newton.cu @@ -7,14 +7,14 @@ using namespace std; #include "Device.h" #include "NewtonDevice.h" -Newton::Newton(int w, int h) - : variateurN(IntervalI(5, 1000), 1), - variateurEpsilon(IntervalF(0.01, 10), 0.01), - w(w), h(h), - dg(8, 8, 1), - db(32, 32, 1), - ptrDomaineMathInit(new DomaineMath(-2, -2, 2, 2)), - title("Fractal Newton") +Newton::Newton(int w, int h) : + variateurEpsilon(IntervalF(0.01, 1), 0.001), + w(w), + h(h), + dg(8, 8, 1), + db(32, 32, 1), + ptrDomaineMathInit(new DomaineMath(-2, -2, 2, 2)), + title("Fractal Newton") { Device::assertDim(dg, db); } @@ -26,14 +26,13 @@ Newton::~Newton() void Newton::runGPU(uchar4* ptrDevPixels, const DomaineMath& domaineMath) { - newton<<>>(ptrDevPixels, this->w, this->h, domaineMath, this->t, this->epsilon); + newton<<>>(ptrDevPixels, this->w, this->h, domaineMath, 100, this->epsilon); HANDLE_ERROR(cudaDeviceSynchronize()); // Pour flusher les 'printf' (pour le DEBUG). } void Newton::animationStep() { - this->t = this->variateurN.varierAndGet(); this->epsilon = this->variateurEpsilon.varierAndGet(); } @@ -54,7 +53,12 @@ DomaineMath* Newton::getDomaineMathInit() float Newton::getT() { - return this->t; + return this->epsilon; + } + +string Newton::getTName() + { + return "epsilon : "; } string Newton::getTitle()