/[escript]/trunk/escript/src/DataAlgorithm.h
ViewVC logotype

Diff of /trunk/escript/src/DataAlgorithm.h

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

revision 117 by jgs, Fri Apr 1 05:48:57 2005 UTC revision 121 by jgs, Fri May 6 04:26:16 2005 UTC
# Line 240  dp_algorithm(DataExpanded& data, Line 240  dp_algorithm(DataExpanded& data,
240               UnaryFunction operation)               UnaryFunction operation)
241  {  {
242    int i,j;    int i,j;
   int numDPPSample=data.getNumDPPSample();  
243    int numSamples=data.getNumSamples();    int numSamples=data.getNumSamples();
244      int numDPPSample=data.getNumDPPSample();
245    DataArrayView dataView=data.getPointDataView();    DataArrayView dataView=data.getPointDataView();
246    DataArrayView resultView=result.getPointDataView();    DataArrayView resultView=result.getPointDataView();
247    // perform the operation on each data-point and assign    // perform the operation on each data-point and assign
# Line 251  dp_algorithm(DataExpanded& data, Line 251  dp_algorithm(DataExpanded& data,
251      for (i=0;i<numSamples;i++) {      for (i=0;i<numSamples;i++) {
252        for (j=0;j<numDPPSample;j++) {        for (j=0;j<numDPPSample;j++) {
253  #pragma omp critical (reductionOp)  #pragma omp critical (reductionOp)
254          resultView.getData(data.getPointOffset(i,j)) =          resultView.getData(result.getPointOffset(i,j)) =
255            dataView.reductionOp(data.getPointOffset(i,j),operation);            dataView.reductionOp(data.getPointOffset(i,j),operation);
256        }        }
257      }      }

Legend:
Removed from v.117  
changed lines
  Added in v.121

  ViewVC Help
Powered by ViewVC 1.1.26