/[escript]/branches/split/escriptcore/src/Data.h
ViewVC logotype

Diff of /branches/split/escriptcore/src/Data.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 4762 by jfenwick, Thu Mar 6 05:22:12 2014 UTC revision 4763 by jfenwick, Tue Mar 18 05:20:23 2014 UTC
# Line 622  If false, the result is a list of scalar Line 622  If false, the result is a list of scalar
622    getSampleDataRW(DataAbstract::ValueType::size_type sampleNo);    getSampleDataRW(DataAbstract::ValueType::size_type sampleNo);
623    
624    
625     /**
626        \brief
627        Return a pointer to the beginning of the underlying data
628        \warning please avoid using this method since it by-passes possible lazy improvements. May be removed without notice.
629        \return pointer to the data.
630    */
631      ESCRIPT_DLL_API
632      inline
633      const DataAbstract::ValueType::value_type*
634      getDataRO() const;  
635      
636    /**    /**
637       \brief       \brief
638       Return the sample data for the given tag. If an attempt is made to       Return the sample data for the given tag. If an attempt is made to
# Line 1976  Data::getSampleDataRO(DataAbstract::Valu Line 1987  Data::getSampleDataRO(DataAbstract::Valu
1987     return getReady()->getSampleDataRO(sampleNo);     return getReady()->getSampleDataRO(sampleNo);
1988  }  }
1989    
1990    inline
1991    const DataAbstract::ValueType::value_type*
1992    Data::getDataRO() const
1993    {
1994        if (isLazy())
1995        {
1996            throw DataException("Programmer error - getDataRO must not be called on Lazy Data.");
1997        }
1998        if (getNumSamples()==0)
1999        {
2000        return 0;
2001        }
2002        else
2003        {
2004        return &(getReady()->getVectorRO()[0]);
2005        }
2006    }
2007    
2008    
2009  /**  /**
2010     Binary Data object operators.     Binary Data object operators.
2011  */  */

Legend:
Removed from v.4762  
changed lines
  Added in v.4763

  ViewVC Help
Powered by ViewVC 1.1.26