/[escript]/branches/domexper/dudley/src/Util.c
ViewVC logotype

Diff of /branches/domexper/dudley/src/Util.c

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

revision 1563 by trankine, Fri Jan 11 07:45:58 2008 UTC revision 1564 by gross, Thu May 22 09:31:33 2008 UTC
# Line 483  index_t Finley_Util_cumsum(dim_t N,index Line 483  index_t Finley_Util_cumsum(dim_t N,index
483     index_t out=0,tmp;     index_t out=0,tmp;
484     dim_t i;     dim_t i;
485     #ifdef _OPENMP     #ifdef _OPENMP
486        index_t partial_sums[omp_get_max_threads()],sum;        index_t *partial_sums=NULL, sum;
487          partial_sums=TMPMEMALLOC(omp_get_max_threads(),index_t);
488        #pragma omp parallel private(sum,i,tmp)        #pragma omp parallel private(sum,i,tmp)
489        {        {
490          sum=0;          sum=0;
# Line 509  index_t Finley_Util_cumsum(dim_t N,index Line 510  index_t Finley_Util_cumsum(dim_t N,index
510            array[i]=tmp;            array[i]=tmp;
511          }          }
512        }        }
513          TMPMEMFREE(partial_sums);
514     #else     #else
515        for (i=0;i<N;++i) {        for (i=0;i<N;++i) {
516           tmp=out;           tmp=out;

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

  ViewVC Help
Powered by ViewVC 1.1.26