Ignore:
Timestamp:
Oct 24, 2014, 1:35:16 PM (5 years ago)
Author:
nmedfort
Message:

Generalized the writing of output variables by adding a 'flag' to the Assign nodes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/pablo/ps_assign.h

    r4266 r4268  
    3030        return mExpr;
    3131    }
    32     inline bool isOutput() const {
    33         return mIsOutput;
     32    inline bool isOutputAssignment() const {
     33        return mOutputIndex >= 0;
     34    }
     35    inline int getOutputIndex() const {
     36        return mOutputIndex;
    3437    }
    3538protected:
    36     Assign(PabloAST * name, PabloAST * expr, const bool isOutput)
     39    Assign(PabloAST * name, PabloAST * expr, const int outputIndex)
    3740    : PabloAST(ClassTypeId::Assign)
    3841    , mName(cast<String>(name))
    3942    , mExpr(expr)
    40     , mIsOutput(isOutput)
     43    , mOutputIndex(outputIndex)
    4144    {
    4245
     
    4548    String * const          mName;
    4649    PabloAST * const        mExpr;
    47     const bool              mIsOutput;
     50    const int               mOutputIndex;
    4851};
    4952
Note: See TracChangeset for help on using the changeset viewer.