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/printer_pablos.cpp

    r4264 r4268  
    4545    strOut += "],[";
    4646
    47     strOut += Print_PB_PabloStmts(cg_state.expressions());
     47    strOut += Print_PB_PabloStmts(cg_state.statements());
    4848
    4949    strOut = strOut.substr(0, strOut.length() - 1);
     
    7272{
    7373    if (const Assign * an = dyn_cast<const Assign>(stmt)) {
    74         return "Assign('" + an->getName()->str() + "', " + ShowPabloAST(an->getExpr()) + "),";
     74        std::string result = "Assign('" + an->getName()->str() + "', " + ShowPabloAST(an->getExpr());
     75        if (an->isOutputAssignment()) {
     76            result += ", Output=" + std::to_string(an->getOutputIndex());
     77        }
     78        return result + "),";
    7579    }
    7680    else if (const Next * next = dyn_cast<const Next>(stmt)) {
Note: See TracChangeset for help on using the changeset viewer.