/[escript]/branches/intelc_win32/escript/src/Data.cpp
ViewVC logotype

Diff of /branches/intelc_win32/escript/src/Data.cpp

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

trunk/escript/src/Data.cpp revision 734 by gross, Wed Apr 26 22:39:51 2006 UTC branches/intelc_win32/escript/src/Data.cpp revision 742 by woo409, Sat Jun 24 11:27:16 2006 UTC
# Line 11  Line 11 
11   *                                                          *   *                                                          *
12   ************************************************************   ************************************************************
13  */  */
14    #ifdef _WIN32 && __INTEL_COMPILER
15    #include <mathimf.h>
16    #else
17    #include <math.h>
18    #endif
19    
20  #include "Data.h"  #include "Data.h"
21    
# Line 29  Line 34 
34  #include <algorithm>  #include <algorithm>
35  #include <vector>  #include <vector>
36  #include <functional>  #include <functional>
 #include <math.h>  
37    
38  #include <boost/python/dict.hpp>  #include <boost/python/dict.hpp>
39  #include <boost/python/extract.hpp>  #include <boost/python/extract.hpp>
# Line 1887  Data::archiveData(const std::string file Line 1891  Data::archiveData(const std::string file
1891    int dataPointSize = getDataPointSize();    int dataPointSize = getDataPointSize();
1892    int dataLength = getLength();    int dataLength = getLength();
1893    DataArrayView::ShapeType dataPointShape = getDataPointShape();    DataArrayView::ShapeType dataPointShape = getDataPointShape();
1894    int referenceNumbers[noSamples];    vector<int> referenceNumbers(noSamples);
1895    for (int sampleNo=0; sampleNo<noSamples; sampleNo++) {    for (int sampleNo=0; sampleNo<noSamples; sampleNo++) {
1896      referenceNumbers[sampleNo] = getFunctionSpace().getReferenceNoFromSampleNo(sampleNo);      referenceNumbers[sampleNo] = getFunctionSpace().getReferenceNoFromSampleNo(sampleNo);
1897    }    }
1898    int tagNumbers[noSamples];    vector<int> tagNumbers(noSamples);
1899    if (isTagged()) {    if (isTagged()) {
1900      for (int sampleNo=0; sampleNo<noSamples; sampleNo++) {      for (int sampleNo=0; sampleNo<noSamples; sampleNo++) {
1901        tagNumbers[sampleNo] = getFunctionSpace().getTagFromSampleNo(sampleNo);        tagNumbers[sampleNo] = getFunctionSpace().getTagFromSampleNo(sampleNo);
# Line 2045  Data::extractData(const std::string file Line 2049  Data::extractData(const std::string file
2049        dataPointShape.push_back(flatShape[dim]);        dataPointShape.push_back(flatShape[dim]);
2050      }      }
2051    }    }
2052    int referenceNumbers[noSamples];    vector<int> referenceNumbers(noSamples);
2053    for (int sampleNo=0; sampleNo<noSamples; sampleNo++) {    for (int sampleNo=0; sampleNo<noSamples; sampleNo++) {
2054      archiveFile.read(reinterpret_cast<char *>(&referenceNumbers[sampleNo]),sizeof(int));      archiveFile.read(reinterpret_cast<char *>(&referenceNumbers[sampleNo]),sizeof(int));
2055    }    }
2056    int tagNumbers[noSamples];    vector<int> tagNumbers(noSamples);
2057    if (dataType==2) {    if (dataType==2) {
2058      for (int sampleNo=0; sampleNo<noSamples; sampleNo++) {      for (int sampleNo=0; sampleNo<noSamples; sampleNo++) {
2059        archiveFile.read(reinterpret_cast<char *>(&tagNumbers[sampleNo]),sizeof(int));        archiveFile.read(reinterpret_cast<char *>(&tagNumbers[sampleNo]),sizeof(int));

Legend:
Removed from v.734  
changed lines
  Added in v.742

  ViewVC Help
Powered by ViewVC 1.1.26