/[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 1556 by gross, Mon May 12 00:54:58 2008 UTC revision 1564 by gross, Thu May 22 09:31:33 2008 UTC
# Line 54  index_t Paso_Util_cumsum(dim_t N,index_t Line 54  index_t Paso_Util_cumsum(dim_t N,index_t
54     index_t out=0,tmp;     index_t out=0,tmp;
55     dim_t i;     dim_t i;
56     #ifdef _OPENMP     #ifdef _OPENMP
57        index_t partial_sums[omp_get_max_threads()],sum;        index_t *partial_sums=NULL,sum;
58          partial_sums=TMPMEMALLOC(omp_get_max_threads(),index_t);
59        #pragma omp parallel private(sum,i,tmp)        #pragma omp parallel private(sum,i,tmp)
60        {        {
61          sum=0;          sum=0;
# Line 79  index_t Paso_Util_cumsum(dim_t N,index_t Line 80  index_t Paso_Util_cumsum(dim_t N,index_t
80            array[i]=tmp;            array[i]=tmp;
81          }          }
82        }        }
83          TMPMEMFREE(partial_sums);
84     #else     #else
85        for (i=0;i<N;++i) {        for (i=0;i<N;++i) {
86           tmp=out;           tmp=out;

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

  ViewVC Help
Powered by ViewVC 1.1.26