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

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

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

revision 102 by jgs, Wed Dec 15 07:08:39 2004 UTC revision 113 by jgs, Mon Feb 28 07:06:33 2005 UTC
# Line 69  int getDataPointRank(struct escriptDataC Line 69  int getDataPointRank(struct escriptDataC
69    }    }
70  }  }
71    
72  int* getDataPointShape(struct escriptDataC* data)  int getDataPointShape(struct escriptDataC* data,int i)
73  {  {
74    escript::Data* temp=(escript::Data*)(data->m_dataPtr);    if (data == (struct escriptDataC*)0) {
75    const escript::DataArrayView::ShapeType view=temp->getDataPointShape();         return 0;
76    return (int*) &(view[0]);    } else {
77         escript::Data* temp=(escript::Data*)(data->m_dataPtr);
78         int rank = temp->getDataPointRank();
79         if (i<0 || i>=rank) {
80            return 1;
81         } else {
82            const escript::DataArrayView::ShapeType view=temp->getDataPointShape();
83            return view[i];
84         }
85      }
86  }  }
87    
88  int getDataPointSize(struct escriptDataC* data)  int getDataPointSize(struct escriptDataC* data)

Legend:
Removed from v.102  
changed lines
  Added in v.113

  ViewVC Help
Powered by ViewVC 1.1.26