Ajout de l'ensemble du workspace.
[GPU.git] / WCudaMSE / BilatTools_OMP / src / core / OMP_Tools / header / OmpTools.h
1 #ifndef OMP_TOOLS_H_
2 #define OMP_TOOLS_H_
3
4 #include <omp.h>
5
6 /*----------------------------------------------------------------------*\
7 |* Declaration *|
8 \*---------------------------------------------------------------------*/
9
10 class OmpTools
11 {
12 public:
13
14 /*--------------------------------------*\
15 |* Constructor *|
16 \*-------------------------------------*/
17
18 OmpTools();
19
20 /*--------------------------------------*\
21 |* Destructor *|
22 \*-------------------------------------*/
23
24 virtual ~OmpTools();
25
26 /*--------------------------------------*\
27 |* Methodes *|
28 \*-------------------------------------*/
29
30 /**
31 * autant de thread que de core
32 */
33 static int setAndGetNaturalGranularity();
34
35 static void setNbThread(int nbThread);
36 static int getNbCore();
37 static int getNbThread();
38 static int getTid();
39
40 /**
41 * Thread safe
42 * [0,1[
43 */
44 static double uniform01(void);
45
46 /**
47 * Thread safe
48 * [a,b[
49 */
50 static double uniform(double a, double b);
51
52 private:
53
54 /*--------------------------------------*\
55 |* Methodes *|
56 \*-------------------------------------*/
57
58 /*--------------------------------------*\
59 |* Attributs *|
60 \*-------------------------------------*/
61
62 };
63
64 #endif
65
66 /*----------------------------------------------------------------------*\
67 |* End *|
68 \*---------------------------------------------------------------------*/