8240aa347fd08c151cd11eb3c7392faad0989bd9
2 #include "00_pi_tools.h"
7 /*----------------------------------------------------------------------*\
9 \*---------------------------------------------------------------------*/
11 /*--------------------------------------*\
13 \*-------------------------------------*/
17 /*--------------------------------------*\
19 \*-------------------------------------*/
21 bool isPiOMPforPromotionTab_Ok(int n
);
23 /*--------------------------------------*\
25 \*-------------------------------------*/
27 static double piOMPforPromotionTab(int n
);
28 static void syntaxeSimplifier(double* tabSumThread
,int n
);
29 static void syntaxeFull(double* tabSumThread
,int n
);
31 /*----------------------------------------------------------------------*\
33 \*---------------------------------------------------------------------*/
35 /*--------------------------------------*\
37 \*-------------------------------------*/
39 bool isPiOMPforPromotionTab_Ok(int n
)
41 return isAlgoPI_OK(piOMPforPromotionTab
, n
, "Pi OMP for promotion tab");
44 /*--------------------------------------*\
46 \*-------------------------------------*/
49 * De-synchronisation avec PromotionTab
51 double piOMPforPromotionTab(int n
)
54 const int NB_THREAD
= OmpTools::setAndGetNaturalGranularity();
55 const double DX
= 1.0/(double)n
;
57 double sums
[NB_THREAD
];
58 memset(sums
, 0, sizeof(sums
)); // TODO
60 #pragma omp parallel for private(xi)
61 for (int i
= 0; i
< n
; i
++)
63 const int TID
= OmpTools::getTid();
69 for (int i
= 0; i
< NB_THREAD
; i
++)
77 /*----------------------------------------------------------------------*\
79 \*---------------------------------------------------------------------*/