diff --git a/Student_Cuda/out/SliceGMHOST_justesse.html b/Student_Cuda/out/SliceGMHOST_justesse.html index 850fe17..eef7ab8 100644 --- a/Student_Cuda/out/SliceGMHOST_justesse.html +++ b/Student_Cuda/out/SliceGMHOST_justesse.html @@ -87,7 +87,7 @@ Designed by CppTest 0 0 100% - 4.000000 + 3.000000
@@ -106,7 +106,7 @@ Designed by CppTest 14 0 100% - 4.000000 + 3.000000
@@ -189,7 +189,7 @@ Designed by CppTest testMonoBlock 0 true - 3.000000 + 2.000000 testMonoThread diff --git a/Student_Cuda/out/SliceGMHOST_performance.html b/Student_Cuda/out/SliceGMHOST_performance.html index 80c02e1..09ddb05 100644 --- a/Student_Cuda/out/SliceGMHOST_performance.html +++ b/Student_Cuda/out/SliceGMHOST_performance.html @@ -87,7 +87,7 @@ Designed by CppTest 1 0 100% - 11.000000 + 10.000000
@@ -106,7 +106,7 @@ Designed by CppTest 1 0 100% - 11.000000 + 10.000000
@@ -123,7 +123,7 @@ Designed by CppTest performanceOnly 0 true - 11.000000 + 10.000000

Back to top diff --git a/Student_Cuda/out/SliceGM_justesse.html b/Student_Cuda/out/SliceGM_justesse.html index 8dbb9df..c4f7b8b 100644 --- a/Student_Cuda/out/SliceGM_justesse.html +++ b/Student_Cuda/out/SliceGM_justesse.html @@ -153,7 +153,7 @@ Designed by CppTest testDB64 0 true - 0.000000 + 1.000000 testDB128 @@ -183,7 +183,7 @@ Designed by CppTest testGrid 0 true - 1.000000 + 0.000000 testMonoBlock diff --git a/Student_Cuda/out/SliceGM_performance.html b/Student_Cuda/out/SliceGM_performance.html index 3a230d3..932bdd3 100644 --- a/Student_Cuda/out/SliceGM_performance.html +++ b/Student_Cuda/out/SliceGM_performance.html @@ -87,7 +87,7 @@ Designed by CppTest 1 0 100% - 10.000000 + 11.000000


@@ -106,7 +106,7 @@ Designed by CppTest 1 0 100% - 10.000000 + 11.000000
@@ -123,7 +123,7 @@ Designed by CppTest performanceOnly 0 true - 10.000000 + 11.000000

Back to top diff --git a/Student_Cuda/out/SliceSM_justesse.html b/Student_Cuda/out/SliceSM_justesse.html index 560a26c..3f6317d 100644 --- a/Student_Cuda/out/SliceSM_justesse.html +++ b/Student_Cuda/out/SliceSM_justesse.html @@ -87,7 +87,7 @@ Designed by CppTest 0 0 100% - 1.000000 + 0.000000


@@ -106,7 +106,7 @@ Designed by CppTest 13 0 100% - 1.000000 + 0.000000
@@ -183,7 +183,7 @@ Designed by CppTest testGrid 0 true - 1.000000 + 0.000000 testMonoBlock diff --git a/Student_Cuda/out/SliceSM_performance.html b/Student_Cuda/out/SliceSM_performance.html index 39fddcf..b0b9362 100644 --- a/Student_Cuda/out/SliceSM_performance.html +++ b/Student_Cuda/out/SliceSM_performance.html @@ -87,7 +87,7 @@ Designed by CppTest 1 0 100% - 8.000000 + 11.000000
@@ -106,7 +106,7 @@ Designed by CppTest 1 0 100% - 8.000000 + 11.000000
@@ -123,7 +123,7 @@ Designed by CppTest performanceOnly 0 true - 8.000000 + 11.000000

