X-Git-Url: http://git.euphorik.ch/?a=blobdiff_plain;f=WCudaMSE%2FStudent_Cuda%2Fsrc%2Fcpp%2Fcore%2FmainCore.cpp;h=12ba6fad96b3fb612f267e935cf495ceb856044c;hb=6664817ed89b0b616044da35a3eb8f715e0813d9;hp=31af0c5f1bd016e2d03c54043e5a261c3f62eb9e;hpb=3e601cb6c0cc2c5b3a9b30ebf3ad1102e53c0e0b;p=GPU.git diff --git a/WCudaMSE/Student_Cuda/src/cpp/core/mainCore.cpp b/WCudaMSE/Student_Cuda/src/cpp/core/mainCore.cpp index 31af0c5..12ba6fa 100755 --- a/WCudaMSE/Student_Cuda/src/cpp/core/mainCore.cpp +++ b/WCudaMSE/Student_Cuda/src/cpp/core/mainCore.cpp @@ -1,46 +1,35 @@ #include #include +#include +using namespace std; +#include "01c_Saucisson/Saucisson.h" +#include "02_ProduitScalaire/ProduitScalaire.h" +#include "03_Histogramme/Histogramme.h" +#include "04_MonteCarlo/MonteCarlo.h" -using std::cout; -using std::endl; - -/*----------------------------------------------------------------------*\ - |* Declaration *| - \*---------------------------------------------------------------------*/ - -/*--------------------------------------*\ - |* Imported *| - \*-------------------------------------*/ - -extern bool useHello(void); +extern bool useHello(); extern bool addVectors(); -/*--------------------------------------*\ - |* Public *| - \*-------------------------------------*/ - -int mainCore(); +int mainCore(const vector& args) + { + bool isOk = true; -/*--------------------------------------*\ - |* Private *| - \*-------------------------------------*/ + // Exemples simples. + //isOk &= useHello(); + //isOk &= addVectors(); + if (find(args.begin(), args.end(), "saucisson") != args.end()) + isOk &= saucisson(); + if (find(args.begin(), args.end(), "produit-scalaire") != args.end()) + isOk &= produitScalaire(); -/*----------------------------------------------------------------------*\ - |* Implementation *| - \*---------------------------------------------------------------------*/ + if (find(args.begin(), args.end(), "histogramme") != args.end()) + isOk &= histogramme(); -/*--------------------------------------*\ - |* Public *| - \*-------------------------------------*/ - -int mainCore() - { - bool isOk = true; - isOk &= useHello(); - isOk &= addVectors(); + if (find(args.begin(), args.end(), "monte-carlo") != args.end()) + isOk &= monteCarlo(); cout << "\nisOK = " << isOk << endl; cout << "\nEnd : mainCore" << endl; @@ -48,13 +37,3 @@ int mainCore() return isOk ? EXIT_SUCCESS : EXIT_FAILURE; } -/*--------------------------------------*\ - |* Private *| - \*-------------------------------------*/ - - - -/*----------------------------------------------------------------------*\ - |* End *| - \*---------------------------------------------------------------------*/ -