/[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 2496 by jfenwick, Fri Jun 26 06:09:47 2009 UTC revision 2497 by jfenwick, Mon Jun 29 00:04:45 2009 UTC
# Line 1613  DataLazy::resolveSample(BufferGroup& bg, Line 1613  DataLazy::resolveSample(BufferGroup& bg,
1613  }  }
1614    
1615    
1616  // This needs to do the work of the idenity constructor  // This needs to do the work of the identity constructor
1617  void  void
1618  DataLazy::resolveToIdentity()  DataLazy::resolveToIdentity()
1619  {  {
1620     if (m_op==IDENTITY)     if (m_op==IDENTITY)
1621      return;      return;
1622     DataReady_ptr p=resolve();     DataReady_ptr p=resolveVectorWorker();
1623     makeIdentity(p);     makeIdentity(p);
1624  }  }
1625    
# Line 1642  void DataLazy::makeIdentity(const DataRe Line 1642  void DataLazy::makeIdentity(const DataRe
1642     m_right.reset();     m_right.reset();
1643  }  }
1644    
1645    
1646    DataReady_ptr
1647    DataLazy::resolve()
1648    {
1649        resolveToIdentity();
1650        return m_id;
1651    }
1652    
1653  // To simplify the memory management, all threads operate on one large vector, rather than one each.  // To simplify the memory management, all threads operate on one large vector, rather than one each.
1654  // Each sample is evaluated independently and copied into the result DataExpanded.  // Each sample is evaluated independently and copied into the result DataExpanded.
1655  DataReady_ptr  DataReady_ptr
1656  DataLazy::resolve()  DataLazy::resolveVectorWorker()
1657  {  {
1658    
1659  LAZYDEBUG(cout << "Sample size=" << m_samplesize << endl;)  LAZYDEBUG(cout << "Sample size=" << m_samplesize << endl;)
# Line 1681  LAZYDEBUG(cout << "Total number of sampl Line 1689  LAZYDEBUG(cout << "Total number of sampl
1689    {    {
1690        if (sample==0)  {ENABLEDEBUG}        if (sample==0)  {ENABLEDEBUG}
1691    
 //       if (sample==5800/getNumDPPSample())  {ENABLEDEBUG}  
1692  LAZYDEBUG(cout << "################################# " << sample << endl;)  LAZYDEBUG(cout << "################################# " << sample << endl;)
1693  #ifdef _OPENMP  #ifdef _OPENMP
1694      res=resolveSample(v,threadbuffersize*omp_get_thread_num(),sample,resoffset);      res=resolveSample(v,threadbuffersize*omp_get_thread_num(),sample,resoffset);

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

  ViewVC Help
Powered by ViewVC 1.1.26