/[escript]/branches/clazy/escriptcore/src/DataLazy.cpp
ViewVC logotype

Diff of /branches/clazy/escriptcore/src/DataLazy.cpp

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

revision 1972 by jfenwick, Thu Nov 6 01:49:39 2008 UTC revision 1993 by phornby, Fri Nov 7 04:52:15 2008 UTC
# Line 79  using namespace boost; Line 79  using namespace boost;
79  namespace escript  namespace escript
80  {  {
81    
 const std::string&  
 opToString(ES_optype op);  
   
82  namespace  namespace
83  {  {
84    
# Line 615  DataLazy::resolveUnary(ValueType& v, siz Line 612  DataLazy::resolveUnary(ValueType& v, siz
612    
613    
614    
615  #define PROC_OP(X) \  #define PROC_OP(TYPE,X)                               \
616      for (int i=0;i<steps;++i,resultp+=resultStep) \      for (int i=0;i<steps;++i,resultp+=resultStep) \
617      { \      { \
618         tensor_binary_operation(chunksize, &((*left)[lroffset]), &((*right)[rroffset]), resultp, X); \         tensor_binary_operation##TYPE(chunksize, &((*left)[lroffset]), &((*right)[rroffset]), resultp, X); \
619         lroffset+=leftStep; \         lroffset+=leftStep; \
620         rroffset+=rightStep; \         rroffset+=rightStep; \
621      }      }
# Line 673  cout << "Resolve binary: " << toString() Line 670  cout << "Resolve binary: " << toString()
670    switch(m_op)    switch(m_op)
671    {    {
672      case ADD:      case ADD:
673      PROC_OP(plus<double>());          PROC_OP(/**/,plus<double>());
674      break;      break;
675      case SUB:      case SUB:
676      PROC_OP(minus<double>());      PROC_OP(/**/,minus<double>());
677      break;      break;
678      case MUL:      case MUL:
679      PROC_OP(multiplies<double>());      PROC_OP(/**/,multiplies<double>());
680      break;      break;
681      case DIV:      case DIV:
682      PROC_OP(divides<double>());      PROC_OP(/**/,divides<double>());
683      break;      break;
684      case POW:      case POW:
685      PROC_OP(::pow);         PROC_OP(<double (double,double)>,::pow);
686      break;      break;
687      default:      default:
688      throw DataException("Programmer error - resolveBinary can not resolve operator "+opToString(m_op)+".");      throw DataException("Programmer error - resolveBinary can not resolve operator "+opToString(m_op)+".");

Legend:
Removed from v.1972  
changed lines
  Added in v.1993

  ViewVC Help
Powered by ViewVC 1.1.26