Ajout de l'ensemble du workspace.
[GPU.git] / WCudaMSE / Student_OMP / src / cpp / core / omp / 02_pi / usePI.cpp
1 #include <iostream>
2 #include <limits.h>
3
4 using std::cout;
5 using std::endl;
6
7 /*----------------------------------------------------------------------*\
8 |* Declaration *|
9 \*---------------------------------------------------------------------*/
10
11 /*--------------------------------------*\
12 |* Imported *|
13 \*-------------------------------------*/
14
15 extern bool isPiSequentiel_OK(int n);
16 extern bool isPiOMPEntrelacerPromotionTab_Ok(int n);
17 extern bool isPiOMPEntrelacerCritical_Ok(int n);
18 extern bool isPiOMPEntrelacerAtomic_Ok(int n);
19 extern bool isPiOMPforCritical_Ok(int n);
20 extern bool isPiOMPforAtomic_Ok(int n);
21 extern bool isPiOMPforPromotionTab_Ok(int n);
22 extern bool isPiOMPforReduction_Ok(int n);
23
24 /*--------------------------------------*\
25 |* Public *|
26 \*-------------------------------------*/
27
28 bool usePI(void);
29
30 /*--------------------------------------*\
31 |* Private *|
32 \*-------------------------------------*/
33
34
35
36 /*----------------------------------------------------------------------*\
37 |* Implementation *|
38 \*---------------------------------------------------------------------*/
39
40 /*--------------------------------------*\
41 |* Public *|
42 \*-------------------------------------*/
43
44 bool usePI(void)
45 {
46 cout << endl << "[PI]" << endl;
47
48 int n = INT_MAX / 10;
49
50 bool isOk = true;
51 isOk &= isPiSequentiel_OK(n);
52 isOk &= isPiOMPEntrelacerPromotionTab_Ok(n);
53 isOk &= isPiOMPEntrelacerCritical_Ok(n);
54 isOk &= isPiOMPEntrelacerAtomic_Ok(n);
55 isOk &= isPiOMPforCritical_Ok(n);
56 isOk &= isPiOMPforAtomic_Ok(n);
57 isOk &= isPiOMPforPromotionTab_Ok(n);
58 isOk &= isPiOMPforReduction_Ok(n);
59
60 return isOk;
61 }
62
63 /*--------------------------------------*\
64 |* Private *|
65 \*-------------------------------------*/
66
67 /*----------------------------------------------------------------------*\
68 |* End *|
69 \*---------------------------------------------------------------------*/
70