Back to top diff --git a/Student_Cuda/src/main/mainTest.cpp b/Student_Cuda/src/main/mainTest.cpp index b8858d8..9a2c273 100755 --- a/Student_Cuda/src/main/mainTest.cpp +++ b/Student_Cuda/src/main/mainTest.cpp @@ -53,13 +53,13 @@ int mainTest() * activer ci-dessous la version souhaiter */ void slice() { - // VTSliceGMHOST test1; - // VTSliceGM test2; + VTSliceGMHOST test1; + VTSliceGM test2; VTSliceSM test3; - // test1.run(); - // test2.run(); + test1.run(); + test2.run(); test3.run(); } diff --git a/Student_Cuda/src/main/mainUse.cpp b/Student_Cuda/src/main/mainUse.cpp index fb9ac41..20cd362 100755 --- a/Student_Cuda/src/main/mainUse.cpp +++ b/Student_Cuda/src/main/mainUse.cpp @@ -66,12 +66,12 @@ int mainUse() */ void slice(bool& isOk) { - // SliceGmHostUse sliceGmHostUse(IS_VERBOSE); - // SliceGmUse sliceGmUse(IS_VERBOSE); + SliceGmHostUse sliceGmHostUse(IS_VERBOSE); + SliceGmUse sliceGmUse(IS_VERBOSE); SliceSmUse sliceSmUse(IS_VERBOSE); - // isOk &= sliceGmHostUse.isOk(IS_VERBOSE); - // isOk &= sliceGmUse.isOk(IS_VERBOSE); + isOk &= sliceGmHostUse.isOk(IS_VERBOSE); + isOk &= sliceGmUse.isOk(IS_VERBOSE); isOk &= sliceSmUse.isOk(IS_VERBOSE); } diff --git a/Student_Cuda_Image/out/Rippling_performance.html b/Student_Cuda_Image/out/Rippling_performance.html index 1332575..de22f3c 100644 --- a/Student_Cuda_Image/out/Rippling_performance.html +++ b/Student_Cuda_Image/out/Rippling_performance.html @@ -87,7 +87,7 @@ Designed by CppTest 1 0 100% - 8.000000 + 16.000000


@@ -106,7 +106,7 @@ Designed by CppTest 1 0 100% - 8.000000 + 16.000000
@@ -123,7 +123,7 @@ Designed by CppTest performanceOnly 0 true - 8.000000 + 16.000000

Back to top diff --git a/Student_Cuda_Image/src/core/01_student/01_Rippling/host/Rippling_BestGrid.h b/Student_Cuda_Image/src/core/01_student/01_Rippling/host/Rippling_BestGrid.h index 41d9d6f..9726986 100755 --- a/Student_Cuda_Image/src/core/01_student/01_Rippling/host/Rippling_BestGrid.h +++ b/Student_Cuda_Image/src/core/01_student/01_Rippling/host/Rippling_BestGrid.h @@ -18,15 +18,15 @@ namespace rippling { public: static Grid get() { - const int MP = Hardware::getMPCount(); - const int CORE_MP = Hardware::getCoreCountMP(); + const int MP = Hardware::getMPCount(); + const int CORE_MP = Hardware::getCoreCountMP(); - // TODO Rippling - dim3 dg(MP, 1, 1); - dim3 db(CORE_MP, 4, 1); - Grid grid(dg, db); + // TODO Rippling + dim3 dg(MP, 1, 1); + dim3 db(CORE_MP, 4, 1); + Grid grid(dg, db); - return grid; + return grid; } diff --git a/Student_Cuda_Image/src/main/mainBenchmark.cpp b/Student_Cuda_Image/src/main/mainBenchmark.cpp index 5950412..bcd2c40 100755 --- a/Student_Cuda_Image/src/main/mainBenchmark.cpp +++ b/Student_Cuda_Image/src/main/mainBenchmark.cpp @@ -34,8 +34,8 @@ static void raytracingCM2SM(); int mainBenchmark() { // Please, un a la fois! - rippling(); -// mandelbrot(); // Conseil : use nFixe (by example nMin=nMax=80) + // rippling(); + mandelbrot(); // Conseil : use nFixe (by example nMin=nMax=80) // // raytracingGM(); // raytracingSM(); diff --git a/Student_Cuda_Image/src/main/mainBruteforce.cpp b/Student_Cuda_Image/src/main/mainBruteforce.cpp index 72cf416..6a1ff0c 100755 --- a/Student_Cuda_Image/src/main/mainBruteforce.cpp +++ b/Student_Cuda_Image/src/main/mainBruteforce.cpp @@ -44,8 +44,8 @@ int mainBrutforce() { Matlab matlab; // Please, un a la fois! - rippling(&matlab); -// mandelbrot(&matlab); // Conseil : use nFixe (by example nMin=nMax=100) + // rippling(&matlab); + mandelbrot(&matlab); // Conseil : use nFixe (by example nMin=nMax=100) // raytracingGM(&matlab); // raytracingCM(&matlab); // raytracingSM(&matlab); diff --git a/Student_Cuda_Image/src/main/mainImage.cpp b/Student_Cuda_Image/src/main/mainImage.cpp index 082811e..7bfc776 100755 --- a/Student_Cuda_Image/src/main/mainImage.cpp +++ b/Student_Cuda_Image/src/main/mainImage.cpp @@ -31,8 +31,8 @@ int mainImage(const Args& args) { ImageOption zoomable(true, true, true, true); ImageOption nozoomable(false, true, false, false); - Viewer rippling(nozoomable, 0, 0); // imageOption px py -// Viewer mandelbrot(zoomable, 0, 0); + // Viewer rippling(nozoomable, 0, 0); // imageOption px py + Viewer mandelbrot(zoomable, 0, 0); // Viewer raytracingGM(nozoomable, 0, 0); // Viewer raytracingCM(nozoomable, 0, 0); // Viewer raytracingSM(nozoomable, 0, 0); diff --git a/Student_Cuda_Image/src/main/mainTest.cpp b/Student_Cuda_Image/src/main/mainTest.cpp index 897378d..9c4a7d1 100755 --- a/Student_Cuda_Image/src/main/mainTest.cpp +++ b/Student_Cuda_Image/src/main/mainTest.cpp @@ -34,9 +34,9 @@ static void raytracing(); int mainTest() { // activer ci-dessous seulement le TP voulu (pas tous) - rippling(); - //mandelbrot(); // fp16 only - //raytracing(); // voir code ci-dessous pour activer la version voulue + rippling(); + mandelbrot(); // fp16 only + // raytracing(); // voir code ci-dessous pour activer la version voulue return EXIT_SUCCESS; } diff --git a/Student_Cuda_Tools_Reduction/out/Reduce_Add_IntII_justesse.html b/Student_Cuda_Tools_Reduction/out/Reduce_Add_IntII_justesse.html index 30e7ffd..8f8c603 100644 --- a/Student_Cuda_Tools_Reduction/out/Reduce_Add_IntII_justesse.html +++ b/Student_Cuda_Tools_Reduction/out/Reduce_Add_IntII_justesse.html @@ -87,7 +87,7 @@ Designed by CppTest 0 0 100% - 1.000000 + 0.000000


@@ -106,7 +106,7 @@ Designed by CppTest 10 0 100% - 1.000000 + 0.000000
@@ -123,7 +123,7 @@ Designed by CppTest testDB2 0 true - 1.000000 + 0.000000 testDB4 diff --git a/Student_Cuda_Tools_Reduction/out/Reduce_Add_IntII_performance.html b/Student_Cuda_Tools_Reduction/out/Reduce_Add_IntII_performance.html index d1b6225..5130581 100644 --- a/Student_Cuda_Tools_Reduction/out/Reduce_Add_IntII_performance.html +++ b/Student_Cuda_Tools_Reduction/out/Reduce_Add_IntII_performance.html @@ -87,7 +87,7 @@ Designed by CppTest 1 0 100% - 10.000000 + 15.000000
@@ -106,7 +106,7 @@ Designed by CppTest 1 0 100% - 10.000000 + 15.000000
@@ -123,7 +123,7 @@ Designed by CppTest performanceOnly 0 true - 10.000000 + 15.000000

Back to top diff --git a/Student_Cuda_Tools_Reduction/out/Reduce_Add_IntI_justesse.html b/Student_Cuda_Tools_Reduction/out/Reduce_Add_IntI_justesse.html index a345cca..dc29860 100755 --- a/Student_Cuda_Tools_Reduction/out/Reduce_Add_IntI_justesse.html +++ b/Student_Cuda_Tools_Reduction/out/Reduce_Add_IntI_justesse.html @@ -87,7 +87,7 @@ Designed by CppTest 0 0 100% - 0.000000 + 1.000000


@@ -106,7 +106,7 @@ Designed by CppTest 13 0 100% - 0.000000 + 1.000000
@@ -189,7 +189,7 @@ Designed by CppTest testMonoBlock 0 true - 0.000000 + 1.000000 testSpecialeMax diff --git a/Student_Cuda_Tools_Reduction/out/Reduce_Generic_IntII_justesse.html b/Student_Cuda_Tools_Reduction/out/Reduce_Generic_IntII_justesse.html index adb311d..cd4f580 100644 --- a/Student_Cuda_Tools_Reduction/out/Reduce_Generic_IntII_justesse.html +++ b/Student_Cuda_Tools_Reduction/out/Reduce_Generic_IntII_justesse.html @@ -87,7 +87,7 @@ Designed by CppTest 0 0 100% - 0.000000 + 1.000000
@@ -106,7 +106,7 @@ Designed by CppTest 10 0 100% - 0.000000 + 1.000000
@@ -171,7 +171,7 @@ Designed by CppTest testMonoBlock 0 true - 0.000000 + 1.000000 testSpecialeMax diff --git a/Student_Cuda_Tools_Reduction/out/Reduce_Generic_IntII_performance.html b/Student_Cuda_Tools_Reduction/out/Reduce_Generic_IntII_performance.html index b72eeb6..e961bab 100644 --- a/Student_Cuda_Tools_Reduction/out/Reduce_Generic_IntII_performance.html +++ b/Student_Cuda_Tools_Reduction/out/Reduce_Generic_IntII_performance.html @@ -87,7 +87,7 @@ Designed by CppTest 1 0 100% - 11.000000 + 16.000000
@@ -106,7 +106,7 @@ Designed by CppTest 1 0 100% - 11.000000 + 16.000000
@@ -123,7 +123,7 @@ Designed by CppTest performanceOnly 0 true - 11.000000 + 16.000000

Back to top diff --git a/Student_Cuda_Tools_Reduction/out/Reduce_Generic_LongII_justesse.html b/Student_Cuda_Tools_Reduction/out/Reduce_Generic_LongII_justesse.html index a934ff6..48cb6fb 100644 --- a/Student_Cuda_Tools_Reduction/out/Reduce_Generic_LongII_justesse.html +++ b/Student_Cuda_Tools_Reduction/out/Reduce_Generic_LongII_justesse.html @@ -87,7 +87,7 @@ Designed by CppTest 0 0 100% - 80.000000 + 87.000000


@@ -106,7 +106,7 @@ Designed by CppTest 15 0 100% - 80.000000 + 87.000000
@@ -183,7 +183,7 @@ Designed by CppTest testGrid 0 true - 0.000000 + 1.000000 testMonoBlock @@ -195,13 +195,13 @@ Designed by CppTest testspecialGridDGXMAX 0 true - 39.000000 + 42.000000 testSpecialGrid2 0 true - 40.000000 + 43.000000 testSpecialeMax diff --git a/Student_Cuda_Tools_Reduction/out/Reduce_Generic_LongII_performance.html b/Student_Cuda_Tools_Reduction/out/Reduce_Generic_LongII_performance.html index eaa5bff..bba14f5 100644 --- a/Student_Cuda_Tools_Reduction/out/Reduce_Generic_LongII_performance.html +++ b/Student_Cuda_Tools_Reduction/out/Reduce_Generic_LongII_performance.html @@ -87,7 +87,7 @@ Designed by CppTest 1 0 100% - 11.000000 + 10.000000
@@ -106,7 +106,7 @@ Designed by CppTest 1 0 100% - 11.000000 + 10.000000
@@ -123,7 +123,7 @@ Designed by CppTest performanceOnly 0 true - 11.000000 + 10.000000

Back to top diff --git a/Student_Cuda_Tools_Reduction/src/core/02_use_protocole/generic/int/PII/host/ReductionIntII.cu b/Student_Cuda_Tools_Reduction/src/core/02_use_protocole/generic/int/PII/host/ReductionIntII.cu old mode 100755 new mode 100644 index aa5f542..510105f --- a/Student_Cuda_Tools_Reduction/src/core/02_use_protocole/generic/int/PII/host/ReductionIntII.cu +++ b/Student_Cuda_Tools_Reduction/src/core/02_use_protocole/generic/int/PII/host/ReductionIntII.cu @@ -1,56 +1,56 @@ -#include "ReductionIntII.h" - -#include "GM.h" -#include "Grid.h" - -#include -#include - -using std::cout; -using std::endl; -using std::to_string; - -/*----------------------------------------------------------------------*\ - |* Imported *| - \*---------------------------------------------------------------------*/ - -extern __global__ void KIntProtocoleII(int* ptrSumGM); - -/*----------------------------------------------------------------------*\ - |* Implementation *| - \*---------------------------------------------------------------------*/ - -/*--------------------------------------*\ - |* Constructeur *| - \*-------------------------------------*/ - -ReductionIntII::ReductionIntII(const Grid& grid , int* ptrSum,bool isVerbose) : - //RunnableGPU(grid, "Reduce_Generic_IntII_" + to_string(grid.threadCounts()),isVerbose), // classe parente - RunnableGPU(grid, "Reduce_Generic_IntII" ,isVerbose), // classe parente - ptrSum(ptrSum) { - // TODO ReductionIntII - this->sizeSM = grid.threadByBlock() * sizeof(int); - - GM::mallocInt0(&ptrSumGM); -} - -ReductionIntII::~ReductionIntII() { - // TODO ReductionIntII - - GM::free(ptrSumGM); -} - -/*--------------------------------------*\ - |* Methode *| - \*-------------------------------------*/ - -void ReductionIntII::run() { - // TODO ReductionIntII - - KIntProtocoleII<<sizeSM>>>(ptrSumGM); - GM::memcpyDToH_int(ptrSum, ptrSumGM); -} - -/*----------------------------------------------------------------------*\ - |* End *| - \*---------------------------------------------------------------------*/ +#include "ReductionIntII.h" + +#include "GM.h" +#include "Grid.h" + +#include +#include + +using std::cout; +using std::endl; +using std::to_string; + +/*----------------------------------------------------------------------*\ + |* Imported *| + \*---------------------------------------------------------------------*/ + +extern __global__ void KIntProtocoleII(int* ptrSumGM); + +/*----------------------------------------------------------------------*\ + |* Implementation *| + \*---------------------------------------------------------------------*/ + +/*--------------------------------------*\ + |* Constructeur *| + \*-------------------------------------*/ + +ReductionIntII::ReductionIntII(const Grid& grid , int* ptrSum,bool isVerbose) : + //RunnableGPU(grid, "Reduce_Generic_IntII_" + to_string(grid.threadCounts()),isVerbose), // classe parente + RunnableGPU(grid, "Reduce_Generic_IntII" ,isVerbose), // classe parente + ptrSum(ptrSum) { + // TODO ReductionIntII + this->sizeSM = grid.threadByBlock() * sizeof(int); + + GM::mallocInt0(&ptrSumGM); +} + +ReductionIntII::~ReductionIntII() { + // TODO ReductionIntII + + GM::free(ptrSumGM); +} + +/*--------------------------------------*\ + |* Methode *| + \*-------------------------------------*/ + +void ReductionIntII::run() { + // TODO ReductionIntII + + KIntProtocoleII<<sizeSM>>>(ptrSumGM); + GM::memcpyDToH_int(ptrSum, ptrSumGM); +} + +/*----------------------------------------------------------------------*\ + |* End *| + \*---------------------------------------------------------------------*/ diff --git a/Student_Cuda_Tools_Reduction/src/main/mainTest.cpp b/Student_Cuda_Tools_Reduction/src/main/mainTest.cpp index b1cbc6c..8f638bc 100755 --- a/Student_Cuda_Tools_Reduction/src/main/mainTest.cpp +++ b/Student_Cuda_Tools_Reduction/src/main/mainTest.cpp @@ -29,7 +29,7 @@ static void generic(); int mainTest() { // activer ci-dessous seulement le TP voulu (pas tous) - // add(); + add(); generic(); return EXIT_SUCCESS; @@ -46,7 +46,7 @@ void add() { VTReductionAddIntI test1; VTReductionAddIntII test2; - // test1.run(); + test1.run(); test2.run(); } @@ -58,8 +58,8 @@ void generic() { VTReductionGenericII test2; VTReductionGenericLongII test3; - // test1.run(); - // test2.run(); + test1.run(); + test2.run(); test3.run(); } diff --git a/Student_Cuda_Tools_Reduction/src/main/mainUse.cpp b/Student_Cuda_Tools_Reduction/src/main/mainUse.cpp index 522bafc..09b5065 100755 --- a/Student_Cuda_Tools_Reduction/src/main/mainUse.cpp +++ b/Student_Cuda_Tools_Reduction/src/main/mainUse.cpp @@ -36,7 +36,7 @@ int mainUse() { bool isOk = true; - // reduction_add(isOk); // voir code ci-dessous pour activer la version voulue + reduction_add(isOk); // voir code ci-dessous pour activer la version voulue reduction_generic(isOk); // voir code ci-dessous pour activer la version voulue print(isOk); @@ -53,10 +53,10 @@ int mainUse() { */ void reduction_add(bool& isOk) { // InbI - // { - // UseReductionAddIntI algo(IS_VERBOSE); - // isOk &= algo.isOk(IS_VERBOSE); - // } + { + UseReductionAddIntI algo(IS_VERBOSE); + isOk &= algo.isOk(IS_VERBOSE); + } // IntII { @@ -70,16 +70,16 @@ void reduction_add(bool& isOk) { */ void reduction_generic(bool& isOk) { // InbI - // { - // UseReductionIntI algo(IS_VERBOSE); - // isOk &= algo.isOk(IS_VERBOSE); - // } + { + UseReductionIntI algo(IS_VERBOSE); + isOk &= algo.isOk(IS_VERBOSE); + } // IntII - // { - // UseReductionIntII algo(IS_VERBOSE); - // isOk &= algo.isOk(IS_VERBOSE); - // } + { + UseReductionIntII algo(IS_VERBOSE); + isOk &= algo.isOk(IS_VERBOSE); + } // LongII {