/[escript]/branches/doubleplusgood/dudley/src/Util.cpp
ViewVC logotype

Diff of /branches/doubleplusgood/dudley/src/Util.cpp

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

revision 4331 by jfenwick, Wed Feb 27 06:09:33 2013 UTC revision 4332 by jfenwick, Thu Mar 21 04:21:14 2013 UTC
# Line 609  index_t Dudley_Util_cumsum(dim_t N, inde Line 609  index_t Dudley_Util_cumsum(dim_t N, inde
609      dim_t i;      dim_t i;
610  #ifdef _OPENMP  #ifdef _OPENMP
611      index_t *partial_sums = NULL, sum;      index_t *partial_sums = NULL, sum;
612      partial_sums = TMPMEMALLOC(omp_get_max_threads(), index_t);      partial_sums = new  index_t[omp_get_max_threads()];
613  #pragma omp parallel private(sum,i,tmp)  #pragma omp parallel private(sum,i,tmp)
614      {      {
615      sum = 0;      sum = 0;
# Line 638  index_t Dudley_Util_cumsum(dim_t N, inde Line 638  index_t Dudley_Util_cumsum(dim_t N, inde
638          array[i] = tmp;          array[i] = tmp;
639      }      }
640      }      }
641      TMPMEMFREE(partial_sums);      delete[] partial_sums;
642  #else  #else
643      for (i = 0; i < N; ++i)      for (i = 0; i < N; ++i)
644      {      {

Legend:
Removed from v.4331  
changed lines
  Added in v.4332

  ViewVC Help
Powered by ViewVC 1.1.26