/[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 2736 by jfenwick, Fri Oct 30 05:39:48 2009 UTC revision 2737 by jfenwick, Tue Nov 3 00:44:00 2009 UTC
# Line 2460  DataLazy::toString() const Line 2460  DataLazy::toString() const
2460  {  {
2461    ostringstream oss;    ostringstream oss;
2462    oss << "Lazy Data:";    oss << "Lazy Data:";
2463    intoString(oss);    if (escriptParams.getPRINT_LAZY_TREE()==0)
2464      {
2465          intoString(oss);
2466      }
2467      else
2468      {
2469        oss << endl;
2470        intoTreeString(oss,"");
2471      }
2472    return oss.str();    return oss.str();
2473  }  }
2474    
# Line 2524  DataLazy::intoString(ostringstream& oss) Line 2532  DataLazy::intoString(ostringstream& oss)
2532    }    }
2533  }  }
2534    
2535    
2536    void
2537    DataLazy::intoTreeString(ostringstream& oss, string indent) const
2538    {
2539      oss << '[' << m_rank << ':' << setw(3) << m_samplesize << "] " << indent;
2540      switch (getOpgroup(m_op))
2541      {
2542      case G_IDENTITY:
2543        if (m_id->isExpanded())
2544        {
2545           oss << "E";
2546        }
2547        else if (m_id->isTagged())
2548        {
2549          oss << "T";
2550        }
2551        else if (m_id->isConstant())
2552        {
2553          oss << "C";
2554        }
2555        else
2556        {
2557          oss << "?";
2558        }
2559        oss << '@' << m_id.get() << endl;
2560        break;
2561      case G_BINARY:
2562        oss << opToString(m_op) << endl;
2563        indent+='.';
2564        m_left->intoTreeString(oss, indent);
2565        m_right->intoTreeString(oss, indent);
2566        break;
2567      case G_UNARY:
2568      case G_UNARY_P:
2569      case G_NP1OUT:
2570      case G_NP1OUT_P:
2571      case G_REDUCTION:
2572        oss << opToString(m_op) << endl;
2573        indent+='.';
2574        m_left->intoTreeString(oss, indent);
2575        break;
2576      case G_TENSORPROD:
2577        oss << opToString(m_op) << endl;
2578        indent+='.';
2579        m_left->intoTreeString(oss, indent);
2580        m_right->intoTreeString(oss, indent);
2581        break;
2582      case G_NP1OUT_2P:
2583        oss << opToString(m_op) << ", " << m_axis_offset << ", " << m_transpose<< endl;
2584        indent+='.';
2585        m_left->intoTreeString(oss, indent);
2586        break;
2587      default:
2588        oss << "UNKNOWN";
2589      }
2590    }
2591    
2592    
2593  DataAbstract*  DataAbstract*
2594  DataLazy::deepCopy()  DataLazy::deepCopy()
2595  {  {

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

  ViewVC Help
Powered by ViewVC 1.1.26