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

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

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

revision 2521 by jfenwick, Tue Jul 7 00:08:58 2009 UTC revision 2737 by jfenwick, Tue Nov 3 00:44:00 2009 UTC
# Line 1  Line 1 
1    
2  /*******************************************************  /*******************************************************
3  *  *
4  * Copyright (c) 2003-2008 by University of Queensland  * Copyright (c) 2003-2009 by University of Queensland
5  * Earth Systems Science Computational Center (ESSCC)  * Earth Systems Science Computational Center (ESSCC)
6  * http://www.uq.edu.au/esscc  * http://www.uq.edu.au/esscc
7  *  *
# Line 73  enum ES_optype Line 73  enum ES_optype
73      PROD=NSYM+1,      PROD=NSYM+1,
74      TRANS=PROD+1,      TRANS=PROD+1,
75      TRACE=TRANS+1,      TRACE=TRANS+1,
76      SWAP=TRACE+1      SWAP=TRACE+1,
77        MINVAL=SWAP+1,
78        MAXVAL=MINVAL+1
79  };  };
80    
81  ESCRIPT_DLL_API  ESCRIPT_DLL_API
# Line 309  private: Line 311  private:
311    const DataTypes::ValueType*    const DataTypes::ValueType*
312    resolveNodeUnary(int tid, int sampleNo, size_t& roffset);    resolveNodeUnary(int tid, int sampleNo, size_t& roffset);
313    
314    
315      const DataTypes::ValueType*
316      resolveNodeReduction(int tid, int sampleNo, size_t& roffset);  
317    
318    const DataTypes::ValueType*    const DataTypes::ValueType*
319    resolveNodeSample(int tid, int sampleNo, size_t& roffset);    resolveNodeSample(int tid, int sampleNo, size_t& roffset);
320    
# Line 336  private: Line 342  private:
342    intoString(std::ostringstream& oss) const;    intoString(std::ostringstream& oss) const;
343    
344    /**    /**
345      \warning internal use only!!
346      */
347      void
348      intoTreeString(std::ostringstream& oss,std::string indent) const;
349    
350      /**
351     \brief Converts the DataLazy into an IDENTITY storing the value of the expression.     \brief Converts the DataLazy into an IDENTITY storing the value of the expression.
352     This method uses the original methods on the Data class to evaluate the expressions.     This method uses the original methods on the Data class to evaluate the expressions.
353     For this reason, it should not be used on DataExpanded instances. (To do so would defeat     For this reason, it should not be used on DataExpanded instances. (To do so would defeat
# Line 411  private: Line 423  private:
423    resolveUnary(ValueType& v,  size_t offset,int sampleNo,  size_t& roffset) const;    resolveUnary(ValueType& v,  size_t offset,int sampleNo,  size_t& roffset) const;
424    
425    /**    /**
426      \brief Compute the value of the expression (reduction operation) for the given sample.
427      \return Vector which stores the value of the subexpression for the given sample.
428      \param v A vector to store intermediate results.
429      \param offset Index in v to begin storing results.
430      \param sampleNo Sample number to evaluate.
431      \param roffset (output parameter) the offset in the return vector where the result begins.
432    
433      The return value will be an existing vector so do not deallocate it.
434      If the result is stored in v it should be stored at the offset given.
435      Everything from offset to the end of v should be considered available for this method to use.
436      */
437      ValueType*
438      resolveReduction(ValueType& v, size_t offset, int sampleNo, size_t& roffset) const;
439    
440      /**
441    \brief Compute the value of the expression (unary non-pointwise operation) for the given sample.    \brief Compute the value of the expression (unary non-pointwise operation) for the given sample.
442    \return Vector which stores the value of the subexpression for the given sample.    \return Vector which stores the value of the subexpression for the given sample.
443    \param v A vector to store intermediate results.    \param v A vector to store intermediate results.

Legend:
Removed from v.2521  
changed lines
  Added in v.2737

  ViewVC Help
Powered by ViewVC 1.1.26