Ignore:
Timestamp:
05/16/19 16:56:30 (2 years ago)
Author:
ymipsl
Message:

Solve blitz iterator problems when using string arrays. We now using direct access

YM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/trunk/src/io/onetcdf4_impl.hpp

    r1618 r1662  
    7676    memset (PtrArrayStr,' ',stringArrayLen*data.numElements()); 
    7777    size_t offset=0 ; 
     78 
     79// pb with iterator with blitz++ string array  with recent compiler 
     80/* 
    7881    Array<StdString,1>::const_iterator it, itb=data.begin(), ite=data.end() ; 
    7982    for(it=itb;it!=ite;++it, offset+=stringArrayLen) 
     
    8285      PtrArrayStr[offset+it->size()]='\0' ; 
    8386    } 
    84  
     87*/ 
     88     for(int i=0;i<data.numElements();i++,offset+=stringArrayLen) 
     89     { 
     90       data(i).copy(PtrArrayStr+offset,data(i).size()) ; 
     91       PtrArrayStr[offset+data(i).size()]='\0' ; 
     92     }  
    8593     CTimer::get("CONetCDF4::writeData writeData_").resume(); 
    8694     this->writeData_(grpid, varid, sstart, scount, PtrArrayStr); 
Note: See TracChangeset for help on using the changeset viewer.