/[escript]/trunk/escript/src/DataTypes.cpp
ViewVC logotype

Diff of /trunk/escript/src/DataTypes.cpp

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

revision 1747 by jfenwick, Wed Sep 3 04:56:50 2008 UTC revision 1751 by jfenwick, Fri Sep 5 06:16:34 2008 UTC
# Line 223  namespace DataTypes Line 223  namespace DataTypes
223                              ValueType::size_type otherOffset,                              ValueType::size_type otherOffset,
224                              const RegionLoopRangeType& region)                              const RegionLoopRangeType& region)
225     {     {
   
226        //        //
227        // Make sure views are not empty        // Make sure views are not empty
228    
# Line 235  namespace DataTypes Line 234  namespace DataTypes
234        //        //
235        // Check the view to be sliced from is compatible with the region to be sliced,        // Check the view to be sliced from is compatible with the region to be sliced,
236        // and that the region to be sliced is compatible with this view:        // and that the region to be sliced is compatible with this view:
   
237        EsysAssert(checkOffset(thisOffset,left.size(),noValues(leftShape)),        EsysAssert(checkOffset(thisOffset,left.size(),noValues(leftShape)),
238                   "Error - offset incompatible with this view.");                   "Error - offset incompatible with this view.");
239        EsysAssert(otherOffset+noValues(leftShape)<=other.size(),        EsysAssert(otherOffset+noValues(leftShape)<=other.size(),
# Line 319  namespace DataTypes Line 317  namespace DataTypes
317                                  ValueType::size_type otherOffset,                                  ValueType::size_type otherOffset,
318                                  const RegionLoopRangeType& region)                                  const RegionLoopRangeType& region)
319     {     {
   
320        //        //
321        // Make sure views are not empty        // Make sure views are not empty
322    
# Line 467  namespace DataTypes Line 464  namespace DataTypes
464     pointToString(const ValueType& data,const ShapeType& shape, int offset, const std::string& suffix)     pointToString(const ValueType& data,const ShapeType& shape, int offset, const std::string& suffix)
465     {     {
466        using namespace std;        using namespace std;
467        EsysAssert(!data.isEmpty(),"Error - View is empty.");        EsysAssert(data.size()>0,"Error - View is empty.");
468        stringstream temp;        stringstream temp;
469        string finalSuffix=suffix;        string finalSuffix=suffix;
470        if (suffix.length() > 0) {        if (suffix.length() > 0) {
# Line 532  namespace DataTypes Line 529  namespace DataTypes
529    
530     void copyPoint(ValueType& dest, ValueType::size_type doffset, ValueType::size_type nvals, const ValueType& src, ValueType::size_type soffset)     void copyPoint(ValueType& dest, ValueType::size_type doffset, ValueType::size_type nvals, const ValueType& src, ValueType::size_type soffset)
531     {     {
532        EsysAssert((!dest.isEmpty()&&!other.isEmpty()&&checkOffset(doffset,dest.size(),nvals)),        EsysAssert((dest.size()>0&&src.size()>0&&checkOffset(doffset,dest.size(),nvals)),
533                   "Error - Couldn't copy due to insufficient storage.");                   "Error - Couldn't copy due to insufficient storage.");
534  //       EsysAssert((checkShape(other.getShape())),  //       EsysAssert((checkShape(other.getShape())),
535  //                  createShapeErrorMessage("Error - Couldn't copy due to shape mismatch.",other.getShape(),m_shape));  //                  createShapeErrorMessage("Error - Couldn't copy due to shape mismatch.",other.getShape(),m_shape));

Legend:
Removed from v.1747  
changed lines
  Added in v.1751

  ViewVC Help
Powered by ViewVC 1.1.26