/[escript]/trunk/paso/src/PasoUtil.c
ViewVC logotype

Diff of /trunk/paso/src/PasoUtil.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1388 by trankine, Fri Jan 11 07:45:58 2008 UTC revision 1556 by gross, Mon May 12 00:54:58 2008 UTC
# Line 62  index_t Paso_Util_cumsum(dim_t N,index_t Line 62  index_t Paso_Util_cumsum(dim_t N,index_t
62          for (i=0;i<N;++i) sum+=array[i];          for (i=0;i<N;++i) sum+=array[i];
63          partial_sums[omp_get_thread_num()]=sum;          partial_sums[omp_get_thread_num()]=sum;
64          #pragma omp barrier          #pragma omp barrier
65          #pragma omp master          #pragma omp single
66          {          {
67            out=0;            out=0;
68            for (i=0;i<omp_get_max_threads();++i) {            for (i=0;i<omp_get_max_threads();++i) {
# Line 71  index_t Paso_Util_cumsum(dim_t N,index_t Line 71  index_t Paso_Util_cumsum(dim_t N,index_t
71               partial_sums[i]=tmp;               partial_sums[i]=tmp;
72             }             }
73          }          }
         #pragma omp barrier  
74          sum=partial_sums[omp_get_thread_num()];          sum=partial_sums[omp_get_thread_num()];
75          #pragma omp for schedule(static)          #pragma omp for schedule(static)
76          for (i=0;i<N;++i) {          for (i=0;i<N;++i) {

Legend:
Removed from v.1388  
changed lines
  Added in v.1556

  ViewVC Help
Powered by ViewVC 1.1.26