/[escript]/branches/arrexp_2137_win_merge/escript/src/DataAlgorithm.h
ViewVC logotype

Diff of /branches/arrexp_2137_win_merge/escript/src/DataAlgorithm.h

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

revision 2221 by jfenwick, Wed Jan 14 05:59:25 2009 UTC revision 2222 by jfenwick, Tue Jan 20 04:52:39 2009 UTC
# Line 318  dp_algorithm(const DataTagged& data, Line 318  dp_algorithm(const DataTagged& data,
318    // and assign this to the default element in result    // and assign this to the default element in result
319  //   result.getDefaultValue().getData(0) =  //   result.getDefaultValue().getData(0) =
320  //     data.getDefaultValue().reductionOp(operation,initial_value);  //     data.getDefaultValue().reductionOp(operation,initial_value);
321    result.getVector()[result.getDefaultOffset()] = DataMaths::reductionOp(data.getVector(),data.getShape(),data.getDefaultOffset(),operation,initial_value);    result.getVector()[result.getDefaultOffset()] = DataMaths::reductionOp(data.getVectorRO(),data.getShape(),data.getDefaultOffset(),operation,initial_value);
322  }  }
323    
324  template <class BinaryFunction>  template <class BinaryFunction>
# Line 334  dp_algorithm(DataConstant& data, Line 334  dp_algorithm(DataConstant& data,
334  //   result.getPointDataView().getData(0) =  //   result.getPointDataView().getData(0) =
335  //     data.getPointDataView().reductionOp(operation,initial_value);  //     data.getPointDataView().reductionOp(operation,initial_value);
336    result.getVector()[0] =    result.getVector()[0] =
337      DataMaths::reductionOp(data.getVector(),data.getShape(),0,operation,initial_value);      DataMaths::reductionOp(data.getVectorRO(),data.getShape(),0,operation,initial_value);
338  }  }
339    
340  } // end of namespace  } // end of namespace

Legend:
Removed from v.2221  
changed lines
  Added in v.2222

  ViewVC Help
Powered by ViewVC 1.1.26