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

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

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

revision 544 by jgs, Tue Feb 21 01:23:23 2006 UTC revision 555 by jgs, Wed Feb 22 04:44:10 2006 UTC
# Line 32  template <class BinaryFunction> Line 32  template <class BinaryFunction>
32  inline void binaryOp(DataTagged& left, const DataConstant& right,  inline void binaryOp(DataTagged& left, const DataConstant& right,
33               BinaryFunction operation)               BinaryFunction operation)
34  {  {
   //  
   // perform the operation on each tagged value including the default  
35    binaryOp(left,right.getPointDataView(),operation);    binaryOp(left,right.getPointDataView(),operation);
36  }  }
37    
# Line 58  inline void binaryOp(DataTagged& left, c Line 56  inline void binaryOp(DataTagged& left, c
56    }    }
57    //    //
58    // finally perform the operation on the default value    // finally perform the operation on the default value
59    left.getDefaultValue().binaryOp(right,operation);    if (right.getRank()==0) {
60        left.getDefaultValue().binaryOp(0,right(),operation);
61      } else {
62        left.getDefaultValue().binaryOp(right,operation);
63      }
64  }  }
65    
66  template <class BinaryFunction>  template <class BinaryFunction>

Legend:
Removed from v.544  
changed lines
  Added in v.555

  ViewVC Help
Powered by ViewVC 1.1.26