/[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 6084 by jfenwick, Tue Mar 22 04:23:02 2016 UTC revision 6125 by jfenwick, Tue Apr 5 04:12:13 2016 UTC
# Line 5  Line 5 
5  * http://www.uq.edu.au  * http://www.uq.edu.au
6  *  *
7  * Primary Business: Queensland, Australia  * Primary Business: Queensland, Australia
8  * Licensed under the Open Software License version 3.0  * Licensed under the Apache License, version 2.0
9  * http://www.opensource.org/licenses/osl-3.0.php  * http://www.apache.org/licenses/LICENSE-2.0
10  *  *
11  * Development until 2012 by Earth Systems Science Computational Center (ESSCC)  * Development until 2012 by Earth Systems Science Computational Center (ESSCC)
12  * Development 2012-2013 by School of Earth Sciences  * Development 2012-2013 by School of Earth Sciences
# Line 155  string ES_opstrings[]={"UNKNOWN","IDENTI Line 155  string ES_opstrings[]={"UNKNOWN","IDENTI
155                          "asinh","acosh","atanh",                          "asinh","acosh","atanh",
156                          "log10","log","sign","abs","neg","pos","exp","sqrt",                          "log10","log","sign","abs","neg","pos","exp","sqrt",
157                          "1/","where>0","where<0","where>=0","where<=0", "where<>0","where=0",                          "1/","where>0","where<0","where>=0","where<=0", "where<>0","where=0",
158                          "symmetric","nonsymmetric",                          "symmetric","antisymmetric",
159                          "prod",                          "prod",
160                          "transpose", "trace",                          "transpose", "trace",
161                          "swapaxes",                          "swapaxes",
162                          "minval", "maxval",                          "minval", "maxval",
163                          "condEval"};                          "condEval",
164  int ES_opcount=44;                          "hermitian","antihermitian"
165    };
166    int ES_opcount=46;
167  ES_opgroup opgroups[]={G_UNKNOWN,G_IDENTITY,G_BINARY,G_BINARY,G_BINARY,G_BINARY, G_BINARY,  ES_opgroup opgroups[]={G_UNKNOWN,G_IDENTITY,G_BINARY,G_BINARY,G_BINARY,G_BINARY, G_BINARY,
168                          G_UNARY,G_UNARY,G_UNARY, //10                          G_UNARY,G_UNARY,G_UNARY, //10
169                          G_UNARY,G_UNARY,G_UNARY,G_UNARY,G_UNARY,G_UNARY,G_UNARY,        // 17                          G_UNARY,G_UNARY,G_UNARY,G_UNARY,G_UNARY,G_UNARY,G_UNARY,        // 17
# Line 173  ES_opgroup opgroups[]={G_UNKNOWN,G_IDENT Line 175  ES_opgroup opgroups[]={G_UNKNOWN,G_IDENT
175                          G_NP1OUT_P, G_NP1OUT_P,                          G_NP1OUT_P, G_NP1OUT_P,
176                          G_NP1OUT_2P,                          G_NP1OUT_2P,
177                          G_REDUCTION, G_REDUCTION,                          G_REDUCTION, G_REDUCTION,
178                          G_CONDEVAL};                          G_CONDEVAL,
179                            G_UNARY,G_UNARY
180    };
181  inline  inline
182  ES_opgroup  ES_opgroup
183  getOpgroup(ES_optype op)  getOpgroup(ES_optype op)
# Line 478  DataLazy::DataLazy(DataAbstract_ptr p) Line 482  DataLazy::DataLazy(DataAbstract_ptr p)
482     }     }
483     else     else
484     {     {
         p->makeLazyShared();  
485          DataReady_ptr dr=dynamic_pointer_cast<DataReady>(p);          DataReady_ptr dr=dynamic_pointer_cast<DataReady>(p);
486          makeIdentity(dr);          makeIdentity(dr);
487  LAZYDEBUG(cout << "Wrapping " << dr.get() << " id=" << m_id.get() << endl;)  LAZYDEBUG(cout << "Wrapping " << dr.get() << " id=" << m_id.get() << endl;)
# Line 943  DataLazy::collapseToReady() const Line 946  DataLazy::collapseToReady() const
946          result=left.symmetric();          result=left.symmetric();
947          break;          break;
948      case NSYM:      case NSYM:
949          result=left.nonsymmetric();          result=left.antisymmetric();
950          break;          break;
951      case PROD:      case PROD:
952          result=C_GeneralTensorProduct(left,right,m_axis_offset, m_transpose);          result=C_GeneralTensorProduct(left,right,m_axis_offset, m_transpose);
# Line 963  DataLazy::collapseToReady() const Line 966  DataLazy::collapseToReady() const
966      case MAXVAL:      case MAXVAL:
967          result=left.minval();          result=left.minval();
968          break;          break;
969        case HER:
970        result=left.hermitian();
971        break;
972      default:      default:
973          throw DataException("Programmer error - collapseToReady does not know how to resolve operator "+opToString(m_op)+".");          throw DataException("Programmer error - collapseToReady does not know how to resolve operator "+opToString(m_op)+".");
974    }    }
# Line 1248  DataLazy::resolveNodeNP1OUT(int tid, int Line 1254  DataLazy::resolveNodeNP1OUT(int tid, int
1254      case NSYM:      case NSYM:
1255          for (loop=0;loop<numsteps;++loop)          for (loop=0;loop<numsteps;++loop)
1256          {          {
1257              escript::nonsymmetric(*leftres,m_left->getShape(),subroffset, m_samples, getShape(), offset);              escript::antisymmetric(*leftres,m_left->getShape(),subroffset, m_samples, getShape(), offset);
1258              subroffset+=step;              subroffset+=step;
1259              offset+=step;              offset+=step;
1260          }          }

Legend:
Removed from v.6084  
changed lines
  Added in v.6125

  ViewVC Help
Powered by ViewVC 1.1.26