/[escript]/trunk/escript/src/DataLazy.cpp
ViewVC logotype

Diff of /trunk/escript/src/DataLazy.cpp

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

revision 1886 by jfenwick, Wed Oct 15 01:34:18 2008 UTC revision 1888 by jfenwick, Wed Oct 15 04:00:21 2008 UTC
# Line 55  enum ES_opgroup Line 55  enum ES_opgroup
55  string ES_opstrings[]={"UNKNOWN","IDENTITY","+","-","*","/","sin","cos","tan",  string ES_opstrings[]={"UNKNOWN","IDENTITY","+","-","*","/","sin","cos","tan",
56              "asin","acos","atan","sinh","cosh","tanh","erf",              "asin","acos","atan","sinh","cosh","tanh","erf",
57              "asinh","acosh","atanh",              "asinh","acosh","atanh",
58              "log10","log","sign","abs","neg","pos"};              "log10","log","sign","abs","neg","pos","exp","sqrt",
59  int ES_opcount=25;              "1/","where>0","where<0","where>=0","where<=0"};
60    int ES_opcount=32;
61  ES_opgroup opgroups[]={G_UNKNOWN,G_IDENTITY,G_BINARY,G_BINARY,G_BINARY,G_BINARY,G_UNARY,G_UNARY,G_UNARY, //9  ES_opgroup opgroups[]={G_UNKNOWN,G_IDENTITY,G_BINARY,G_BINARY,G_BINARY,G_BINARY,G_UNARY,G_UNARY,G_UNARY, //9
62              G_UNARY,G_UNARY,G_UNARY,G_UNARY,G_UNARY,G_UNARY,G_UNARY,    // 16              G_UNARY,G_UNARY,G_UNARY,G_UNARY,G_UNARY,G_UNARY,G_UNARY,    // 16
63              G_UNARY,G_UNARY,G_UNARY,                    // 19              G_UNARY,G_UNARY,G_UNARY,                    // 19
64              G_UNARY,G_UNARY,G_UNARY,G_UNARY,G_UNARY,G_UNARY};       // 25              G_UNARY,G_UNARY,G_UNARY,G_UNARY,G_UNARY,G_UNARY,G_UNARY,G_UNARY,        // 27
65                G_UNARY,G_UNARY,G_UNARY,G_UNARY,G_UNARY};
66  inline  inline
67  ES_opgroup  ES_opgroup
68  getOpgroup(ES_optype op)  getOpgroup(ES_optype op)
# Line 355  DataLazy::resolveSample(ValueType& v,int Line 356  DataLazy::resolveSample(ValueType& v,int
356      // it will just trigger a deep copy of the lazy object      // it will just trigger a deep copy of the lazy object
357      throw DataException("Programmer error - POS not supported for lazy data.");      throw DataException("Programmer error - POS not supported for lazy data.");
358      break;      break;
359        case EXP:
360        tensor_unary_operation(m_samplesize, left, result, ::exp);
361        break;
362        case SQRT:
363        tensor_unary_operation(m_samplesize, left, result, ::sqrt);
364        break;
365        case RECIP:
366        tensor_unary_operation(m_samplesize, left, result, bind1st(divides<double>(),1.));
367        break;
368        case GZ:
369        tensor_unary_operation(m_samplesize, left, result, bind2nd(greater<double>(),0.0));
370        break;
371        case LZ:
372        tensor_unary_operation(m_samplesize, left, result, bind2nd(less<double>(),0.0));
373        break;
374        case GEZ:
375        tensor_unary_operation(m_samplesize, left, result, bind2nd(greater_equal<double>(),0.0));
376        break;
377        case LEZ:
378        tensor_unary_operation(m_samplesize, left, result, bind2nd(less_equal<double>(),0.0));
379        break;
380    
381      default:      default:
382      throw DataException("Programmer error - do not know how to resolve operator "+opToString(m_op)+".");      throw DataException("Programmer error - do not know how to resolve operator "+opToString(m_op)+".");
383      }      }

Legend:
Removed from v.1886  
changed lines
  Added in v.1888

  ViewVC Help
Powered by ViewVC 1.1.26