/[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 2271 by jfenwick, Mon Feb 16 05:08:29 2009 UTC revision 2496 by jfenwick, Fri Jun 26 06:09:47 2009 UTC
# Line 68  enum ES_optype Line 68  enum ES_optype
68      NSYM=SYM+1,      NSYM=SYM+1,
69      PROD=NSYM+1,      PROD=NSYM+1,
70      TRANS=PROD+1,      TRANS=PROD+1,
71      TRACE=TRANS+1      TRACE=TRANS+1,
72        SWAP=TRACE+1
73  };  };
74    
75  ESCRIPT_DLL_API  ESCRIPT_DLL_API
# Line 161  public: Line 162  public:
162    ESCRIPT_DLL_API    ESCRIPT_DLL_API
163    DataLazy(DataAbstract_ptr left, DataAbstract_ptr right, ES_optype op, int axis_offset, int transpose);    DataLazy(DataAbstract_ptr left, DataAbstract_ptr right, ES_optype op, int axis_offset, int transpose);
164    
165      /**
166      \brief Produce a DataLazy for a unary operation which requires two integer parameters.
167      \param left DataAbstract to be operated on.
168      \param op unary operation to perform.
169      \param axis0 the first parameter for the operation
170      \param axis1 the second parameter for the operation
171      \throws DataException if op is not a unary operation or if p cannot be converted to a DataLazy.
172      Note that IDENTITY is not considered a unary operation.
173      */
174      ESCRIPT_DLL_API
175      DataLazy(DataAbstract_ptr left, ES_optype op, const int axis0, const int axis1);
176    
177    ESCRIPT_DLL_API    ESCRIPT_DLL_API
178    ~DataLazy();    ~DataLazy();
179    
# Line 278  private: Line 291  private:
291    char m_readytype; // E for expanded, T for tagged, C for constant    char m_readytype; // E for expanded, T for tagged, C for constant
292    
293    int m_axis_offset;    // required extra info for general tensor product    int m_axis_offset;    // required extra info for general tensor product
294    int m_transpose;    int m_transpose;  // offset and transpose are used for swapaxes as well
295    int m_SL, m_SM, m_SR; // computed properties used in general tensor product    int m_SL, m_SM, m_SR; // computed properties used in general tensor product
296    
297    
298    double m_tol;     // required extra info for <>0 and ==0    double m_tol;     // required extra info for <>0 and ==0
299    
300    size_t m_maxsamplesize;   // largest samplesize required by any node in the expression    size_t m_maxsamplesize;   // largest samplesize required by any node in the expression
# Line 375  private: Line 389  private:
389  DataTypes::ValueType*  DataTypes::ValueType*
390  resolveNP1OUT_P(ValueType& v, size_t offset, int sampleNo, size_t& roffset) const;  resolveNP1OUT_P(ValueType& v, size_t offset, int sampleNo, size_t& roffset) const;
391    
392    /**
393      \brief Compute the value of the expression (unary operation with int params) for the given sample.
394      \return Vector which stores the value of the subexpression for the given sample.
395      \param v A vector to store intermediate results.
396      \param offset Index in v to begin storing results.
397      \param sampleNo Sample number to evaluate.
398      \param roffset (output parameter) the offset in the return vector where the result begins.
399    
400      The return value will be an existing vector so do not deallocate it.
401      If the result is stored in v it should be stored at the offset given.
402      Everything from offset to the end of v should be considered available for this method to use.
403    */
404    DataTypes::ValueType*
405    resolveNP1OUT_2P(ValueType& v, size_t offset, int sampleNo, size_t& roffset) const;
406    
407    
408    /**    /**
409    \brief Compute the value of the expression (binary operation) for the given sample.    \brief Compute the value of the expression (binary operation) for the given sample.

Legend:
Removed from v.2271  
changed lines
  Added in v.2496

  ViewVC Help
Powered by ViewVC 1.1.26