Changeset 1542


Ignore:
Timestamp:
06/13/18 16:48:53 (6 years ago)
Author:
oabramkina
Message:

Replacing Boost's unordered_map and shared_pointer by its STL counterparts.

Two notes for Curie:

  • one can see the content of unordered_map with ddt only if XIOS has been compiled with gnu
  • XIOS will not compile any more with pgi (all available versions use old STL which are not up to the c++11 norms)
Location:
XIOS/trunk
Files:
128 edited

Legend:

Unmodified
Added
Removed
  • XIOS/trunk/arch/arch-GCC_LINUX.fcm

    r983 r1542  
    77%LINKER         mpif90   
    88 
    9 %BASE_CFLAGS    -ansi -w 
     9%BASE_CFLAGS    -w -std=c++11 
    1010%PROD_CFLAGS    -O3 -DBOOST_DISABLE_ASSERTS 
    1111%DEV_CFLAGS     -g -O2  
  • XIOS/trunk/arch/arch-X64_ADA.fcm

    r591 r1542  
    77%LINKER         mpiifort  -nofor-main 
    88 
    9 %BASE_CFLAGS    -diag-disable 1125 -diag-disable 279 
     9%BASE_CFLAGS    -std=c++11 -diag-disable 1125 -diag-disable 279 
    1010%PROD_CFLAGS    -O3 -D BOOST_DISABLE_ASSERTS 
    1111%DEV_CFLAGS     -g -traceback 
  • XIOS/trunk/arch/arch-X64_CURIE.fcm

    r1009 r1542  
    77%LINKER         mpif90  -nofor-main 
    88 
    9 %BASE_CFLAGS    -diag-disable 1125 -diag-disable 279 
     9%BASE_CFLAGS    -std=c++11 -diag-disable 1125 -diag-disable 279 
    1010%PROD_CFLAGS    -O3 -D BOOST_DISABLE_ASSERTS 
    1111#%DEV_CFLAGS     -g -traceback 
  • XIOS/trunk/arch/arch-X64_CURIE_GCC.fcm

    r591 r1542  
    77%LINKER         mpif90   
    88 
    9 %BASE_CFLAGS    -w 
     9%BASE_CFLAGS    -std=c++11 -w 
    1010%PROD_CFLAGS    -O3 -D BOOST_DISABLE_ASSERTS 
    1111%DEV_CFLAGS     -g -O2 
    1212%DEBUG_CFLAGS   -g  
    1313 
    14 %BASE_FFLAGS    -D__NONE__ 
     14%BASE_FFLAGS    -D__NONE__ -ffree-line-length-none 
    1515%PROD_FFLAGS    -O3 
    1616%DEV_FFLAGS     -g -O2  
  • XIOS/trunk/arch/arch-X64_CURIE_PGI.fcm

    r591 r1542  
    77%LINKER         mpif90 -noswitcherror 
    88 
    9 %BASE_CFLAGS    -D__NONE__ 
     9%BASE_CFLAGS    c++11 -D__NONE__ 
    1010%PROD_CFLAGS    -O3 -D BOOST_DISABLE_ASSERTS 
    1111%DEV_CFLAGS     -g -O2 
  • XIOS/trunk/arch/arch-X64_CURIE_VAMPIR.fcm

    r591 r1542  
    66%FCOMPILER      vtf90 -vt:f90 mpif90 -vt:inst manual -DVTRACE 
    77%LINKER         vtf90  -vt:f90 mpif90 -vt:inst manual -nofor-main -DVTRACE 
    8 %BASE_CFLAGS    -diag-disable 1125 -diag-disable 279 
     8%BASE_CFLAGS    -std=c++11 -diag-disable 1125 -diag-disable 279 
    99%PROD_CFLAGS    -O3 -D BOOST_DISABLE_ASSERTS 
    1010%DEV_CFLAGS     -g -traceback 
  • XIOS/trunk/arch/arch-X64_IRENE.fcm

    r1483 r1542  
    77%LINKER         mpif90  -nofor-main 
    88 
    9 %BASE_CFLAGS    -diag-disable 1125 -diag-disable 279 -D BOOST_NO_CXX11_DEFAULTED_FUNCTIONS -D BOOST_NO_CXX11_DELETED_FUNCTIONS 
     9%BASE_CFLAGS    -std=c++11 -diag-disable 1125 -diag-disable 279 
    1010%PROD_CFLAGS    -O3 -D BOOST_DISABLE_ASSERTS 
    1111#%DEV_CFLAGS     -g -traceback 
  • XIOS/trunk/arch/arch-X64_OCCIGEN.fcm

    r822 r1542  
    77%LINKER         mpif90  -nofor-main 
    88 
    9 %BASE_CFLAGS    -diag-disable 1125 -diag-disable 279 
     9%BASE_CFLAGS    -std=c++11 -diag-disable 1125 -diag-disable 279 
    1010%PROD_CFLAGS    -O3 -D BOOST_DISABLE_ASSERTS 
    1111%DEV_CFLAGS     -g -traceback 
  • XIOS/trunk/arch/arch-X64_POINCARE.fcm

    r804 r1542  
    77%LINKER         mpif90  -nofor-main 
    88 
    9 %BASE_CFLAGS    -diag-disable 1125 -diag-disable 279 
     9%BASE_CFLAGS    -std=c++11 -diag-disable 1125 -diag-disable 279 
    1010%PROD_CFLAGS    -O3 -D BOOST_DISABLE_ASSERTS 
    1111%DEV_CFLAGS     -g -traceback 
  • XIOS/trunk/arch/arch-XC30_Cray.fcm

    r591 r1542  
    1919%LINKER         CC 
    2020 
    21 %BASE_CFLAGS    -DMPICH_SKIP_MPICXX -h msglevel_4 -h zero -h gnu 
     21%BASE_CFLAGS     â€“hstd=c++11 -DMPICH_SKIP_MPICXX -h msglevel_4 -h zero -h gnu 
    2222 
    2323## Only use -O3 if you can load module cce/8.3.7 or later 
  • XIOS/trunk/src/array.hpp

    r591 r1542  
    44/// boost headers /// 
    55#include <boost/cstdint.hpp> 
    6 #include <boost/shared_ptr.hpp> 
    76#include <boost/multi_array.hpp> 
    87 
  • XIOS/trunk/src/array_mac.hpp

    r591 r1542  
    55 
    66// Type Fortran 
    7 #define ARRAY(valuetype, numdims) boost::shared_ptr<CArray<valuetype, numdims> > 
     7#define ARRAY(valuetype, numdims) std::shared_ptr<CArray<valuetype, numdims> > 
    88 
    99#define ARRAY_ASSIGN(value, valuetype, numdims, extent)\ 
  • XIOS/trunk/src/client.cpp

    r1243 r1542  
    314314      if (!fb->is_open()) 
    315315        ERROR("void CClient::openStream(const StdString& fileName, const StdString& ext, std::filebuf* fb)", 
    316               << std::endl << "Can not open <" << fileNameClient << "> file to write the client log(s)."); 
     316              << std::endl << "Can not open <" << fileNameClient.str() << "> file to write the client log(s)."); 
    317317    } 
    318318 
  • XIOS/trunk/src/client_client_dht_template.hpp

    r941 r1542  
    1515#include "mpi.hpp" 
    1616#include "policy.hpp" 
    17 #include <boost/unordered_map.hpp> 
     17#include  <unordered_map> 
    1818#include "dht_data_types.hpp" 
    1919 
     
    3434    typedef T InfoType; 
    3535    static const int infoTypeSize = sizeof(InfoType); 
    36 //    typedef typename boost::unordered_map<InfoType, std::vector<size_t> > InfoType2IndexMap; 
    37     typedef typename boost::unordered_map<size_t,InfoType> Index2InfoTypeMap; 
    38     typedef typename boost::unordered_map<size_t,std::vector<InfoType> > Index2VectorInfoTypeMap; 
     36//    typedef typename std::unordered_map<InfoType, std::vector<size_t> > InfoType2IndexMap; 
     37    typedef typename std::unordered_map<size_t,InfoType> Index2InfoTypeMap; 
     38    typedef typename std::unordered_map<size_t,std::vector<InfoType> > Index2VectorInfoTypeMap; 
    3939 
    4040  public: 
  • XIOS/trunk/src/client_client_dht_template_impl.hpp

    r1158 r1542  
    116116  size_t index; 
    117117  HashXIOS<size_t> hashGlobalIndex; 
    118   boost::unordered_map<size_t,int> nbIndices; 
     118  std::unordered_map<size_t,int> nbIndices; 
    119119  nbIndices.rehash(std::ceil(ssize/nbIndices.max_load_factor())); 
    120120  for (int i = 0; i < ssize; ++i) 
     
    131131  } 
    132132 
    133   boost::unordered_map<int, size_t* > client2ClientIndex; 
     133  std::unordered_map<int, size_t* > client2ClientIndex; 
    134134  for (int idx = 0; idx < nbClient; ++idx) 
    135135  { 
     
    183183  } 
    184184 
    185   boost::unordered_map<int, size_t* >::iterator itbIndex = client2ClientIndex.begin(), itIndex, 
     185  std::unordered_map<int, size_t* >::iterator itbIndex = client2ClientIndex.begin(), itIndex, 
    186186                                                iteIndex = client2ClientIndex.end(); 
    187187  for (itIndex = itbIndex; itIndex != iteIndex; ++itIndex) 
     
    257257  } 
    258258 
    259   boost::unordered_map<int,unsigned char*> client2ClientInfoOnReturn; 
    260   boost::unordered_map<int,size_t*> client2ClientIndexOnReturn; 
     259  std::unordered_map<int,unsigned char*> client2ClientInfoOnReturn; 
     260  std::unordered_map<int,size_t*> client2ClientIndexOnReturn; 
    261261  currentIndex = 0; 
    262262  for (int idx = 0; idx < nbRecvClient; ++idx) 
     
    308308  indexToInfoMappingLevel_.swap(indexToInfoMapping); 
    309309  if (0 != recvNbIndexCount) delete [] recvIndexBuff; 
    310   for (boost::unordered_map<int,size_t*>::const_iterator it = client2ClientIndex.begin(); 
     310  for (std::unordered_map<int,size_t*>::const_iterator it = client2ClientIndex.begin(); 
    311311                                                        it != client2ClientIndex.end(); ++it) 
    312312      delete [] it->second; 
     
    319319  } 
    320320 
    321   for (boost::unordered_map<int,unsigned char*>::const_iterator it = client2ClientInfoOnReturn.begin(); 
     321  for (std::unordered_map<int,unsigned char*>::const_iterator it = client2ClientInfoOnReturn.begin(); 
    322322                                                               it != client2ClientInfoOnReturn.end(); ++it) 
    323323      delete [] it->second; 
    324324 
    325   for (boost::unordered_map<int,size_t*>::const_iterator it = client2ClientIndexOnReturn.begin(); 
     325  for (std::unordered_map<int,size_t*>::const_iterator it = client2ClientIndexOnReturn.begin(); 
    326326                                            it != client2ClientIndexOnReturn.end(); ++it) 
    327327      delete [] it->second; 
     
    389389  } 
    390390 
    391   boost::unordered_map<int, size_t*> client2ClientIndex; 
    392   boost::unordered_map<int, unsigned char*> client2ClientInfo; 
     391  std::unordered_map<int, size_t*> client2ClientIndex; 
     392  std::unordered_map<int, unsigned char*> client2ClientInfo; 
    393393  for (int idx = 0; idx < nbClient; ++idx) 
    394394  { 
     
    455455  } 
    456456 
    457   boost::unordered_map<int, size_t* >::iterator itbIndex = client2ClientIndex.begin(), itIndex, 
     457  std::unordered_map<int, size_t* >::iterator itbIndex = client2ClientIndex.begin(), itIndex, 
    458458                                                iteIndex = client2ClientIndex.end(); 
    459459  for (itIndex = itbIndex; itIndex != iteIndex; ++itIndex) 
    460460    sendIndexToClients(itIndex->first, itIndex->second, sendNbIndexBuff[itIndex->first-groupRankBegin], commLevel, request); 
    461   boost::unordered_map<int, unsigned char*>::iterator itbInfo = client2ClientInfo.begin(), itInfo, 
     461  std::unordered_map<int, unsigned char*>::iterator itbInfo = client2ClientInfo.begin(), itInfo, 
    462462                                                      iteInfo = client2ClientInfo.end(); 
    463463  for (itInfo = itbInfo; itInfo != iteInfo; ++itInfo) 
     
    490490    delete [] recvInfoBuff; 
    491491  } 
    492   for (boost::unordered_map<int,unsigned char*>::const_iterator it = client2ClientInfo.begin(); 
     492  for (std::unordered_map<int,unsigned char*>::const_iterator it = client2ClientInfo.begin(); 
    493493                                                               it != client2ClientInfo.end(); ++it) 
    494494      delete [] it->second; 
    495495 
    496   for (boost::unordered_map<int,size_t*>::const_iterator it = client2ClientIndex.begin(); 
     496  for (std::unordered_map<int,size_t*>::const_iterator it = client2ClientIndex.begin(); 
    497497                                                        it != client2ClientIndex.end(); ++it) 
    498498      delete [] it->second; 
  • XIOS/trunk/src/client_server_mapping.hpp

    r1336 r1542  
    1313#include "array_new.hpp" 
    1414#include "mpi.hpp" 
    15 #include <boost/unordered_map.hpp> 
     15#include <unordered_map> 
    1616 
    1717namespace xios { 
     
    2525{ 
    2626public: 
    27   typedef boost::unordered_map<int, std::vector<size_t> > GlobalIndexMap; 
     27  typedef std::unordered_map<int, std::vector<size_t> > GlobalIndexMap; 
    2828  public: 
    2929    /** Default constructor */ 
  • XIOS/trunk/src/client_server_mapping_distributed.cpp

    r1336 r1542  
    1919{ 
    2020 
    21 CClientServerMappingDistributed::CClientServerMappingDistributed(const boost::unordered_map<size_t,int>& globalIndexOfServer, 
     21CClientServerMappingDistributed::CClientServerMappingDistributed(const std::unordered_map<size_t,int>& globalIndexOfServer, 
    2222                                                                 const MPI_Comm& clientIntraComm, bool isDataDistributed) 
    2323  : CClientServerMapping(), ccDHT_(0) 
  • XIOS/trunk/src/client_server_mapping_distributed.hpp

    r1336 r1542  
    1616#include "array_new.hpp" 
    1717#include "mpi.hpp" 
    18 #include <boost/unordered_map.hpp> 
     18#include <unordered_map> 
    1919#include "client_client_dht_template.hpp" 
    2020 
     
    3434  public: 
    3535    /** Default constructor */ 
    36     CClientServerMappingDistributed(const boost::unordered_map<size_t,int>& globalIndexOfServer, 
     36    CClientServerMappingDistributed(const std::unordered_map<size_t,int>& globalIndexOfServer, 
    3737                                    const MPI_Comm& clientIntraComm, 
    3838                                    bool isDataDistributed = true); 
  • XIOS/trunk/src/data_output.cpp

    r1158 r1542  
    8787      { 
    8888         CContext* context = CContext::getCurrent() ; 
    89          boost::shared_ptr<CCalendar> calendar = context->getCalendar(); 
     89         std::shared_ptr<CCalendar> calendar = context->getCalendar(); 
    9090 
    9191         this->writeTimeAxis_(field, calendar); 
  • XIOS/trunk/src/data_output.hpp

    r1158 r1542  
    5959            virtual void writeTimeDimension_(void)           = 0; 
    6060            virtual void writeTimeAxis_ (CField*     field, 
    61                                          const shared_ptr<CCalendar> cal) = 0; 
     61                                         const std::shared_ptr<CCalendar> cal) = 0; 
    6262 
    6363            /// Propriétés protégées /// 
  • XIOS/trunk/src/distribution.hpp

    r1129 r1542  
    1212#include "xios_spl.hpp" 
    1313#include "array_new.hpp" 
    14 #include <boost/unordered_map.hpp> 
     14#include <unordered_map> 
    1515 
    1616namespace xios { 
     
    2424{ 
    2525  public: 
    26   typedef boost::unordered_map<size_t,int> GlobalLocalMap; 
     26  typedef std::unordered_map<size_t,int> GlobalLocalMap; 
    2727 
    2828  public: 
  • XIOS/trunk/src/filter/binary_arithmetic_filter.hpp

    r642 r1542  
    55#include <string> 
    66#include "operator_expr.hpp" 
     7#include <unordered_map> 
    78 
    89namespace xios 
  • XIOS/trunk/src/filter/data_packet.hpp

    r643 r1542  
    22#define __XIOS_CDataPacket__ 
    33 
    4 #include <boost/shared_ptr.hpp> 
     4#include <memory> 
    55 
    66#include "array_new.hpp" 
     
    4343  }; // struct CDataPacket 
    4444 
    45   typedef boost::shared_ptr<CDataPacket> CDataPacketPtr; 
    46   typedef boost::shared_ptr<const CDataPacket> CConstDataPacketPtr; 
     45  typedef std::shared_ptr<CDataPacket> CDataPacketPtr; 
     46  typedef std::shared_ptr<const CDataPacket> CConstDataPacketPtr; 
    4747} // namespace xios 
    4848 
  • XIOS/trunk/src/filter/output_pin.cpp

    r1358 r1542  
    99  { /* Nothing to do */ } 
    1010 
    11   void COutputPin::connectOutput(boost::shared_ptr<CInputPin> inputPin, size_t inputSlot) 
     11  void COutputPin::connectOutput(std::shared_ptr<CInputPin> inputPin, size_t inputSlot) 
    1212  { 
    1313    if (!inputPin) 
     
    4242            "The packet cannot be null."); 
    4343 
    44     std::vector<std::pair<boost::shared_ptr<CInputPin>, size_t> >::iterator it, itEnd; 
     44    std::vector<std::pair<std::shared_ptr<CInputPin>, size_t> >::iterator it, itEnd; 
    4545    for (it = outputs.begin(), itEnd = outputs.end(); it != itEnd; ++it) 
    4646      it->first->setInput(it->second, packet); 
     
    6868  bool COutputPin::mustAutoTrigger() const 
    6969  { 
    70     std::vector<std::pair<boost::shared_ptr<CInputPin>, size_t> >::const_iterator it, itEnd; 
     70    std::vector<std::pair<std::shared_ptr<CInputPin>, size_t> >::const_iterator it, itEnd; 
    7171    for (it = outputs.begin(), itEnd = outputs.end(); it != itEnd; ++it) 
    7272    { 
     
    8080  void COutputPin::setOutputTriggers() 
    8181  { 
    82     std::vector<std::pair<boost::shared_ptr<CInputPin>, size_t> >::iterator it, itEnd; 
     82    std::vector<std::pair<std::shared_ptr<CInputPin>, size_t> >::iterator it, itEnd; 
    8383    for (it = outputs.begin(), itEnd = outputs.end(); it != itEnd; ++it) 
    8484      it->first->setInputTrigger(it->second, this); 
     
    8787  bool COutputPin::isDataExpected(const CDate& date) const 
    8888  { 
    89     std::vector<std::pair<boost::shared_ptr<CInputPin>, size_t> >::const_iterator it, itEnd; 
     89    std::vector<std::pair<std::shared_ptr<CInputPin>, size_t> >::const_iterator it, itEnd; 
    9090    for (it = outputs.begin(), itEnd = outputs.end(); it != itEnd; ++it) 
    9191    { 
  • XIOS/trunk/src/filter/output_pin.hpp

    r1358 r1542  
    2929       * \param inputSlot the input slot number 
    3030       */ 
    31       void connectOutput(boost::shared_ptr<CInputPin> inputPin, size_t inputSlot); 
     31      void connectOutput(std::shared_ptr<CInputPin> inputPin, size_t inputSlot); 
    3232 
    3333      /*! 
     
    9393 
    9494      //!< The list of connected filters and the corresponding slot numbers 
    95       std::vector<std::pair<boost::shared_ptr<CInputPin>, size_t> > outputs; 
     95      std::vector<std::pair<std::shared_ptr<CInputPin>, size_t> > outputs; 
    9696 
    9797      //! Output buffer, store the packets until the output is triggered 
  • XIOS/trunk/src/filter/spatial_transform_filter.cpp

    r1474 r1542  
    1111  { /* Nothing to do */ } 
    1212 
    13   std::pair<boost::shared_ptr<CSpatialTransformFilter>, boost::shared_ptr<CSpatialTransformFilter> > 
     13  std::pair<std::shared_ptr<CSpatialTransformFilter>, std::shared_ptr<CSpatialTransformFilter> > 
    1414  CSpatialTransformFilter::buildFilterGraph(CGarbageCollector& gc, CGrid* srcGrid, CGrid* destGrid, bool hasMissingValue, double missingValue) 
    1515  { 
    1616    if (!srcGrid || !destGrid) 
    17       ERROR("std::pair<boost::shared_ptr<CSpatialTransformFilter>, boost::shared_ptr<CSpatialTransformFilter> >" 
     17      ERROR("std::pair<std::shared_ptr<CSpatialTransformFilter>, std::shared_ptr<CSpatialTransformFilter> >" 
    1818            "buildFilterGraph(CGarbageCollector& gc, CGrid* srcGrid, CGrid* destGrid)", 
    1919            "Impossible to build the filter graph if either the source or the destination grid are null."); 
    2020 
    21     boost::shared_ptr<CSpatialTransformFilter> firstFilter, lastFilter; 
     21    std::shared_ptr<CSpatialTransformFilter> firstFilter, lastFilter; 
    2222    // Note that this loop goes from the last transformation to the first transformation 
    2323    do 
     
    3636      for (it=algoList.begin();it!=algoList.end();++it)  if (it->second.first == TRANS_TEMPORAL_SPLITTING) isSpatialTemporal=true ; 
    3737 
    38       boost::shared_ptr<CSpatialTransformFilter> filter ; 
    39       if( isSpatialTemporal) filter = boost::shared_ptr<CSpatialTransformFilter>(new CSpatialTemporalFilter(gc, engine, gridTransformation, defaultValue, inputCount)); 
    40       else filter = boost::shared_ptr<CSpatialTransformFilter>(new CSpatialTransformFilter(gc, engine, defaultValue, inputCount)); 
     38      std::shared_ptr<CSpatialTransformFilter> filter ; 
     39      if( isSpatialTemporal) filter = std::shared_ptr<CSpatialTransformFilter>(new CSpatialTemporalFilter(gc, engine, gridTransformation, defaultValue, inputCount)); 
     40      else filter = std::shared_ptr<CSpatialTransformFilter>(new CSpatialTransformFilter(gc, engine, defaultValue, inputCount)); 
    4141 
    4242       
     
    140140  } 
    141141 
    142   std::map<CGridTransformation*, boost::shared_ptr<CSpatialTransformFilterEngine> > CSpatialTransformFilterEngine::engines; 
     142  std::map<CGridTransformation*, std::shared_ptr<CSpatialTransformFilterEngine> > CSpatialTransformFilterEngine::engines; 
    143143 
    144144  CSpatialTransformFilterEngine* CSpatialTransformFilterEngine::get(CGridTransformation* gridTransformation) 
     
    148148            "Impossible to get the requested engine, the grid transformation is invalid."); 
    149149 
    150     std::map<CGridTransformation*, boost::shared_ptr<CSpatialTransformFilterEngine> >::iterator it = engines.find(gridTransformation); 
     150    std::map<CGridTransformation*, std::shared_ptr<CSpatialTransformFilterEngine> >::iterator it = engines.find(gridTransformation); 
    151151    if (it == engines.end()) 
    152152    { 
    153       boost::shared_ptr<CSpatialTransformFilterEngine> engine(new CSpatialTransformFilterEngine(gridTransformation)); 
     153      std::shared_ptr<CSpatialTransformFilterEngine> engine(new CSpatialTransformFilterEngine(gridTransformation)); 
    154154      it = engines.insert(std::make_pair(gridTransformation, engine)).first; 
    155155    } 
  • XIOS/trunk/src/filter/spatial_transform_filter.hpp

    r1275 r1542  
    3636       * \return the first and the last filters of the filter graph 
    3737       */ 
    38       static std::pair<boost::shared_ptr<CSpatialTransformFilter>, boost::shared_ptr<CSpatialTransformFilter> > 
     38      static std::pair<std::shared_ptr<CSpatialTransformFilter>, std::shared_ptr<CSpatialTransformFilter> > 
    3939      buildFilterGraph(CGarbageCollector& gc, CGrid* srcGrid, CGrid* destGrid, bool hasMissingValue, double defaultValue); 
    4040 
     
    141141 
    142142      //! The allocated engines 
    143       static std::map<CGridTransformation*, boost::shared_ptr<CSpatialTransformFilterEngine> > engines; 
     143      static std::map<CGridTransformation*, std::shared_ptr<CSpatialTransformFilterEngine> > engines; 
    144144  }; // class CSpatialTransformFilterEngine 
    145145} // namespace xios 
  • XIOS/trunk/src/group_factory.hpp

    r591 r1542  
    11#ifndef __XIOS_CGroupFactory__ 
    22#define __XIOS_CGroupFactory__ 
    3  
    4 /// boost headers /// 
    5 #include <boost/shared_ptr.hpp> 
    63 
    74/// XIOS headers /// 
     
    2320 
    2421         template <typename U> 
    25             static void AddGroup(boost::shared_ptr<U> pgroup, 
    26                                         boost::shared_ptr<U> cgroup); 
     22            static void AddGroup(std::shared_ptr<U> pgroup, 
     23                                        std::shared_ptr<U> cgroup); 
    2724 
    2825         template <typename U> 
    29             static void AddChild(boost::shared_ptr<U> group, 
    30                                         boost::shared_ptr<typename U::RelChild> child); 
     26            static void AddChild(std::shared_ptr<U> group, 
     27                                        std::shared_ptr<typename U::RelChild> child); 
    3128 
    3229         /// Accesseurs /// 
     
    3431 
    3532         template <typename U> 
    36             static boost::shared_ptr<U> 
    37                GetGroup(boost::shared_ptr<U> group, const StdString & id); 
     33            static std::shared_ptr<U> 
     34               GetGroup(std::shared_ptr<U> group, const StdString & id); 
    3835 
    3936         template <typename U> 
    40             static boost::shared_ptr<typename U::RelChild> 
    41                GetChild(boost::shared_ptr<U> group, const StdString & id); 
     37            static std::shared_ptr<typename U::RelChild> 
     38               GetChild(std::shared_ptr<U> group, const StdString & id); 
    4239 
    4340         template <typename U> 
    44             static int GetGroupNum(boost::shared_ptr<U> group); 
     41            static int GetGroupNum(std::shared_ptr<U> group); 
    4542         template <typename U> 
    46             static int GetGroupIdNum(boost::shared_ptr<U> group); 
     43            static int GetGroupIdNum(std::shared_ptr<U> group); 
    4744         template <typename U> 
    48             static int GetChildNum(boost::shared_ptr<U> group); 
     45            static int GetChildNum(std::shared_ptr<U> group); 
    4946         template <typename U> 
    50             static int GetChildIdNum(boost::shared_ptr<U> group); 
     47            static int GetChildIdNum(std::shared_ptr<U> group); 
    5148 
    5249         /// Tests /// 
    5350         template <typename U> 
    54             static bool HasGroup(boost::shared_ptr<U> group, const StdString & id); 
     51            static bool HasGroup(std::shared_ptr<U> group, const StdString & id); 
    5552 
    5653         template <typename U> 
    57             static bool HasChild(boost::shared_ptr<U> group, const StdString & id); 
     54            static bool HasChild(std::shared_ptr<U> group, const StdString & id); 
    5855 
    5956         /// Instanciateur /// 
    6057         template <typename U> 
    61             static boost::shared_ptr<U> 
    62                CreateGroup(boost::shared_ptr<U> group, const StdString & id = StdString("")); 
     58            static std::shared_ptr<U> 
     59               CreateGroup(std::shared_ptr<U> group, const StdString & id = StdString("")); 
    6360 
    6461         template <typename U> 
    65             static boost::shared_ptr<typename U::RelChild> 
    66                CreateChild(boost::shared_ptr<U> group, const StdString & id = StdString("")); 
     62            static std::shared_ptr<typename U::RelChild> 
     63               CreateChild(std::shared_ptr<U> group, const StdString & id = StdString("")); 
    6764 
    6865      private : 
  • XIOS/trunk/src/group_factory_decl.cpp

    r1457 r1542  
    55{ 
    66# define  macro(U) \ 
    7   template void CGroupFactory::AddGroup<U>(shared_ptr<U> pgroup,shared_ptr<U> cgroup); \ 
    8   template void CGroupFactory::AddChild<U>(shared_ptr<U> group, shared_ptr<U::RelChild> child); \ 
    9   template shared_ptr<U>  CGroupFactory::GetGroup<U>(shared_ptr<U> group, const StdString & id); \ 
    10   template shared_ptr<U::RelChild> CGroupFactory::GetChild<U>(shared_ptr<U> group, const StdString & id); \ 
    11   template int CGroupFactory::GetGroupNum<U>(shared_ptr<U> group); \ 
    12   template int CGroupFactory::GetGroupIdNum<U>(shared_ptr<U> group); \ 
    13   template int CGroupFactory::GetChildNum<U>(shared_ptr<U> group); \ 
    14   template int CGroupFactory::GetChildIdNum<U>(boost::shared_ptr<U> group); \ 
    15   template bool CGroupFactory::HasGroup<U>(shared_ptr<U> group, const StdString & id); \ 
    16   template bool CGroupFactory::HasChild<U>(boost::shared_ptr<U> group, const StdString & id); \ 
    17   template shared_ptr<U> CGroupFactory::CreateGroup<U>(shared_ptr<U> group, const StdString & id ); \ 
    18   template shared_ptr<U::RelChild>  CGroupFactory::CreateChild<U>(shared_ptr<U> group, const StdString & id); 
     7  template void CGroupFactory::AddGroup<U>(std::shared_ptr<U> pgroup, std::shared_ptr<U> cgroup); \ 
     8  template void CGroupFactory::AddChild<U>(std::shared_ptr<U> group, std::shared_ptr<U::RelChild> child); \ 
     9  template std::shared_ptr<U>  CGroupFactory::GetGroup<U>(std::shared_ptr<U> group, const StdString & id); \ 
     10  template std::shared_ptr<U::RelChild> CGroupFactory::GetChild<U>( std::shared_ptr<U> group, const StdString & id); \ 
     11  template int CGroupFactory::GetGroupNum<U>(std::shared_ptr<U> group); \ 
     12  template int CGroupFactory::GetGroupIdNum<U>(std::shared_ptr<U> group); \ 
     13  template int CGroupFactory::GetChildNum<U>(std::shared_ptr<U> group); \ 
     14  template int CGroupFactory::GetChildIdNum<U>(std::shared_ptr<U> group); \ 
     15  template bool CGroupFactory::HasGroup<U>(std::shared_ptr<U> group, const StdString & id); \ 
     16  template bool CGroupFactory::HasChild<U>(std::shared_ptr<U> group, const StdString & id); \ 
     17  template std::shared_ptr<U> CGroupFactory::CreateGroup<U>(std::shared_ptr<U> group, const StdString & id ); \ 
     18  template std::shared_ptr<U::RelChild>  CGroupFactory::CreateChild<U>(std::shared_ptr<U> group, const StdString & id); 
    1919 
    2020  macro(CFieldGroup) 
  • XIOS/trunk/src/group_factory_impl.hpp

    r591 r1542  
    99 
    1010   template <typename U> 
    11       void CGroupFactory::AddGroup(boost::shared_ptr<U> pgroup, 
    12                                    boost::shared_ptr<U> cgroup) 
     11      void CGroupFactory::AddGroup(std::shared_ptr<U> pgroup, 
     12                                   std::shared_ptr<U> cgroup) 
    1313   { 
    1414      if (cgroup.get() == NULL || pgroup.get() == NULL ) 
    15          ERROR("CGroupFactory::AddGroup(boost::shared_ptr<U> pgroup, boost::shared_ptr<U> cgroup)", 
     15         ERROR("CGroupFactory::AddGroup(std::shared_ptr<U> pgroup, std::shared_ptr<U> cgroup)", 
    1616               << " pgroup or cgroup NULL !"); 
    1717      if (!cgroup->hasId()) 
     
    2525 
    2626   template <typename U> 
    27       void CGroupFactory::AddChild(boost::shared_ptr<U> group, 
    28                                    boost::shared_ptr<typename U::RelChild> child) 
     27      void CGroupFactory::AddChild(std::shared_ptr<U> group, 
     28                                   std::shared_ptr<typename U::RelChild> child) 
    2929   { 
    3030      if (group.get() == NULL || child.get() == NULL ) 
    31          ERROR("CGroupFactory::AddGroup(boost::shared_ptr<U> pgroup, boost::shared_ptr<U> cgroup)", 
     31         ERROR("CGroupFactory::AddGroup(std::shared_ptr<U> pgroup, std::shared_ptr<U> cgroup)", 
    3232               << " pgroup or cgroup NULL !"); 
    3333      if (!child->hasId()) 
     
    4141 
    4242   template <typename U> 
    43       boost::shared_ptr<U> 
    44          CGroupFactory::CreateGroup(boost::shared_ptr<U> group, const StdString & id) 
     43      std::shared_ptr<U> 
     44         CGroupFactory::CreateGroup(std::shared_ptr<U> group, const StdString & id) 
    4545   { 
    4646      CObjectFactory::SetCurrentContextId 
     
    4848      if (id.size() == 0) 
    4949      { 
    50          boost::shared_ptr<U> value = CObjectFactory::CreateObject<U>(CObjectFactory::GenUId<U>()); 
     50         std::shared_ptr<U> value = CObjectFactory::CreateObject<U>(CObjectFactory::GenUId<U>()); 
    5151         group->groupList.insert(group->groupList.end(), value.get()); 
    5252         group->groupMap.insert(std::make_pair(value->getId(), value.get())); 
     
    5757      else 
    5858      { 
    59          boost::shared_ptr<U> value = CObjectFactory::CreateObject<U>(id); 
     59         std::shared_ptr<U> value = CObjectFactory::CreateObject<U>(id); 
    6060         group->groupList.insert(group->groupList.end(), value.get()); 
    6161         group->groupMap.insert(std::make_pair(id, value.get())); 
     
    6565 
    6666   template <typename U> 
    67       boost::shared_ptr<typename U::RelChild> 
    68          CGroupFactory::CreateChild(boost::shared_ptr<U> group, const StdString & id) 
     67      std::shared_ptr<typename U::RelChild> 
     68         CGroupFactory::CreateChild(std::shared_ptr<U> group, const StdString & id) 
    6969   { 
    7070      CObjectFactory::SetCurrentContextId 
     
    7272      if (id.size() == 0) 
    7373      { 
    74          boost::shared_ptr<typename U::RelChild> value = 
     74         std::shared_ptr<typename U::RelChild> value = 
    7575               CObjectFactory::CreateObject<typename U::RelChild>(); 
    7676         group->childList.insert(group->childList.end(), value.get()); 
     
    8282      else 
    8383      { 
    84          boost::shared_ptr<typename U::RelChild> value = 
     84         std::shared_ptr<typename U::RelChild> value = 
    8585               CObjectFactory::CreateObject<typename U::RelChild>(id); 
    8686         group->childList.insert(group->childList.end(), value.get()); 
     
    9191 
    9292   template <typename U> 
    93       bool CGroupFactory::HasGroup(boost::shared_ptr<U> group, const StdString & id) 
     93      bool CGroupFactory::HasGroup(std::shared_ptr<U> group, const StdString & id) 
    9494   {  return (group->groupMap.find(id) != group->groupMap.end()); } 
    9595 
    9696   template <typename U> 
    97       bool CGroupFactory::HasChild(boost::shared_ptr<U> group, const StdString & id) 
     97      bool CGroupFactory::HasChild(std::shared_ptr<U> group, const StdString & id) 
    9898   {  return (group->childMap.find(id) != group->childMap.end()); } 
    9999 
    100100   template <typename U> 
    101       int CGroupFactory::GetGroupNum(boost::shared_ptr<U> group) 
     101      int CGroupFactory::GetGroupNum(std::shared_ptr<U> group) 
    102102   { return (group->groupList.size()); } 
    103103 
    104104   template <typename U> 
    105       int CGroupFactory::GetGroupIdNum(boost::shared_ptr<U> group) 
     105      int CGroupFactory::GetGroupIdNum(std::shared_ptr<U> group) 
    106106   { return (group->groupMap.size()); } 
    107107 
    108108   template <typename U> 
    109       int CGroupFactory::GetChildNum(boost::shared_ptr<U> group) 
     109      int CGroupFactory::GetChildNum(std::shared_ptr<U> group) 
    110110   { return (group->childList.size()); } 
    111111 
    112112   template <typename U> 
    113       int CGroupFactory::GetChildIdNum(boost::shared_ptr<U> group) 
     113      int CGroupFactory::GetChildIdNum(std::shared_ptr<U> group) 
    114114   { return (group->childMap.size()); } 
    115115 
    116116   template <typename U> 
    117       boost::shared_ptr<U> 
    118          CGroupFactory::GetGroup(boost::shared_ptr<U> group, const StdString & id) 
     117      std::shared_ptr<U> 
     118         CGroupFactory::GetGroup(std::shared_ptr<U> group, const StdString & id) 
    119119   { 
    120120      if (!CGroupFactory::HasGroup<U>(group, id)) 
    121          ERROR("CGroupFactory::GetGroup(boost::shared_ptr<U> group, const StdString & id)", 
     121         ERROR("CGroupFactory::GetGroup(std::shared_ptr<U> group, const StdString & id)", 
    122122               << "[ id = " << id << ", U = " << U::GetName() << " ] " 
    123123               << " group is not referenced !"); 
     
    126126 
    127127   template <typename U> 
    128       boost::shared_ptr<typename U::RelChild> 
    129          CGroupFactory::GetChild(boost::shared_ptr<U> group, const StdString & id) 
     128      std::shared_ptr<typename U::RelChild> 
     129         CGroupFactory::GetChild(std::shared_ptr<U> group, const StdString & id) 
    130130   { 
    131131      if (!CGroupFactory::HasChild<U>(group, id)) 
    132          ERROR("CGroupFactory::GetChild(boost::shared_ptr<U> group, const StdString & id)", 
     132         ERROR("CGroupFactory::GetChild(std::shared_ptr<U> group, const StdString & id)", 
    133133               << "[ id = " << id << ", U = " << U::GetName() << " ] " 
    134134               << " child is not referenced !"); 
  • XIOS/trunk/src/group_template.hpp

    r1021 r1542  
    6464         void solveRefInheritance(void); 
    6565//         static bool has(const string & id);  
    66 //         static boost::shared_ptr<V> get(const string& id) ; 
    67 //         static boost::shared_ptr<V> create(const string& id=string("")) ; 
     66//         static std::shared_ptr<V> get(const string& id) ; 
     67//         static std::shared_ptr<V> create(const string& id=string("")) ; 
    6868         U* createChild(const string& id="") ; 
    6969           
  • XIOS/trunk/src/group_template_impl.hpp

    r1158 r1542  
    326326 
    327327//   template <class U, class V, class W> 
    328 //   boost::shared_ptr<V> CGroupTemplate<U, V, W>::get(const string& id)  
     328//   std::shared_ptr<V> CGroupTemplate<U, V, W>::get(const string& id)  
    329329//   { 
    330330//       return CObjectFactory::GetObject<V>(id) ; 
     
    332332 
    333333//   template <class U, class V, class W> 
    334 //   boost::shared_ptr<V> CGroupTemplate<U, V, W>::get()  
     334//   std::shared_ptr<V> CGroupTemplate<U, V, W>::get()  
    335335//   { 
    336336//       return CObjectFactory::GetObject<V>(this) ; 
     
    338338    
    339339//   template <class U, class V, class W> 
    340 //   boost::shared_ptr<V> CGroupTemplate<U, V, W>::create(const string& id)  
     340//   std::shared_ptr<V> CGroupTemplate<U, V, W>::create(const string& id)  
    341341//   { 
    342342//       return CObjectFactory::CreateObject<V>(id) ; 
  • XIOS/trunk/src/interface/c/icaxis.cpp

    r591 r1542  
    44 
    55#include <boost/multi_array.hpp> 
    6 #include <boost/shared_ptr.hpp> 
     6#include <memory> 
    77 
    88#include "xios.hpp" 
  • XIOS/trunk/src/interface/c/iccalendar.cpp

    r704 r1542  
    2424    CTimer::get("XIOS").resume(); 
    2525    const xios::CContext* context = CContext::getCurrent(); 
    26     const boost::shared_ptr<xios::CCalendar> cal = context->getCalendar(); 
     26    const std::shared_ptr<xios::CCalendar> cal = context->getCalendar(); 
    2727    if (!cal) 
    2828      ERROR("void cxios_get_current_date(cxios_date* current_date_c)", 
     
    4141  { 
    4242    CTimer::get("XIOS").resume(); 
    43     const boost::shared_ptr<xios::CCalendar> cal = CContext::getCurrent()->getCalendar(); 
     43    const std::shared_ptr<xios::CCalendar> cal = CContext::getCurrent()->getCalendar(); 
    4444    if (!cal) 
    4545      ERROR("int cxios_get_year_length_in_seconds(int year)", 
     
    5454  { 
    5555    CTimer::get("XIOS").resume(); 
    56     const boost::shared_ptr<xios::CCalendar> cal = CContext::getCurrent()->getCalendar(); 
     56    const std::shared_ptr<xios::CCalendar> cal = CContext::getCurrent()->getCalendar(); 
    5757    if (!cal) 
    5858      ERROR("int cxios_get_day_length_in_seconds()", 
  • XIOS/trunk/src/interface/c/iccalendar_wrapper.cpp

    r591 r1542  
    44 
    55#include <boost/multi_array.hpp> 
    6 #include <boost/shared_ptr.hpp> 
     6 
     7#include <memory> 
    78 
    89#include "xios.hpp" 
  • XIOS/trunk/src/interface/c/iccompute_connectivity_domain.cpp

    r934 r1542  
    44 
    55#include <boost/multi_array.hpp> 
    6 #include <boost/shared_ptr.hpp> 
    76 
    87#include "xios.hpp" 
  • XIOS/trunk/src/interface/c/iccontext.cpp

    r591 r1542  
    44 
    55#include <boost/multi_array.hpp> 
    6 #include <boost/shared_ptr.hpp> 
     6 
     7#include <memory> 
    78 
    89#include "xios.hpp" 
  • XIOS/trunk/src/interface/c/icdata.cpp

    r1054 r1542  
    44 
    55#include <boost/multi_array.hpp> 
    6 #include <boost/shared_ptr.hpp> 
     6#include <memory> 
    77#include <string> 
    88#include <cstring> 
  • XIOS/trunk/src/interface/c/icdate.cpp

    r1472 r1542  
    44 
    55#include <boost/multi_array.hpp> 
    6 #include <boost/shared_ptr.hpp> 
    76 
    87#include "xios.hpp" 
     
    2726  if (!context) 
    2827    ERROR(idFunc, << "Impossible to do calendar operations: no current context available."); 
    29   const boost::shared_ptr<xios::CCalendar> cal = context->getCalendar(); 
     28  const std::shared_ptr<xios::CCalendar> cal = context->getCalendar(); 
    3029  if (!cal) 
    3130    ERROR(idFunc, << "Impossible to do calendar operations: no calendar was defined."); 
  • XIOS/trunk/src/interface/c/icdomain.cpp

    r591 r1542  
    44 
    55#include <boost/multi_array.hpp> 
    6 #include <boost/shared_ptr.hpp> 
     6 
     7#include <memory> 
    78 
    89#include "xios.hpp" 
  • XIOS/trunk/src/interface/c/icduplicate_scalar_to_axis.cpp

    r1492 r1542  
    44 
    55#include <boost/multi_array.hpp> 
    6 #include <boost/shared_ptr.hpp> 
     6#include <memory> 
    77 
    88#include "xios.hpp" 
  • XIOS/trunk/src/interface/c/icexpand_domain.cpp

    r981 r1542  
    44 
    55#include <boost/multi_array.hpp> 
    6 #include <boost/shared_ptr.hpp> 
     6 
     7#include <memory> 
    78 
    89#include "xios.hpp" 
  • XIOS/trunk/src/interface/c/icextract_to_axis.cpp

    r981 r1542  
    44 
    55#include <boost/multi_array.hpp> 
    6 #include <boost/shared_ptr.hpp> 
     6#include <memory> 
    77 
    88#include "xios.hpp" 
  • XIOS/trunk/src/interface/c/icextract_to_scalar.cpp

    r981 r1542  
    44 
    55#include <boost/multi_array.hpp> 
    6 #include <boost/shared_ptr.hpp> 
     6#include <memory> 
    77 
    88#include "xios.hpp" 
  • XIOS/trunk/src/interface/c/icfield.cpp

    r1158 r1542  
    44 
    55#include <boost/multi_array.hpp> 
    6 #include <boost/shared_ptr.hpp> 
     6 
     7#include <memory> 
    78 
    89#include "xios.hpp" 
  • XIOS/trunk/src/interface/c/icfile.cpp

    r591 r1542  
    44 
    55#include <boost/multi_array.hpp> 
    6 #include <boost/shared_ptr.hpp> 
     6#include <memory> 
    77 
    88#include "xios.hpp" 
  • XIOS/trunk/src/interface/c/icgenerate_rectilinear_domain.cpp

    r786 r1542  
    44 
    55#include <boost/multi_array.hpp> 
    6 #include <boost/shared_ptr.hpp> 
     6 
     7#include <memory> 
    78 
    89#include "xios.hpp" 
  • XIOS/trunk/src/interface/c/icgrid.cpp

    r591 r1542  
    44 
    55#include <boost/multi_array.hpp> 
    6 #include <boost/shared_ptr.hpp> 
    76 
    87#include "xios.hpp" 
  • XIOS/trunk/src/interface/c/icinterpolate.cpp

    r786 r1542  
    44 
    55#include <boost/multi_array.hpp> 
    6 #include <boost/shared_ptr.hpp> 
    76 
    87#include "xios.hpp" 
  • XIOS/trunk/src/interface/c/icinverse_axis.cpp

    r786 r1542  
    44 
    55#include <boost/multi_array.hpp> 
    6 #include <boost/shared_ptr.hpp> 
     6 
     7#include <memory> 
    78 
    89#include "xios.hpp" 
  • XIOS/trunk/src/interface/c/icreduce_axis_to_axis.cpp

    r1492 r1542  
    44 
    55#include <boost/multi_array.hpp> 
    6 #include <boost/shared_ptr.hpp> 
     6 
     7#include <memory> 
    78 
    89#include "xios.hpp" 
  • XIOS/trunk/src/interface/c/icreduce_scalar_to_scalar.cpp

    r1492 r1542  
    44 
    55#include <boost/multi_array.hpp> 
    6 #include <boost/shared_ptr.hpp> 
     6 
     7#include <memory> 
    78 
    89#include "xios.hpp" 
  • XIOS/trunk/src/interface/c/icreduce_to_axis.cpp

    r981 r1542  
    44 
    55#include <boost/multi_array.hpp> 
    6 #include <boost/shared_ptr.hpp> 
     6 
     7#include <memory> 
    78 
    89#include "xios.hpp" 
  • XIOS/trunk/src/interface/c/icreduce_to_scalar.cpp

    r981 r1542  
    44 
    55#include <boost/multi_array.hpp> 
    6 #include <boost/shared_ptr.hpp> 
    76 
    87#include "xios.hpp" 
  • XIOS/trunk/src/interface/c/icreorder_domain.cpp

    r1492 r1542  
    44 
    55#include <boost/multi_array.hpp> 
    6 #include <boost/shared_ptr.hpp> 
     6 
     7#include <memory> 
    78 
    89#include "xios.hpp" 
  • XIOS/trunk/src/interface/c/icscalar.cpp

    r891 r1542  
    44 
    55#include <boost/multi_array.hpp> 
    6 #include <boost/shared_ptr.hpp> 
     6#include <memory> 
    77 
    88#include "xios.hpp" 
  • XIOS/trunk/src/interface/c/ictemporal_splitting.cpp

    r1492 r1542  
    44 
    55#include <boost/multi_array.hpp> 
    6 #include <boost/shared_ptr.hpp> 
     6 
     7#include <memory> 
    78 
    89#include "xios.hpp" 
  • XIOS/trunk/src/interface/c/icvariable.cpp

    r591 r1542  
    44 
    55#include <boost/multi_array.hpp> 
    6 #include <boost/shared_ptr.hpp> 
     6 
     7#include <memory> 
    78 
    89#include "xios.hpp" 
  • XIOS/trunk/src/interface/c/icxml_tree.cpp

    r981 r1542  
    44 
    55#include <boost/multi_array.hpp> 
    6 #include <boost/shared_ptr.hpp> 
     6#include <memory> 
    77 
    88#include "xios.hpp" 
  • XIOS/trunk/src/interface/c/iczoom.cpp

    r786 r1542  
    44 
    55#include <boost/multi_array.hpp> 
    6 #include <boost/shared_ptr.hpp> 
     6 
     7#include <memory> 
    78 
    89#include "xios.hpp" 
  • XIOS/trunk/src/interface/c_attr/icaxis_attr.cpp

    r1492 r1542  
    44 
    55#include <boost/multi_array.hpp> 
    6 #include <boost/shared_ptr.hpp> 
     6#include <memory> 
    77#include "xios.hpp" 
    88#include "attribute_template.hpp" 
  • XIOS/trunk/src/interface/c_attr/icaxisgroup_attr.cpp

    r1492 r1542  
    44 
    55#include <boost/multi_array.hpp> 
    6 #include <boost/shared_ptr.hpp> 
     6#include <memory> 
    77#include "xios.hpp" 
    88#include "attribute_template.hpp" 
  • XIOS/trunk/src/interface/c_attr/iccalendar_wrapper_attr.cpp

    r1492 r1542  
    44 
    55#include <boost/multi_array.hpp> 
    6 #include <boost/shared_ptr.hpp> 
     6#include <memory> 
    77#include "xios.hpp" 
    88#include "attribute_template.hpp" 
  • XIOS/trunk/src/interface/c_attr/iccompute_connectivity_domain_attr.cpp

    r934 r1542  
    44 
    55#include <boost/multi_array.hpp> 
    6 #include <boost/shared_ptr.hpp> 
     6#include <memory> 
    77#include "xios.hpp" 
    88#include "attribute_template.hpp" 
  • XIOS/trunk/src/interface/c_attr/iccontext_attr.cpp

    r591 r1542  
    44 
    55#include <boost/multi_array.hpp> 
    6 #include <boost/shared_ptr.hpp> 
     6#include <memory> 
    77#include "xios.hpp" 
    88#include "attribute_template.hpp" 
  • XIOS/trunk/src/interface/c_attr/icdomain_attr.cpp

    r1492 r1542  
    44 
    55#include <boost/multi_array.hpp> 
    6 #include <boost/shared_ptr.hpp> 
     6#include <memory> 
    77#include "xios.hpp" 
    88#include "attribute_template.hpp" 
  • XIOS/trunk/src/interface/c_attr/icdomaingroup_attr.cpp

    r1492 r1542  
    44 
    55#include <boost/multi_array.hpp> 
    6 #include <boost/shared_ptr.hpp> 
     6#include <memory> 
    77#include "xios.hpp" 
    88#include "attribute_template.hpp" 
  • XIOS/trunk/src/interface/c_attr/icduplicate_scalar_to_axis_attr.cpp

    r1492 r1542  
    44 
    55#include <boost/multi_array.hpp> 
    6 #include <boost/shared_ptr.hpp> 
     6#include <memory> 
    77#include "xios.hpp" 
    88#include "attribute_template.hpp" 
  • XIOS/trunk/src/interface/c_attr/icexpand_domain_attr.cpp

    r1158 r1542  
    44 
    55#include <boost/multi_array.hpp> 
    6 #include <boost/shared_ptr.hpp> 
     6#include <memory> 
    77#include "xios.hpp" 
    88#include "attribute_template.hpp" 
  • XIOS/trunk/src/interface/c_attr/icextract_axis_to_scalar_attr.cpp

    r981 r1542  
    44 
    55#include <boost/multi_array.hpp> 
    6 #include <boost/shared_ptr.hpp> 
     6#include <memory> 
    77#include "xios.hpp" 
    88#include "attribute_template.hpp" 
  • XIOS/trunk/src/interface/c_attr/icextract_domain_to_axis_attr.cpp

    r981 r1542  
    44 
    55#include <boost/multi_array.hpp> 
    6 #include <boost/shared_ptr.hpp> 
     6#include <memory> 
    77#include "xios.hpp" 
    88#include "attribute_template.hpp" 
  • XIOS/trunk/src/interface/c_attr/icfield_attr.cpp

    r1492 r1542  
    44 
    55#include <boost/multi_array.hpp> 
    6 #include <boost/shared_ptr.hpp> 
     6#include <memory> 
    77#include "xios.hpp" 
    88#include "attribute_template.hpp" 
  • XIOS/trunk/src/interface/c_attr/icfieldgroup_attr.cpp

    r1492 r1542  
    44 
    55#include <boost/multi_array.hpp> 
    6 #include <boost/shared_ptr.hpp> 
     6#include <memory> 
    77#include "xios.hpp" 
    88#include "attribute_template.hpp" 
  • XIOS/trunk/src/interface/c_attr/icfile_attr.cpp

    r1492 r1542  
    44 
    55#include <boost/multi_array.hpp> 
    6 #include <boost/shared_ptr.hpp> 
     6#include <memory> 
    77#include "xios.hpp" 
    88#include "attribute_template.hpp" 
  • XIOS/trunk/src/interface/c_attr/icfilegroup_attr.cpp

    r1492 r1542  
    44 
    55#include <boost/multi_array.hpp> 
    6 #include <boost/shared_ptr.hpp> 
     6#include <memory> 
    77#include "xios.hpp" 
    88#include "attribute_template.hpp" 
  • XIOS/trunk/src/interface/c_attr/icgenerate_rectilinear_domain_attr.cpp

    r786 r1542  
    44 
    55#include <boost/multi_array.hpp> 
    6 #include <boost/shared_ptr.hpp> 
     6#include <memory> 
    77#include "xios.hpp" 
    88#include "attribute_template.hpp" 
  • XIOS/trunk/src/interface/c_attr/icgrid_attr.cpp

    r1492 r1542  
    44 
    55#include <boost/multi_array.hpp> 
    6 #include <boost/shared_ptr.hpp> 
     6#include <memory> 
    77#include "xios.hpp" 
    88#include "attribute_template.hpp" 
  • XIOS/trunk/src/interface/c_attr/icgridgroup_attr.cpp

    r1492 r1542  
    44 
    55#include <boost/multi_array.hpp> 
    6 #include <boost/shared_ptr.hpp> 
     6#include <memory> 
    77#include "xios.hpp" 
    88#include "attribute_template.hpp" 
  • XIOS/trunk/src/interface/c_attr/icinterpolate_axis_attr.cpp

    r891 r1542  
    44 
    55#include <boost/multi_array.hpp> 
    6 #include <boost/shared_ptr.hpp> 
     6#include <memory> 
    77#include "xios.hpp" 
    88#include "attribute_template.hpp" 
  • XIOS/trunk/src/interface/c_attr/icinterpolate_domain_attr.cpp

    r1492 r1542  
    44 
    55#include <boost/multi_array.hpp> 
    6 #include <boost/shared_ptr.hpp> 
     6#include <memory> 
    77#include "xios.hpp" 
    88#include "attribute_template.hpp" 
  • XIOS/trunk/src/interface/c_attr/icinverse_axis_attr.cpp

    r786 r1542  
    44 
    55#include <boost/multi_array.hpp> 
    6 #include <boost/shared_ptr.hpp> 
     6#include <memory> 
    77#include "xios.hpp" 
    88#include "attribute_template.hpp" 
  • XIOS/trunk/src/interface/c_attr/icreduce_axis_to_axis_attr.cpp

    r1492 r1542  
    44 
    55#include <boost/multi_array.hpp> 
    6 #include <boost/shared_ptr.hpp> 
     6#include <memory> 
    77#include "xios.hpp" 
    88#include "attribute_template.hpp" 
  • XIOS/trunk/src/interface/c_attr/icreduce_axis_to_scalar_attr.cpp

    r980 r1542  
    44 
    55#include <boost/multi_array.hpp> 
    6 #include <boost/shared_ptr.hpp> 
     6#include <memory> 
    77#include "xios.hpp" 
    88#include "attribute_template.hpp" 
  • XIOS/trunk/src/interface/c_attr/icreduce_domain_to_axis_attr.cpp

    r1492 r1542  
    44 
    55#include <boost/multi_array.hpp> 
    6 #include <boost/shared_ptr.hpp> 
     6#include <memory> 
    77#include "xios.hpp" 
    88#include "attribute_template.hpp" 
  • XIOS/trunk/src/interface/c_attr/icreduce_domain_to_scalar_attr.cpp

    r1492 r1542  
    44 
    55#include <boost/multi_array.hpp> 
    6 #include <boost/shared_ptr.hpp> 
     6#include <memory> 
    77#include "xios.hpp" 
    88#include "attribute_template.hpp" 
  • XIOS/trunk/src/interface/c_attr/icreduce_scalar_to_scalar_attr.cpp

    r1492 r1542  
    44 
    55#include <boost/multi_array.hpp> 
    6 #include <boost/shared_ptr.hpp> 
     6#include <memory> 
    77#include "xios.hpp" 
    88#include "attribute_template.hpp" 
  • XIOS/trunk/src/interface/c_attr/icreorder_domain_attr.cpp

    r1492 r1542  
    44 
    55#include <boost/multi_array.hpp> 
    6 #include <boost/shared_ptr.hpp> 
     6#include <memory> 
    77#include "xios.hpp" 
    88#include "attribute_template.hpp" 
  • XIOS/trunk/src/interface/c_attr/icscalar_attr.cpp

    r1492 r1542  
    44 
    55#include <boost/multi_array.hpp> 
    6 #include <boost/shared_ptr.hpp> 
     6#include <memory> 
    77#include "xios.hpp" 
    88#include "attribute_template.hpp" 
  • XIOS/trunk/src/interface/c_attr/icscalargroup_attr.cpp

    r1492 r1542  
    44 
    55#include <boost/multi_array.hpp> 
    6 #include <boost/shared_ptr.hpp> 
     6#include <memory> 
    77#include "xios.hpp" 
    88#include "attribute_template.hpp" 
  • XIOS/trunk/src/interface/c_attr/ictemporal_splitting_attr.cpp

    r1492 r1542  
    44 
    55#include <boost/multi_array.hpp> 
    6 #include <boost/shared_ptr.hpp> 
     6#include <memory> 
    77#include "xios.hpp" 
    88#include "attribute_template.hpp" 
  • XIOS/trunk/src/interface/c_attr/icvariable_attr.cpp

    r1158 r1542  
    44 
    55#include <boost/multi_array.hpp> 
    6 #include <boost/shared_ptr.hpp> 
     6#include <memory> 
    77#include "xios.hpp" 
    88#include "attribute_template.hpp" 
  • XIOS/trunk/src/interface/c_attr/icvariablegroup_attr.cpp

    r1158 r1542  
    44 
    55#include <boost/multi_array.hpp> 
    6 #include <boost/shared_ptr.hpp> 
     6#include <memory> 
    77#include "xios.hpp" 
    88#include "attribute_template.hpp" 
  • XIOS/trunk/src/interface/c_attr/iczoom_axis_attr.cpp

    r1201 r1542  
    44 
    55#include <boost/multi_array.hpp> 
    6 #include <boost/shared_ptr.hpp> 
     6#include <memory> 
    77#include "xios.hpp" 
    88#include "attribute_template.hpp" 
  • XIOS/trunk/src/interface/c_attr/iczoom_domain_attr.cpp

    r787 r1542  
    44 
    55#include <boost/multi_array.hpp> 
    6 #include <boost/shared_ptr.hpp> 
     6#include <memory> 
    77#include "xios.hpp" 
    88#include "attribute_template.hpp" 
  • XIOS/trunk/src/io/nc4_data_output.cpp

    r1509 r1542  
    26972697      void CNc4DataOutput::writeTimeAxis_ 
    26982698                  (CField*    field, 
    2699                    const boost::shared_ptr<CCalendar> cal) 
     2699                   const std::shared_ptr<CCalendar> cal) 
    27002700      { 
    27012701         StdOStringStream oss; 
     
    29202920           msg.append(e.what()); 
    29212921           ERROR("CNc4DataOutput::writeTimeAxis_ (CField*    field, \ 
    2922                   const boost::shared_ptr<CCalendar> cal)", << msg); 
     2922                  const std::shared_ptr<CCalendar> cal)", << msg); 
    29232923         } 
    29242924      } 
  • XIOS/trunk/src/io/nc4_data_output.hpp

    r1456 r1542  
    6161            virtual void syncFile_      (void); 
    6262            virtual void writeTimeAxis_ (CField* field, 
    63                                          const boost::shared_ptr<CCalendar> cal); 
     63                                         const std::shared_ptr<CCalendar> cal); 
    6464 
    6565         protected : 
  • XIOS/trunk/src/node/axis.cpp

    r1421 r1542  
    202202     { 
    203203       // size estimation for sendDistributedValue 
    204        boost::unordered_map<int, vector<size_t> >::const_iterator it, ite = indSrv_[client->serverSize].end(); 
     204       std::unordered_map<int, vector<size_t> >::const_iterator it, ite = indSrv_[client->serverSize].end(); 
    205205       for (it = indSrv_[client->serverSize].begin(); it != ite; ++it) 
    206206       { 
     
    623623       
    624624        std::vector<int> serverZeroIndex; 
    625         serverZeroIndex = serverDescription.computeServerGlobalIndexInRange(std::make_pair<size_t,size_t>(indexBegin, indexEnd), 0);       
     625        serverZeroIndex = serverDescription.computeServerGlobalIndexInRange(std::make_pair<size_t&,size_t&>(indexBegin, indexEnd), 0); 
    626626 
    627627        std::list<int> serverZeroIndexLeader; 
     
    689689    // we need to compute the local index on the server from its corresponding global index 
    690690    size_t nbWritten = 0, indGlo;       
    691     boost::unordered_map<size_t,size_t>::const_iterator itb = globalLocalIndexMap_.begin(), 
     691    std::unordered_map<size_t,size_t>::const_iterator itb = globalLocalIndexMap_.begin(), 
    692692                                                        ite = globalLocalIndexMap_.end(), it;           
    693693    CArray<size_t,1>::const_iterator itSrvb = writtenGlobalIndex.begin(), 
     
    721721    { 
    722722      nbWritten = 0; 
    723       boost::unordered_map<size_t,size_t>::const_iterator itb = globalLocalIndexMap_.begin(), 
     723      std::unordered_map<size_t,size_t>::const_iterator itb = globalLocalIndexMap_.begin(), 
    724724                                                          ite = globalLocalIndexMap_.end(), it; 
    725725      for (int i = 0; i < zoom_index.numElements(); ++i) 
     
    745745    // { 
    746746    //   nbWritten = 0; 
    747     //   boost::unordered_map<size_t,size_t> localGlobalIndexMap; 
     747    //   std::unordered_map<size_t,size_t> localGlobalIndexMap; 
    748748    //   for (itSrv = itSrvb; itSrv != itSrve; ++itSrv) 
    749749    //   { 
     
    810810      CDistributionServer srvDist(server->intraCommSize, nBegin, nSize, nBeginGlobal, nGlob);  
    811811      const CArray<size_t,1>& writtenGlobalIndex  = srvDist.getGlobalIndex(); 
    812       boost::unordered_map<size_t,size_t>::const_iterator itb = globalLocalIndexMap_.begin(), 
     812      std::unordered_map<size_t,size_t>::const_iterator itb = globalLocalIndexMap_.begin(), 
    813813                                                          ite = globalLocalIndexMap_.end(), it;    
    814814 
    815815      CArray<size_t,1>::const_iterator itSrvb = writtenGlobalIndex.begin(), 
    816816                                       itSrve = writtenGlobalIndex.end(), itSrv; 
    817       boost::unordered_map<size_t,size_t> localGlobalIndexMap; 
     817      std::unordered_map<size_t,size_t> localGlobalIndexMap; 
    818818      for (itSrv = itSrvb; itSrv != itSrve; ++itSrv) 
    819819      { 
     
    11371137      } 
    11381138 
    1139       boost::unordered_map<int, std::vector<size_t> >::const_iterator it, iteMap; 
     1139      std::unordered_map<int, std::vector<size_t> >::const_iterator it, iteMap; 
    11401140      iteMap = indSrv_[nbServer].end(); 
    11411141      for (int k = 0; k < connectedServerRank_[nbServer].size(); ++k) 
  • XIOS/trunk/src/node/axis.hpp

    r1371 r1542  
    166166         bool isCompressible_; 
    167167         std::map<int, map<int,int> > nbSenders; // Mapping of number of communicating client to a server 
    168          std::map<int, boost::unordered_map<int, vector<size_t> > > indSrv_; // Global index of each client sent to server 
     168         std::map<int, std::unordered_map<int, vector<size_t> > > indSrv_; // Global index of each client sent to server 
    169169         // std::map<int, vector<int> > indWrittenSrv_; // Global written index of each client sent to server 
    170          boost::unordered_map<size_t,size_t> globalLocalIndexMap_; 
     170         std::unordered_map<size_t,size_t> globalLocalIndexMap_; 
    171171         std::vector<int> indexesToWrite; 
    172172         std::map<int,int> numberWrittenIndexes_, totalNumberWrittenIndexes_, offsetWrittenIndexes_; 
  • XIOS/trunk/src/node/calendar_wrapper.cpp

    r1201 r1542  
    3232  \return the calendar 
    3333  */ 
    34   boost::shared_ptr<CCalendar> CCalendarWrapper::getCalendar(bool checkValid /*= false*/) const 
     34  std::shared_ptr<CCalendar> CCalendarWrapper::getCalendar(bool checkValid /*= false*/) const 
    3535  { 
    3636    if (checkValid && !this->calendar) 
     
    9292#define DECLARE_CALENDAR(MType, eType)                                     \ 
    9393      if (type.getValue() == type_attr::eType)                             \ 
    94         calendar = boost::shared_ptr<CCalendar>(new C##MType##Calendar()); 
     94        calendar = std::shared_ptr<CCalendar>(new C##MType##Calendar()); 
    9595#include "calendar_type.conf" 
    9696#undef DECLARE_CALENDAR 
     
    111111                << "Both leap_year_drift and leap_year_month attributes are mandatory if you wish to use leap_year_drift_offset attribute."); 
    112112 
    113         boost::shared_ptr<CUserDefinedCalendar> userDefinedCalendar; 
     113        std::shared_ptr<CUserDefinedCalendar> userDefinedCalendar; 
    114114        if (year_length.isEmpty()) 
    115115          userDefinedCalendar.reset(new CUserDefinedCalendar(day_length.getValue(), month_lengths.getValue())); 
  • XIOS/trunk/src/node/calendar_wrapper.hpp

    r591 r1542  
    6767    public : 
    6868      /// Accesseurs /// 
    69       boost::shared_ptr<CCalendar> getCalendar(bool checkValid = false) const; 
     69      std::shared_ptr<CCalendar> getCalendar(bool checkValid = false) const; 
    7070 
    7171      const CDate& getInitDate() const; 
     
    7878    private: 
    7979      // Calendar of context 
    80       boost::shared_ptr<CCalendar> calendar; 
     80      std::shared_ptr<CCalendar> calendar; 
    8181 
    8282  }; // class CCalendarWrapper 
  • XIOS/trunk/src/node/context.cpp

    r1489 r1542  
    2323namespace xios { 
    2424 
    25   shared_ptr<CContextGroup> CContext::root; 
     25  std::shared_ptr<CContextGroup> CContext::root; 
    2626 
    2727   /// ////////////////////// Définitions ////////////////////// /// 
     
    6666   CContextGroup* CContext::getRoot(void) 
    6767   { 
    68       if (root.get()==NULL) root=shared_ptr<CContextGroup>(new CContextGroup(xml::CXMLNode::GetRootName())); 
     68      if (root.get()==NULL) root=std::shared_ptr<CContextGroup>(new CContextGroup(xml::CXMLNode::GetRootName())); 
    6969      return root.get(); 
    7070   } 
     
    7676   \return Calendar 
    7777   */ 
    78    boost::shared_ptr<CCalendar> CContext::getCalendar(void) const 
     78   std::shared_ptr<CCalendar> CContext::getCalendar(void) const 
    7979   { 
    8080      return (this->calendar); 
     
    8787   \param[in] newCalendar new calendar 
    8888   */ 
    89    void CContext::setCalendar(boost::shared_ptr<CCalendar> newCalendar) 
     89   void CContext::setCalendar(std::shared_ptr<CCalendar> newCalendar) 
    9090   { 
    9191      this->calendar = newCalendar; 
     
    14141414     idServer_ = this->getId(); 
    14151415     idServer_ += "_server_"; 
    1416      idServer_ += boost::lexical_cast<string>(i); 
     1416     idServer_ += std::to_string(static_cast<unsigned long long>(i)); 
    14171417     return idServer_; 
    14181418   } 
  • XIOS/trunk/src/node/context.hpp

    r1378 r1542  
    88 
    99#include "declare_group.hpp" 
    10 //#include "context_client.hpp" 
    11 //#include "context_server.hpp" 
    1210#include "data_output.hpp" 
    1311#include "garbage_collector.hpp" 
     
    8381 
    8482         /// Mutateurs /// 
    85          void setCalendar(boost::shared_ptr<CCalendar> newCalendar); 
     83         void setCalendar(std::shared_ptr<CCalendar> newCalendar); 
    8684 
    8785         /// Accesseurs /// 
    88          boost::shared_ptr<CCalendar>      getCalendar(void) const; 
     86         std::shared_ptr<CCalendar>      getCalendar(void) const; 
    8987 
    9088      public : 
     
    227225      public : 
    228226         // Calendar of context 
    229          boost::shared_ptr<CCalendar>   calendar; 
     227         std::shared_ptr<CCalendar>   calendar; 
    230228 
    231229         // List of all enabled files (files on which fields are written or read) 
     
    241239 
    242240         // Context root 
    243          static shared_ptr<CContextGroup> root; 
     241         static std::shared_ptr<CContextGroup> root; 
    244242 
    245243         // Determine context on client or not 
  • XIOS/trunk/src/node/domain.cpp

    r1509 r1542  
    150150     } 
    151151 
    152      boost::unordered_map<int, vector<size_t> >::const_iterator itIndexEnd = indSrv_[client->serverSize].end(); 
     152     std::unordered_map<int, vector<size_t> >::const_iterator itIndexEnd = indSrv_[client->serverSize].end(); 
    153153     // std::map<int, std::vector<int> >::const_iterator itWrittenIndexEnd = indWrittenSrv_.end(); 
    154154     for (size_t k = 0; k < connectedServerRank_[client->serverSize].size(); ++k) 
    155155     { 
    156156       int rank = connectedServerRank_[client->serverSize][k]; 
    157        boost::unordered_map<int, std::vector<size_t> >::const_iterator it = indSrv_[client->serverSize].find(rank); 
     157       std::unordered_map<int, std::vector<size_t> >::const_iterator it = indSrv_[client->serverSize].find(rank); 
    158158       size_t idxCount = (it != itIndexEnd) ? it->second.size() : 0; 
    159159 
     
    18381838           CServerDistributionDescription serverDescription(nGlobDomain, nbServer); 
    18391839           std::vector<int> serverZeroIndex; 
    1840            if (isUnstructed_) serverZeroIndex = serverDescription.computeServerGlobalIndexInRange(std::make_pair<size_t,size_t>(indexBegin, indexEnd), 0); 
    1841            else serverZeroIndex = serverDescription.computeServerGlobalIndexInRange(std::make_pair<size_t,size_t>(indexBegin, indexEnd), 1); 
     1840           if (isUnstructed_) serverZeroIndex = serverDescription.computeServerGlobalIndexInRange(std::make_pair<size_t&,size_t&>(indexBegin, indexEnd), 0); 
     1841           else serverZeroIndex = serverDescription.computeServerGlobalIndexInRange(std::make_pair<size_t&,size_t&>(indexBegin, indexEnd), 1); 
    18421842 
    18431843           std::list<int> serverZeroIndexLeader; 
     
    18961896 
    18971897      size_t nbWritten = 0, indGlo;       
    1898       boost::unordered_map<size_t,size_t>::const_iterator itb = globalLocalIndexMap_.begin(), 
     1898      std::unordered_map<size_t,size_t>::const_iterator itb = globalLocalIndexMap_.begin(), 
    18991899                                                          ite = globalLocalIndexMap_.end(), it;           
    19001900      CArray<size_t,1>::const_iterator itSrvb = writtenGlobalIndex.begin(), 
     
    19321932      // { 
    19331933      //   nbWritten = 0; 
    1934       //   boost::unordered_map<size_t,size_t> localGlobalIndexMap; 
     1934      //   std::unordered_map<size_t,size_t> localGlobalIndexMap; 
    19351935      //   for (itSrv = itSrvb; itSrv != itSrve; ++itSrv) 
    19361936      //   { 
     
    19961996      const CArray<size_t,1>& writtenGlobalIndex  = srvDist.getGlobalIndex(); 
    19971997 
    1998       boost::unordered_map<size_t,size_t>::const_iterator itb = globalLocalIndexMap_.begin(), 
     1998      std::unordered_map<size_t,size_t>::const_iterator itb = globalLocalIndexMap_.begin(), 
    19991999                                                          ite = globalLocalIndexMap_.end(), it;    
    20002000      CArray<size_t,1>::const_iterator itSrvb = writtenGlobalIndex.begin(), 
    20012001                                       itSrve = writtenGlobalIndex.end(), itSrv; 
    2002       boost::unordered_map<size_t,size_t> localGlobalIndexMap; 
     2002      std::unordered_map<size_t,size_t> localGlobalIndexMap; 
    20032003      for (itSrv = itSrvb; itSrv != itSrve; ++itSrv) 
    20042004      { 
     
    20762076      list<CArray<int,1> > list_indZoom, list_writtenInd, list_indGlob; 
    20772077 
    2078       boost::unordered_map<int, vector<size_t> >::const_iterator itIndex, iteIndex; 
     2078      std::unordered_map<int, vector<size_t> >::const_iterator itIndex, iteIndex; 
    20792079      iteIndex = indSrv_[serverSize].end(); 
    20802080      for (int k = 0; k < connectedServerRank_[serverSize].size(); ++k) 
     
    21772177      list<CArray<bool,1> > list_mask; 
    21782178 
    2179       boost::unordered_map<int, vector<size_t> >::const_iterator it, iteMap; 
     2179      std::unordered_map<int, vector<size_t> >::const_iterator it, iteMap; 
    21802180      iteMap = indSrv_[serverSize].end(); 
    21812181      for (int k = 0; k < connectedServerRank_[serverSize].size(); ++k) 
     
    22242224      list<CArray<double,1> > list_area; 
    22252225 
    2226       boost::unordered_map<int, vector<size_t> >::const_iterator it, iteMap; 
     2226      std::unordered_map<int, vector<size_t> >::const_iterator it, iteMap; 
    22272227      iteMap = indSrv_[serverSize].end(); 
    22282228      for (int k = 0; k < connectedServerRank_[serverSize].size(); ++k) 
     
    22752275      list<CArray<double,2> > list_boundslon, list_boundslat; 
    22762276 
    2277       boost::unordered_map<int, vector<size_t> >::const_iterator it, iteMap; 
     2277      std::unordered_map<int, vector<size_t> >::const_iterator it, iteMap; 
    22782278      iteMap = indSrv_[serverSize].end(); 
    22792279      for (int k = 0; k < connectedServerRank_[serverSize].size(); ++k) 
     
    23922392      } 
    23932393 
    2394       boost::unordered_map<int, vector<size_t> >::const_iterator it, iteMap; 
     2394      std::unordered_map<int, vector<size_t> >::const_iterator it, iteMap; 
    23952395      iteMap = indSrv_[serverSize].end(); 
    23962396      for (int k = 0; k < connectedServerRank_[serverSize].size(); ++k) 
  • XIOS/trunk/src/node/domain.hpp

    r1353 r1542  
    215215 
    216216/** Global index of each client sent to server: map<serverSize, map<serverRank, indexes>> */ 
    217          std::map<int, boost::unordered_map<int, vector<size_t> > > indSrv_; 
     217         std::map<int, std::unordered_map<int, vector<size_t> > > indSrv_; 
    218218         // std::map<CContextClient*, std::map<int, vector<int> > > indWrittenSrv_; // Global written index of each client sent to server 
    219219         std::vector<int> indexesToWrite; 
     
    229229         TransMapTypes transformationMap_;          
    230230         bool isUnstructed_; 
    231          boost::unordered_map<size_t,size_t> globalLocalIndexMap_; 
     231         std::unordered_map<size_t,size_t> globalLocalIndexMap_; 
    232232        
    233233       private: 
  • XIOS/trunk/src/node/field.cpp

    r1524 r1542  
    219219      // Gather all data from different clients       
    220220      recvDataSrv.resize(storeClient.numElements()); 
    221       recvFoperationSrv = boost::shared_ptr<func::CFunctor>(new func::CInstant(recvDataSrv)); 
     221      recvFoperationSrv = std::shared_ptr<func::CFunctor>(new func::CInstant(recvDataSrv)); 
    222222    } 
    223223 
     
    716716   //---------------------------------------------------------------- 
    717717 
    718    boost::shared_ptr<COutputPin> CField::getInstantDataFilter() 
     718   std::shared_ptr<COutputPin> CField::getInstantDataFilter() 
    719719   { 
    720720     return instantDataFilter; 
     
    984984              << "An operation must be defined for field \"" << getId() << "\"."); 
    985985 
    986       boost::shared_ptr<func::CFunctor> functor; 
     986      std::shared_ptr<func::CFunctor> functor; 
    987987      CArray<double, 1> dummyData; 
    988988 
     
    10271027     { 
    10281028        if (!instantDataFilter) 
    1029           instantDataFilter = clientSourceFilter = boost::shared_ptr<CSourceFilter>(new CSourceFilter(gc, grid,true)); 
     1029          instantDataFilter = clientSourceFilter = std::shared_ptr<CSourceFilter>(new CSourceFilter(gc, grid,true)); 
    10301030 
    10311031 
     
    10351035         if (file && (file->mode.isEmpty() || file->mode == CFile::mode_attr::write)) 
    10361036         { 
    1037            fileServerWriterFilter = boost::shared_ptr<CFileServerWriterFilter>(new CFileServerWriterFilter(gc, this)); 
     1037           fileServerWriterFilter = std::shared_ptr<CFileServerWriterFilter>(new CFileServerWriterFilter(gc, this)); 
    10381038           instantDataFilter->connectOutput(fileServerWriterFilter, 0); 
    10391039         } 
     
    10431043     { 
    10441044       if (!instantDataFilter) 
    1045          instantDataFilter = clientSourceFilter = boost::shared_ptr<CSourceFilter>(new CSourceFilter(gc, grid, true)); 
     1045         instantDataFilter = clientSourceFilter = std::shared_ptr<CSourceFilter>(new CSourceFilter(gc, grid, true)); 
    10461046 
    10471047             // If the field data is to be read by the client or/and written to a file 
     
    10501050         if (file && (file->mode.isEmpty() || file->mode == CFile::mode_attr::write)) 
    10511051         { 
    1052            fileWriterFilter = boost::shared_ptr<CFileWriterFilter>(new CFileWriterFilter(gc, this)); 
     1052           fileWriterFilter = std::shared_ptr<CFileWriterFilter>(new CFileWriterFilter(gc, this)); 
    10531053           instantDataFilter->connectOutput(fileWriterFilter, 0); 
    10541054         } 
     
    10641064         { 
    10651065           boost::scoped_ptr<IFilterExprNode> expr(parseExpr(getExpression() + '\0')); 
    1066            boost::shared_ptr<COutputPin> filter = expr->reduce(gc, *this); 
     1066           std::shared_ptr<COutputPin> filter = expr->reduce(gc, *this); 
    10671067 
    10681068           // Check if a spatial transformation is needed 
     
    10731073             if (grid && grid != gridRef && grid->hasTransform()) 
    10741074             { 
    1075                  std::pair<boost::shared_ptr<CFilter>, boost::shared_ptr<CFilter> > filters = CSpatialTransformFilter::buildFilterGraph(gc, gridRef, grid, detectMissingValues, defaultValue);  
     1075                 std::pair<std::shared_ptr<CFilter>, std::shared_ptr<CFilter> > filters = CSpatialTransformFilter::buildFilterGraph(gc, gridRef, grid, detectMissingValues, defaultValue);  
    10761076 
    10771077               filter->connectOutput(filters.first, 0); 
     
    10891089         { 
    10901090           checkTimeAttributes(); 
    1091            instantDataFilter = serverSourceFilter = boost::shared_ptr<CSourceFilter>(new CSourceFilter(gc, grid, true, freq_offset, true, 
     1091           instantDataFilter = serverSourceFilter = std::shared_ptr<CSourceFilter>(new CSourceFilter(gc, grid, true, freq_offset, true, 
    10921092                                                                                                       detectMissingValues, defaultValue)); 
    10931093         } 
     
    10951095         { 
    10961096            if (check_if_active.isEmpty()) check_if_active = false;  
    1097             instantDataFilter = clientSourceFilter = boost::shared_ptr<CSourceFilter>(new CSourceFilter(gc, grid, false, NoneDu, false, 
     1097            instantDataFilter = clientSourceFilter = std::shared_ptr<CSourceFilter>(new CSourceFilter(gc, grid, false, NoneDu, false, 
    10981098                                                                                                        detectMissingValues, defaultValue)); 
    10991099         } 
     
    11051105         if (!read_access.isEmpty() && read_access) 
    11061106         { 
    1107            storeFilter = boost::shared_ptr<CStoreFilter>(new CStoreFilter(gc, CContext::getCurrent(), grid, 
     1107           storeFilter = std::shared_ptr<CStoreFilter>(new CStoreFilter(gc, CContext::getCurrent(), grid, 
    11081108                                                                          detectMissingValues, defaultValue)); 
    11091109           instantDataFilter->connectOutput(storeFilter, 0); 
     
    11121112         if (file && (file->mode.isEmpty() || file->mode == CFile::mode_attr::write)) 
    11131113         { 
    1114            fileWriterFilter = boost::shared_ptr<CFileWriterFilter>(new CFileWriterFilter(gc, this)); 
     1114           fileWriterFilter = std::shared_ptr<CFileWriterFilter>(new CFileWriterFilter(gc, this)); 
    11151115           getTemporalDataFilter(gc, file->output_freq)->connectOutput(fileWriterFilter, 0); 
    11161116         } 
     
    11261126    * \return the output pin corresponding to the field reference 
    11271127    */ 
    1128    boost::shared_ptr<COutputPin> CField::getFieldReference(CGarbageCollector& gc) 
     1128   std::shared_ptr<COutputPin> CField::getFieldReference(CGarbageCollector& gc) 
    11291129   { 
    11301130     if (instantDataFilter || field_ref.isEmpty()) 
     
    11351135     fieldRef->buildFilterGraph(gc, false); 
    11361136 
    1137      std::pair<boost::shared_ptr<CFilter>, boost::shared_ptr<CFilter> > filters; 
     1137     std::pair<std::shared_ptr<CFilter>, std::shared_ptr<CFilter> > filters; 
    11381138     // Check if a spatial transformation is needed 
    11391139     if (grid && grid != fieldRef->grid && grid->hasTransform()) 
     
    11441144     } 
    11451145     else 
    1146        filters.first = filters.second = boost::shared_ptr<CFilter>(new CPassThroughFilter(gc)); 
     1146       filters.first = filters.second = std::shared_ptr<CFilter>(new CPassThroughFilter(gc)); 
    11471147 
    11481148     fieldRef->getInstantDataFilter()->connectOutput(filters.first, 0); 
     
    11601160    * \return the output pin corresponding to a self reference 
    11611161    */ 
    1162    boost::shared_ptr<COutputPin> CField::getSelfReference(CGarbageCollector& gc) 
     1162   std::shared_ptr<COutputPin> CField::getSelfReference(CGarbageCollector& gc) 
    11631163   { 
    11641164     if (instantDataFilter || !hasExpression()) 
     
    11761176         { 
    11771177           checkTimeAttributes(); 
    1178            serverSourceFilter = boost::shared_ptr<CSourceFilter>(new CSourceFilter(gc, grid, true, freq_offset, true, 
     1178           serverSourceFilter = std::shared_ptr<CSourceFilter>(new CSourceFilter(gc, grid, true, freq_offset, true, 
    11791179                                                                                   detectMissingValues, defaultValue)); 
    11801180         } 
     
    11931193         { 
    11941194           if (check_if_active.isEmpty()) check_if_active = false; 
    1195            clientSourceFilter = boost::shared_ptr<CSourceFilter>(new CSourceFilter(gc, grid, true, NoneDu, false, 
     1195           clientSourceFilter = std::shared_ptr<CSourceFilter>(new CSourceFilter(gc, grid, true, NoneDu, false, 
    11961196                                                                                   detectMissingValues, defaultValue)); 
    11971197         } 
     
    12131213    * \return the output pin corresponding to the requested temporal filter 
    12141214    */ 
    1215    boost::shared_ptr<COutputPin> CField::getTemporalDataFilter(CGarbageCollector& gc, CDuration outFreq) 
    1216    { 
    1217      std::map<CDuration, boost::shared_ptr<COutputPin> >::iterator it = temporalDataFilters.find(outFreq); 
     1215   std::shared_ptr<COutputPin> CField::getTemporalDataFilter(CGarbageCollector& gc, CDuration outFreq) 
     1216   { 
     1217     std::map<CDuration, std::shared_ptr<COutputPin> >::iterator it = temporalDataFilters.find(outFreq); 
    12181218 
    12191219     if (it == temporalDataFilters.end()) 
     
    12261226 
    12271227       const bool detectMissingValues = (!detect_missing_value.isEmpty()  && detect_missing_value == true); 
    1228        boost::shared_ptr<CTemporalFilter> temporalFilter(new CTemporalFilter(gc, operation, 
     1228       std::shared_ptr<CTemporalFilter> temporalFilter(new CTemporalFilter(gc, operation, 
    12291229                                                                             CContext::getCurrent()->getCalendar()->getInitDate(), 
    12301230                                                                             freq_op, freq_offset, outFreq, detectMissingValues)); 
     
    12471247    */ 
    12481248    
    1249    boost::shared_ptr<COutputPin> CField::getSelfTemporalDataFilter(CGarbageCollector& gc, CDuration outFreq) 
     1249   std::shared_ptr<COutputPin> CField::getSelfTemporalDataFilter(CGarbageCollector& gc, CDuration outFreq) 
    12501250   { 
    12511251     if (instantDataFilter || !hasExpression()) 
     
    12641264 
    12651265       const bool detectMissingValues = (!detect_missing_value.isEmpty() && detect_missing_value == true); 
    1266        boost::shared_ptr<CTemporalFilter> temporalFilter(new CTemporalFilter(gc, operation, 
     1266       std::shared_ptr<CTemporalFilter> temporalFilter(new CTemporalFilter(gc, operation, 
    12671267                                                                             CContext::getCurrent()->getCalendar()->getInitDate(), 
    12681268                                                                             freq_op, freq_offset, outFreq, detectMissingValues)); 
  • XIOS/trunk/src/node/field.hpp

    r1524 r1542  
    9292         template <int N> void getData(CArray<double, N>& _data) const; 
    9393 
    94          boost::shared_ptr<COutputPin> getInstantDataFilter(); 
     94         std::shared_ptr<COutputPin> getInstantDataFilter(); 
    9595 
    9696         /// Mutateur /// 
     
    143143          
    144144          
    145          boost::shared_ptr<COutputPin> getFieldReference(CGarbageCollector& gc); 
    146          boost::shared_ptr<COutputPin> getSelfReference(CGarbageCollector& gc); 
    147          boost::shared_ptr<COutputPin> getTemporalDataFilter(CGarbageCollector& gc, CDuration outFreq); 
    148          boost::shared_ptr<COutputPin> getSelfTemporalDataFilter(CGarbageCollector& gc, CDuration outFreq); 
     145         std::shared_ptr<COutputPin> getFieldReference(CGarbageCollector& gc); 
     146         std::shared_ptr<COutputPin> getSelfReference(CGarbageCollector& gc); 
     147         std::shared_ptr<COutputPin> getTemporalDataFilter(CGarbageCollector& gc, CDuration outFreq); 
     148         std::shared_ptr<COutputPin> getSelfTemporalDataFilter(CGarbageCollector& gc, CDuration outFreq); 
    149149 
    150150//         virtual void fromBinary(StdIStream& is); 
     
    226226         bool mustAutoTrigger; 
    227227 
    228          map<int,boost::shared_ptr<func::CFunctor> > foperation_srv; 
     228         map<int,std::shared_ptr<func::CFunctor> > foperation_srv; 
    229229 
    230230         // map<int, CArray<double,1> > data_srv; 
    231231         CArray<double,1> recvDataSrv; 
    232232          
    233          boost::shared_ptr<func::CFunctor> recvFoperationSrv; 
     233         std::shared_ptr<func::CFunctor> recvFoperationSrv; 
    234234         string content; 
    235235 
     
    258258 
    259259         //! The output pin of the filter providing the instant data for the field 
    260          boost::shared_ptr<COutputPin> instantDataFilter; 
     260         std::shared_ptr<COutputPin> instantDataFilter; 
    261261         //! The output pin of the filters providing the result of the field's temporal operation 
    262          std::map<CDuration, boost::shared_ptr<COutputPin>, DurationFakeLessComparator> temporalDataFilters; 
     262         std::map<CDuration, std::shared_ptr<COutputPin>, DurationFakeLessComparator> temporalDataFilters; 
    263263         //! The output pin of the filter providing the instant data for self references 
    264          boost::shared_ptr<COutputPin> selfReferenceFilter; 
     264         std::shared_ptr<COutputPin> selfReferenceFilter; 
    265265         //! The source filter for data provided by the client 
    266          boost::shared_ptr<CSourceFilter> clientSourceFilter; 
     266         std::shared_ptr<CSourceFilter> clientSourceFilter; 
    267267         //! The source filter for data provided by the server 
    268          boost::shared_ptr<CSourceFilter> serverSourceFilter; 
     268         std::shared_ptr<CSourceFilter> serverSourceFilter; 
    269269         //! The terminal filter which stores the instant data 
    270          boost::shared_ptr<CStoreFilter> storeFilter; 
     270         std::shared_ptr<CStoreFilter> storeFilter; 
    271271         //! The terminal filter which writes the data to file 
    272          boost::shared_ptr<CFileWriterFilter> fileWriterFilter; 
     272         std::shared_ptr<CFileWriterFilter> fileWriterFilter; 
    273273         //! The terminal filter which writes data to file 
    274          boost::shared_ptr<CFileServerWriterFilter> fileServerWriterFilter; 
     274         std::shared_ptr<CFileServerWriterFilter> fileServerWriterFilter; 
    275275   }; // class CField 
    276276 
  • XIOS/trunk/src/node/file.cpp

    r1516 r1542  
    6464   \return data writer object. 
    6565   */ 
    66    boost::shared_ptr<CDataOutput> CFile::getDataOutput(void) const 
     66   std::shared_ptr<CDataOutput> CFile::getDataOutput(void) const 
    6767   { 
    6868      return data_out; 
     
    7575   \return data reader object. 
    7676   */ 
    77    boost::shared_ptr<CDataInput> CFile::getDataInput(void) const 
     77   std::shared_ptr<CDataInput> CFile::getDataInput(void) const 
    7878   { 
    7979      return data_in; 
     
    545545         if (isOpen) data_out->closeFile(); 
    546546 
    547         data_out = shared_ptr<CDataOutput>(new CNc4DataOutput(this, oss.str(), append, useClassicFormat, useCFConvention, 
     547        data_out = std::shared_ptr<CDataOutput>(new CNc4DataOutput(this, oss.str(), append, useClassicFormat, useCFConvention, 
    548548                                                              fileComm, multifile, isCollective, time_counter_name)); 
    549549        isOpen = true; 
     
    669669      bool ugridConvention = !convention.isEmpty() ? (convention == convention_attr::UGRID) : false; 
    670670      if (time_counter_name.isEmpty()) 
    671         data_in = shared_ptr<CDataInput>(new CNc4DataInput(oss.str(), readComm, multifile, isCollective, readMetaDataPar, ugridConvention)); 
     671        data_in = std::shared_ptr<CDataInput>(new CNc4DataInput(oss.str(), readComm, multifile, isCollective, readMetaDataPar, ugridConvention)); 
    672672      else 
    673         data_in = shared_ptr<CDataInput>(new CNc4DataInput(oss.str(), readComm, multifile, isCollective, readMetaDataPar, ugridConvention, time_counter_name)); 
     673        data_in = std::shared_ptr<CDataInput>(new CNc4DataInput(oss.str(), readComm, multifile, isCollective, readMetaDataPar, ugridConvention, time_counter_name)); 
    674674      isOpen = true; 
    675675    } 
  • XIOS/trunk/src/node/file.hpp

    r1494 r1542  
    7171         /// Accesseurs /// 
    7272         const StdString getFileOutputName(void) const; 
    73          boost::shared_ptr<CDataOutput> getDataOutput(void) const; 
    74          boost::shared_ptr<CDataInput> getDataInput(void) const; 
     73         std::shared_ptr<CDataOutput> getDataOutput(void) const; 
     74         std::shared_ptr<CDataInput> getDataInput(void) const; 
    7575         CFieldGroup* getVirtualFieldGroup(void) const; 
    7676         CVariableGroup* getVirtualVariableGroup(void) const; 
     
    186186         CFieldGroup* vFieldGroup; 
    187187         CVariableGroup* vVariableGroup; 
    188          boost::shared_ptr<CDataOutput> data_out; 
    189          boost::shared_ptr<CDataInput> data_in; 
     188         std::shared_ptr<CDataOutput> data_out; 
     189         std::shared_ptr<CDataInput> data_in; 
    190190         std::vector<CField*> enabledFields; 
    191191 
  • XIOS/trunk/src/node/grid.cpp

    r1397 r1542  
    783783 
    784784         // Compute mapping between client and server 
    785          std::vector<boost::unordered_map<size_t,std::vector<int> > > indexServerOnElement; 
     785         std::vector<std::unordered_map<size_t,std::vector<int> > > indexServerOnElement; 
    786786         CServerDistributionDescription serverDistributionDescription(getGlobalDimension(), client->serverSize); 
    787787         std::vector<int> serverZeroIndex = serverDistributionDescription.computeServerGlobalByElement(indexServerOnElement, 
     
    889889      \param [out] globalIndexOnServer global index of grid and its corresponding rank of server. 
    890890   */ 
    891    void CGrid::computeIndexByElement(const std::vector<boost::unordered_map<size_t,std::vector<int> > >& indexServerOnElement, 
     891   void CGrid::computeIndexByElement(const std::vector<std::unordered_map<size_t,std::vector<int> > >& indexServerOnElement, 
    892892                                     const CContextClient* client, 
    893893                                     CClientServerMapping::GlobalIndexMap& globalIndexOnServer) 
     
    942942 
    943943     std::vector<std::vector<bool> > elementOnServer(nbElement, std::vector<bool>(serverSize, false)); 
    944      std::vector<boost::unordered_map<int,std::vector<size_t> > > globalElementIndexOnServer(nbElement); 
     944     std::vector<std::unordered_map<int,std::vector<size_t> > > globalElementIndexOnServer(nbElement); 
    945945     CArray<int,1> nbIndexOnServer(serverSize); // Number of distributed global index held by each client for each server 
    946946     // Number of temporary distributed global index held by each client for each server 
     
    950950     { 
    951951       nbIndexOnServer = 0; 
    952        const boost::unordered_map<size_t,std::vector<int> >& indexServerElement = indexServerOnElement[idx]; 
     952       const std::unordered_map<size_t,std::vector<int> >& indexServerElement = indexServerOnElement[idx]; 
    953953       const CArray<size_t,1>& globalIndexElementOnClient = globalIndexElement[idx]; 
    954954       CClientClientDHTInt clientClientDHT(indexServerElement, client->intraComm); 
  • XIOS/trunk/src/node/grid.hpp

    r1422 r1542  
    288288        void checkAttributesAfterTransformation(); 
    289289        void setTransformationAlgorithms(); 
    290         void computeIndexByElement(const std::vector<boost::unordered_map<size_t,std::vector<int> > >& indexServerOnElement, 
     290        void computeIndexByElement(const std::vector<std::unordered_map<size_t,std::vector<int> > >& indexServerOnElement, 
    291291                                   const CContextClient* client, 
    292292                                   CClientServerMapping::GlobalIndexMap& globalIndexOnServer); 
  • XIOS/trunk/src/node/mesh.cpp

    r1507 r1542  
    66 
    77#include "mesh.hpp" 
     8#include <boost/functional/hash.hpp> 
     9//#include <unordered_map> 
    810 
    911namespace xios { 
     
    136138    } 
    137139 
    138  
    139 ///---------------------------------------------------------------- 
    140 /*! 
    141  * \fn size_t CMesh::nodeIndex (double lon, double lat) 
    142  * Returns its index if a node exists; otherwise adds the node and returns -1. 
    143  * Precision check is implemented with two hash values for each dimension, longitude and latitude. 
    144  * \param [in] lon Node longitude in degrees. 
    145  * \param [in] lat Node latitude in degrees ranged from 0 to 360. 
    146  * \return node index if a node exists; -1 otherwise 
    147  */ 
    148   size_t CMesh::nodeIndex (double lon, double lat) 
    149   { 
    150     double minBoundLon = 0. ; 
    151     double maxBoundLon = 360. ; 
    152     double minBoundLat = -90 ; 
    153     double maxBoundLat = 90 ; 
    154     double prec=1e-11 ; 
    155     double precLon=prec ; 
    156     double precLat=prec ; 
    157  
    158     size_t maxsize_t=numeric_limits<size_t>::max() ; 
    159     if ( (maxBoundLon-minBoundLon)/maxsize_t > precLon) precLon=(maxBoundLon-minBoundLon)/maxsize_t ; 
    160     if ( (maxBoundLat-minBoundLat)/maxsize_t > precLat) precLat=(maxBoundLat-minBoundLat)/maxsize_t ; 
    161  
    162     size_t iMinLon=0 ; 
    163     size_t iMaxLon=(maxBoundLon-minBoundLon)/precLon ; 
    164     size_t iMinLat=0 ; 
    165     size_t iMaxLat=(maxBoundLat-minBoundLat)/precLat ; 
    166  
    167     size_t hash0,hash1,hash2,hash3 ; 
    168     size_t lon0,lon1,lat0,lat1 ; 
    169  
    170     lon0=(lon-minBoundLon)/precLon ; 
    171     if ( ((lon0+1)*precLon + lon0*precLon)/2 > lon-minBoundLon) 
    172     { 
    173       if (lon0==iMinLon) lon1=iMaxLon ; 
    174       else lon1=lon0-1 ; 
    175     } 
    176     else 
    177     { 
    178       if (lon0==iMaxLon) lon1=iMinLon ; 
    179       else lon1=lon0+1 ; 
    180     } 
    181  
    182     lat0=(lat-minBoundLat)/precLat ; 
    183     if ( ((lat0+1)*precLat + lat0*precLat)/2 > lat-minBoundLat) 
    184     { 
    185       if (lat0==iMinLat) lat1=lat0 ; 
    186       else lat1=lat0-1 ; 
    187     } 
    188     else 
    189     { 
    190       if (lat0==iMaxLat) lat1=lat0 ; 
    191       else lat1=lat0+1 ; 
    192     } 
    193  
    194     hash0=hashPair(lon0,lat0) ; 
    195     hash1=hashPair(lon0,lat1) ; 
    196     hash2=hashPair(lon1,lat0) ; 
    197     hash3=hashPair(lon1,lat1) ; 
    198  
    199     boost::unordered_map<size_t, size_t>::iterator end = hashed_map_nodes.end() ; 
    200     size_t mapSize = hashed_map_nodes.size(); 
    201     if (hashed_map_nodes.find(hash0)==end && hashed_map_nodes.find(hash1)==end && hashed_map_nodes.find(hash2)==end && hashed_map_nodes.find(hash3)==end) 
    202     { 
    203       hashed_map_nodes[hash0] = mapSize ; 
    204       hashed_map_nodes[hash1] = mapSize + 1; 
    205       hashed_map_nodes[hash2] = mapSize + 2; 
    206       hashed_map_nodes[hash3] = mapSize + 3; 
    207       return -1; 
    208     } 
    209     else 
    210       return ( (hashed_map_nodes[hash0]+1) / 4 ); 
    211  
    212   } // nodeIndex() 
    213  
    214140///---------------------------------------------------------------- 
    215141/*! 
     
    298224 * \param [in] bounds_lat Array of boundary latitudes. Its size depends on the element type. 
    299225 */ 
    300   void CMesh::createMesh(const CArray<double, 1>& lonvalue, const CArray<double, 1>& latvalue, 
    301             const CArray<double, 2>& bounds_lon, const CArray<double, 2>& bounds_lat) 
    302   { 
    303     int nvertex = (bounds_lon.numElements() == 0) ? 1 : bounds_lon.rows(); 
    304  
    305     if (nvertex == 1) 
    306     { 
    307       nbNodes_ = lonvalue.numElements(); 
    308       node_lon.resizeAndPreserve(nbNodes_); 
    309       node_lat.resizeAndPreserve(nbNodes_); 
    310       for (int nn = 0; nn < nbNodes_; ++nn) 
    311       { 
    312         if (map_nodes.find(make_pair (lonvalue(nn), latvalue(nn))) == map_nodes.end()) 
    313         { 
    314           map_nodes[make_pair (lonvalue(nn), latvalue(nn))] = nn ; 
    315           node_lon(nn) = lonvalue(nn); 
    316           node_lat(nn) = latvalue(nn); 
    317         } 
    318       } 
    319     } 
    320     else if (nvertex == 2) 
    321     { 
    322       nbEdges_ = bounds_lon.shape()[1]; 
    323  
    324       // Create nodes and edge_node connectivity 
    325       node_lon.resizeAndPreserve(nbEdges_*nvertex); // Max possible number of nodes 
    326       node_lat.resizeAndPreserve(nbEdges_*nvertex); 
    327       edge_nodes.resizeAndPreserve(nvertex, nbEdges_); 
    328  
    329       for (int ne = 0; ne < nbEdges_; ++ne) 
    330       { 
    331         for (int nv = 0; nv < nvertex; ++nv) 
    332         { 
    333           if (map_nodes.find(make_pair (bounds_lon(nv, ne), bounds_lat(nv ,ne))) == map_nodes.end()) 
    334           { 
    335             map_nodes[make_pair (bounds_lon(nv, ne), bounds_lat(nv, ne))] = nbNodes_ ; 
    336             edge_nodes(nv,ne) = nbNodes_ ; 
    337             node_lon(nbNodes_) = bounds_lon(nv, ne); 
    338             node_lat(nbNodes_) = bounds_lat(nv, ne); 
    339             ++nbNodes_ ; 
    340           } 
    341           else 
    342             edge_nodes(nv,ne) = map_nodes[make_pair (bounds_lon(nv, ne), bounds_lat(nv ,ne))]; 
    343         } 
    344       } 
    345       node_lon.resizeAndPreserve(nbNodes_); 
    346       node_lat.resizeAndPreserve(nbNodes_); 
    347  
    348       // Create edges 
    349       edge_lon.resizeAndPreserve(nbEdges_); 
    350       edge_lat.resizeAndPreserve(nbEdges_); 
    351  
    352       for (int ne = 0; ne < nbEdges_; ++ne) 
    353       { 
    354         if (map_edges.find(make_ordered_pair (edge_nodes(0,ne), edge_nodes(1,ne))) == map_edges.end()) 
    355         { 
    356           map_edges[make_ordered_pair ( edge_nodes(0,ne), edge_nodes(1,ne) )] = ne ; 
    357           edge_lon(ne) = lonvalue(ne); 
    358           edge_lat(ne) = latvalue(ne); 
    359         } 
    360  
    361       } 
    362       edgesAreWritten = true; 
    363     } 
    364     else 
    365     { 
    366       nbFaces_ = bounds_lon.shape()[1]; 
    367    
    368       // Create nodes and face_node connectivity 
    369       node_lon.resizeAndPreserve(nbFaces_*nvertex);  // Max possible number of nodes 
    370       node_lat.resizeAndPreserve(nbFaces_*nvertex); 
    371       face_nodes.resize(nvertex, nbFaces_); 
    372    
    373       for (int nf = 0; nf < nbFaces_; ++nf) 
    374       { 
    375         for (int nv = 0; nv < nvertex; ++nv) 
    376         { 
    377           if (map_nodes.find(make_pair (bounds_lon(nv, nf), bounds_lat(nv ,nf))) == map_nodes.end()) 
    378           { 
    379             map_nodes[make_pair (bounds_lon(nv, nf), bounds_lat(nv, nf))] = nbNodes_ ; 
    380             face_nodes(nv,nf) = nbNodes_ ; 
    381             node_lon(nbNodes_) = bounds_lon(nv, nf); 
    382             node_lat(nbNodes_) = bounds_lat(nv ,nf); 
    383             ++nbNodes_ ; 
    384           } 
    385           else 
    386           { 
    387             face_nodes(nv,nf) = map_nodes[make_pair (bounds_lon(nv, nf), bounds_lat(nv ,nf))]; 
    388           } 
    389         } 
    390       } 
    391       node_lon.resizeAndPreserve(nbNodes_); 
    392       node_lat.resizeAndPreserve(nbNodes_); 
    393    
    394       // Create edges and edge_nodes connectivity 
    395       edge_lon.resizeAndPreserve(nbFaces_*nvertex); // Max possible number of edges 
    396       edge_lat.resizeAndPreserve(nbFaces_*nvertex); 
    397       edge_nodes.resizeAndPreserve(2, nbFaces_*nvertex); 
    398       edge_faces.resize(2, nbFaces_*nvertex); 
    399       face_edges.resize(nvertex, nbFaces_); 
    400       face_faces.resize(nvertex, nbFaces_); 
    401  
    402       vector<int> countEdges(nbFaces_*nvertex);   // needed in case if edges have been already generated 
    403       vector<int> countFaces(nbFaces_); 
    404       countEdges.assign(nbFaces_*nvertex, 0); 
    405       countFaces.assign(nbFaces_, 0); 
    406       int edge; 
    407       for (int nf = 0; nf < nbFaces_; ++nf) 
    408       { 
    409         for (int nv1 = 0; nv1 < nvertex; ++nv1) 
    410         { 
    411           int nv = 0; 
    412           int nv2 = (nv1 < nvertex -1 ) ? (nv1 + 1) : (nv1 + 1 - nvertex); // cyclic rotation 
    413           if (map_edges.find(make_ordered_pair (face_nodes(nv1,nf), face_nodes(nv2,nf))) == map_edges.end()) 
    414           { 
    415             map_edges[make_ordered_pair (face_nodes(nv1,nf), face_nodes(nv2,nf))] = nbEdges_ ; 
    416             face_edges(nv1,nf) = map_edges[make_ordered_pair (face_nodes(nv1,nf), face_nodes(nv2,nf))]; 
    417             edge_faces(0,nbEdges_) = nf; 
    418             edge_faces(1,nbEdges_) = -999; 
    419             face_faces(nv1,nf) = 999999; 
    420             edge_nodes(Range::all(),nbEdges_) = face_nodes(nv1,nf), face_nodes(nv2,nf); 
    421             edge_lon(nbEdges_) = ( abs( node_lon(face_nodes(nv1,nf)) - node_lon(face_nodes(nv2,nf))) < 180.) ? 
    422                         (( node_lon(face_nodes(nv1,nf)) + node_lon(face_nodes(nv2,nf))) * 0.5) : 
    423                         (( node_lon(face_nodes(nv1,nf)) + node_lon(face_nodes(nv2,nf))) * 0.5 -180.); 
    424             edge_lat(nbEdges_) = ( node_lat(face_nodes(nv1,nf)) + node_lat(face_nodes(nv2,nf)) ) * 0.5; 
    425             ++nbEdges_; 
    426           } 
    427           else 
    428           { 
    429             edge = map_edges[make_ordered_pair (face_nodes(nv1,nf), face_nodes(nv2,nf))]; 
    430             face_edges(nv1,nf) = edge; 
    431             if (edgesAreWritten) 
    432             { 
    433               edge_faces(countEdges[edge], edge) = nf; 
    434               if (countEdges[edge]==0) 
    435               { 
    436                 face_faces(nv1,nf) = 999999; 
    437               } 
    438               else 
    439               { 
    440                 int face1 = nf; // = edge_faces(1,edge) 
    441                 int face2 = edge_faces(0,edge); 
    442                 face_faces(countFaces[face1], face1) =  face2; 
    443                 face_faces(countFaces[face2], face2) =  face1; 
    444                 ++(countFaces[face1]); 
    445                 ++(countFaces[face2]); 
    446               } 
    447             } 
    448             else 
    449             { 
    450               edge_faces(1,edge) = nf; 
    451               int face1 = nf; // = edge_faces(1,edge) 
    452               int face2 = edge_faces(0,edge); 
    453               face_faces(countFaces[face1], face1) =  face2; 
    454               face_faces(countFaces[face2], face2) =  face1; 
    455               ++(countFaces[face1]); 
    456               ++(countFaces[face2]); 
    457             } 
    458             ++(countEdges[edge]); 
    459           } 
    460         } 
    461       } 
    462       edge_nodes.resizeAndPreserve(2, nbEdges_); 
    463       edge_faces.resizeAndPreserve(2, nbEdges_); 
    464       edge_lon.resizeAndPreserve(nbEdges_); 
    465       edge_lat.resizeAndPreserve(nbEdges_); 
    466  
    467       // Create faces 
    468       face_lon.resize(nbFaces_); 
    469       face_lat.resize(nbFaces_); 
    470       face_lon = lonvalue; 
    471       face_lat = latvalue; 
    472       facesAreWritten = true; 
    473  
    474     } // nvertex > 2 
    475      
    476   } // createMesh() 
     226//  void CMesh::createMesh(const CArray<double, 1>& lonvalue, const CArray<double, 1>& latvalue, 
     227//            const CArray<double, 2>& bounds_lon, const CArray<double, 2>& bounds_lat) 
     228//  { 
     229//    int nvertex = (bounds_lon.numElements() == 0) ? 1 : bounds_lon.rows(); 
     230// 
     231//    if (nvertex == 1) 
     232//    { 
     233//      nbNodes_ = lonvalue.numElements(); 
     234//      node_lon.resizeAndPreserve(nbNodes_); 
     235//      node_lat.resizeAndPreserve(nbNodes_); 
     236//      for (int nn = 0; nn < nbNodes_; ++nn) 
     237//      { 
     238//        if (map_nodes.find(make_pair (lonvalue(nn), latvalue(nn))) == map_nodes.end()) 
     239//        { 
     240//          map_nodes[make_pair (lonvalue(nn), latvalue(nn))] = nn ; 
     241//          node_lon(nn) = lonvalue(nn); 
     242//          node_lat(nn) = latvalue(nn); 
     243//        } 
     244//      } 
     245//    } 
     246//    else if (nvertex == 2) 
     247//    { 
     248//      nbEdges_ = bounds_lon.shape()[1]; 
     249// 
     250//      // Create nodes and edge_node connectivity 
     251//      node_lon.resizeAndPreserve(nbEdges_*nvertex); // Max possible number of nodes 
     252//      node_lat.resizeAndPreserve(nbEdges_*nvertex); 
     253//      edge_nodes.resizeAndPreserve(nvertex, nbEdges_); 
     254// 
     255//      for (int ne = 0; ne < nbEdges_; ++ne) 
     256//      { 
     257//        for (int nv = 0; nv < nvertex; ++nv) 
     258//        { 
     259//          if (map_nodes.find(make_pair (bounds_lon(nv, ne), bounds_lat(nv ,ne))) == map_nodes.end()) 
     260//          { 
     261//            map_nodes[make_pair (bounds_lon(nv, ne), bounds_lat(nv, ne))] = nbNodes_ ; 
     262//            edge_nodes(nv,ne) = nbNodes_ ; 
     263//            node_lon(nbNodes_) = bounds_lon(nv, ne); 
     264//            node_lat(nbNodes_) = bounds_lat(nv, ne); 
     265//            ++nbNodes_ ; 
     266//          } 
     267//          else 
     268//            edge_nodes(nv,ne) = map_nodes[make_pair (bounds_lon(nv, ne), bounds_lat(nv ,ne))]; 
     269//        } 
     270//      } 
     271//      node_lon.resizeAndPreserve(nbNodes_); 
     272//      node_lat.resizeAndPreserve(nbNodes_); 
     273// 
     274//      // Create edges 
     275//      edge_lon.resizeAndPreserve(nbEdges_); 
     276//      edge_lat.resizeAndPreserve(nbEdges_); 
     277// 
     278//      for (int ne = 0; ne < nbEdges_; ++ne) 
     279//      { 
     280//        if (map_edges.find(make_ordered_pair (edge_nodes(0,ne), edge_nodes(1,ne))) == map_edges.end()) 
     281//        { 
     282//          map_edges[make_ordered_pair ( edge_nodes(0,ne), edge_nodes(1,ne) )] = ne ; 
     283//          edge_lon(ne) = lonvalue(ne); 
     284//          edge_lat(ne) = latvalue(ne); 
     285//        } 
     286// 
     287//      } 
     288//      edgesAreWritten = true; 
     289//    } 
     290//    else 
     291//    { 
     292//      nbFaces_ = bounds_lon.shape()[1]; 
     293// 
     294//      // Create nodes and face_node connectivity 
     295//      node_lon.resizeAndPreserve(nbFaces_*nvertex);  // Max possible number of nodes 
     296//      node_lat.resizeAndPreserve(nbFaces_*nvertex); 
     297//      face_nodes.resize(nvertex, nbFaces_); 
     298// 
     299//      for (int nf = 0; nf < nbFaces_; ++nf) 
     300//      { 
     301//        for (int nv = 0; nv < nvertex; ++nv) 
     302//        { 
     303//          if (map_nodes.find(make_pair (bounds_lon(nv, nf), bounds_lat(nv ,nf))) == map_nodes.end()) 
     304//          { 
     305//            map_nodes[make_pair (bounds_lon(nv, nf), bounds_lat(nv, nf))] = nbNodes_ ; 
     306//            face_nodes(nv,nf) = nbNodes_ ; 
     307//            node_lon(nbNodes_) = bounds_lon(nv, nf); 
     308//            node_lat(nbNodes_) = bounds_lat(nv ,nf); 
     309//            ++nbNodes_ ; 
     310//          } 
     311//          else 
     312//          { 
     313//            face_nodes(nv,nf) = map_nodes[make_pair (bounds_lon(nv, nf), bounds_lat(nv ,nf))]; 
     314//          } 
     315//        } 
     316//      } 
     317//      node_lon.resizeAndPreserve(nbNodes_); 
     318//      node_lat.resizeAndPreserve(nbNodes_); 
     319// 
     320//      // Create edges and edge_nodes connectivity 
     321//      edge_lon.resizeAndPreserve(nbFaces_*nvertex); // Max possible number of edges 
     322//      edge_lat.resizeAndPreserve(nbFaces_*nvertex); 
     323//      edge_nodes.resizeAndPreserve(2, nbFaces_*nvertex); 
     324//      edge_faces.resize(2, nbFaces_*nvertex); 
     325//      face_edges.resize(nvertex, nbFaces_); 
     326//      face_faces.resize(nvertex, nbFaces_); 
     327// 
     328//      vector<int> countEdges(nbFaces_*nvertex);   // needed in case if edges have been already generated 
     329//      vector<int> countFaces(nbFaces_); 
     330//      countEdges.assign(nbFaces_*nvertex, 0); 
     331//      countFaces.assign(nbFaces_, 0); 
     332//      int edge; 
     333//      for (int nf = 0; nf < nbFaces_; ++nf) 
     334//      { 
     335//        for (int nv1 = 0; nv1 < nvertex; ++nv1) 
     336//        { 
     337//          int nv = 0; 
     338//          int nv2 = (nv1 < nvertex -1 ) ? (nv1 + 1) : (nv1 + 1 - nvertex); // cyclic rotation 
     339//          if (map_edges.find(make_ordered_pair (face_nodes(nv1,nf), face_nodes(nv2,nf))) == map_edges.end()) 
     340//          { 
     341//            map_edges[make_ordered_pair (face_nodes(nv1,nf), face_nodes(nv2,nf))] = nbEdges_ ; 
     342//            face_edges(nv1,nf) = map_edges[make_ordered_pair (face_nodes(nv1,nf), face_nodes(nv2,nf))]; 
     343//            edge_faces(0,nbEdges_) = nf; 
     344//            edge_faces(1,nbEdges_) = -999; 
     345//            face_faces(nv1,nf) = 999999; 
     346//            edge_nodes(Range::all(),nbEdges_) = face_nodes(nv1,nf), face_nodes(nv2,nf); 
     347//            edge_lon(nbEdges_) = ( abs( node_lon(face_nodes(nv1,nf)) - node_lon(face_nodes(nv2,nf))) < 180.) ? 
     348//                        (( node_lon(face_nodes(nv1,nf)) + node_lon(face_nodes(nv2,nf))) * 0.5) : 
     349//                        (( node_lon(face_nodes(nv1,nf)) + node_lon(face_nodes(nv2,nf))) * 0.5 -180.); 
     350//            edge_lat(nbEdges_) = ( node_lat(face_nodes(nv1,nf)) + node_lat(face_nodes(nv2,nf)) ) * 0.5; 
     351//            ++nbEdges_; 
     352//          } 
     353//          else 
     354//          { 
     355//            edge = map_edges[make_ordered_pair (face_nodes(nv1,nf), face_nodes(nv2,nf))]; 
     356//            face_edges(nv1,nf) = edge; 
     357//            if (edgesAreWritten) 
     358//            { 
     359//              edge_faces(countEdges[edge], edge) = nf; 
     360//              if (countEdges[edge]==0) 
     361//              { 
     362//                face_faces(nv1,nf) = 999999; 
     363//              } 
     364//              else 
     365//              { 
     366//                int face1 = nf; // = edge_faces(1,edge) 
     367//                int face2 = edge_faces(0,edge); 
     368//                face_faces(countFaces[face1], face1) =  face2; 
     369//                face_faces(countFaces[face2], face2) =  face1; 
     370//                ++(countFaces[face1]); 
     371//                ++(countFaces[face2]); 
     372//              } 
     373//            } 
     374//            else 
     375//            { 
     376//              edge_faces(1,edge) = nf; 
     377//              int face1 = nf; // = edge_faces(1,edge) 
     378//              int face2 = edge_faces(0,edge); 
     379//              face_faces(countFaces[face1], face1) =  face2; 
     380//              face_faces(countFaces[face2], face2) =  face1; 
     381//              ++(countFaces[face1]); 
     382//              ++(countFaces[face2]); 
     383//            } 
     384//            ++(countEdges[edge]); 
     385//          } 
     386//        } 
     387//      } 
     388//      edge_nodes.resizeAndPreserve(2, nbEdges_); 
     389//      edge_faces.resizeAndPreserve(2, nbEdges_); 
     390//      edge_lon.resizeAndPreserve(nbEdges_); 
     391//      edge_lat.resizeAndPreserve(nbEdges_); 
     392// 
     393//      // Create faces 
     394//      face_lon.resize(nbFaces_); 
     395//      face_lat.resize(nbFaces_); 
     396//      face_lon = lonvalue; 
     397//      face_lat = latvalue; 
     398//      facesAreWritten = true; 
     399// 
     400//    } // nvertex > 2 
     401// 
     402//  } // createMesh() 
    477403 
    478404///---------------------------------------------------------------- 
     
    20882014 
    20892015    // faceToFaces connectivity 
    2090     boost::unordered_map <int, int> mapFaces;  // mapFaces = < hash(face1, face2), hash> (the mapped value is irrelevant) 
     2016    std::unordered_map <int, int> mapFaces;  // mapFaces = < hash(face1, face2), hash> (the mapped value is irrelevant) 
    20912017    int maxNb = 20;                            // some assumption on the max possible number of neighboring cells 
    20922018    faceToFaces.resize(maxNb, nbFaces); 
     
    21452071    CArray<double, 2> faceToNodes (nvertex, nbFaces); 
    21462072 
    2147     boost::unordered_map <pair<double,double>, int> mapNodes; 
     2073    std::unordered_map <pairDouble, int, boost::hash<pairDouble> > mapNodes; 
    21482074 
    21492075    for (int nf = 0; nf < nbFaces; ++nf) 
     
    21612087 
    21622088    // faceToFaces connectivity 
    2163     boost::unordered_map <pair<int,int>, int> mapEdges; 
     2089    std::unordered_map <pairInt, int, boost::hash<pairInt> > mapEdges; 
    21642090    faceToFaces.resize(nvertex, nbFaces); 
    21652091    CArray<int, 2> edgeToFaces(2, nbFaces*nvertex); // max possible 
  • XIOS/trunk/src/node/mesh.hpp

    r931 r1542  
    7676    private: 
    7777 
     78      typedef std::pair<double, double> pairDouble; 
     79      typedef std::pair<int, int> pairInt; 
     80 
    7881      int nbNodes_; 
    7982      int nbEdges_; 
     
    9194      vector<size_t> createHashes (const double, const double); 
    9295 
    93       size_t nodeIndex (double, double);                           // redundant in parallel version with epsilon precision 
    94       boost::unordered_map <size_t, size_t> hashed_map_nodes;      // redundant in parallel version with epsilon precision 
    95       boost::unordered_map <pair<double,double>, int> map_nodes;   // redundant in parallel version with epsilon precision 
    96       boost::unordered_map <pair<int,int>, int> map_edges;         // redundant in parallel version with epsilon precision 
    97  
    9896  };  
    9997 
  • XIOS/trunk/src/object_factory.hpp

    r769 r1542  
    22#define __XIOS_CObjectFactory__ 
    33 
    4 /// boost headers /// 
    5 #include <boost/shared_ptr.hpp> 
     4#include <memory> 
    65 
    76/// XIOS headers /// 
     
    2423 
    2524         template <typename U> 
    26             static  boost::shared_ptr<U> GetObject(const StdString & id); 
     25            static  std::shared_ptr<U> GetObject(const StdString & id); 
    2726 
    2827         template <typename U> 
    29             static  boost::shared_ptr<U> GetObject(const StdString& context,const StdString & id); 
     28            static  std::shared_ptr<U> GetObject(const StdString& context,const StdString & id); 
    3029 
    3130         template <typename U> 
    32             static  boost::shared_ptr<U> GetObject(const U * const object); 
     31            static  std::shared_ptr<U> GetObject(const U * const object); 
    3332 
    3433         template <typename U> 
     
    3837 
    3938         template <typename U> 
    40             static  const std::vector<boost::shared_ptr<U> > & 
     39            static  const std::vector<std::shared_ptr<U> > & 
    4140               GetObjectVector(const StdString & context = CObjectFactory::GetCurrentContextId()); 
    4241 
     
    5049         /// Instanciateur /// 
    5150         template <typename U> 
    52             static  boost::shared_ptr<U> CreateObject(const StdString & id = StdString("")); 
     51            static  std::shared_ptr<U> CreateObject(const StdString & id = StdString("")); 
    5352 
    5453         template <typename U> static const StdString& GetUIdBase(void); 
  • XIOS/trunk/src/object_factory_decl.cpp

    r1457 r1542  
    55{ 
    66#define macro(U) \ 
    7   template shared_ptr<U> CObjectFactory::GetObject<U>(const StdString& id);  \ 
    8   template shared_ptr<U> CObjectFactory::GetObject<U>(const StdString& context,const StdString& id); \ 
    9   template shared_ptr<U> CObjectFactory::GetObject<U>(const U* const object); \ 
     7  template std::shared_ptr<U> CObjectFactory::GetObject<U>(const StdString& id);  \ 
     8  template std::shared_ptr<U> CObjectFactory::GetObject<U>(const StdString& context,const StdString& id); \ 
     9  template std::shared_ptr<U> CObjectFactory::GetObject<U>(const U* const object); \ 
    1010  template int CObjectFactory::GetObjectNum<U>(void); \ 
    1111  template int CObjectFactory::GetObjectIdNum<U>(void); \ 
    12   template const std::vector<shared_ptr<U> >& CObjectFactory::GetObjectVector<U>(const StdString& context ); \ 
     12  template const std::vector<std::shared_ptr<U> >& CObjectFactory::GetObjectVector<U>(const StdString& context ); \ 
    1313  template bool CObjectFactory::HasObject<U>(const StdString& id); \ 
    1414  template bool CObjectFactory::HasObject<U>(const StdString& context,const StdString& id); \ 
    15   template boost::shared_ptr<U> CObjectFactory::CreateObject<U>(const StdString& id ); \ 
     15  template std::shared_ptr<U> CObjectFactory::CreateObject<U>(const StdString& id ); \ 
    1616  template const StdString& CObjectFactory::GetUIdBase<U>(void); \ 
    1717  template StdString CObjectFactory::GenUId<U>(void); \ 
  • XIOS/trunk/src/object_factory_impl.hpp

    r769 r1542  
    4343 
    4444   template <typename U> 
    45       boost::shared_ptr<U> CObjectFactory::GetObject(const U * const object) 
     45      std::shared_ptr<U> CObjectFactory::GetObject(const U * const object) 
    4646   { 
    4747      if (CurrContext.size() == 0) 
    4848         ERROR("CObjectFactory::GetObject(const U * const object)", 
    4949               << "please define current context id !"); 
    50       std::vector<boost::shared_ptr<U> > & vect = 
     50      std::vector<std::shared_ptr<U> > & vect = 
    5151                     U::AllVectObj[CObjectFactory::CurrContext]; 
    5252 
    53       typename std::vector<boost::shared_ptr<U> >::const_iterator 
     53      typename std::vector<std::shared_ptr<U> >::const_iterator 
    5454         it = vect.begin(), end = vect.end(); 
    5555 
    5656      for (; it != end; it++) 
    5757      { 
    58          boost::shared_ptr<U> ptr = *it; 
     58         std::shared_ptr<U> ptr = *it; 
    5959         if (ptr.get() == object) 
    6060            return (ptr); 
     
    6464               << "[type = " << U::GetName() << ", adress = " << object << "] " 
    6565               << "object was not found."); 
    66       return (boost::shared_ptr<U>()); // jamais atteint 
     66      return (std::shared_ptr<U>()); // jamais atteint 
    6767   } 
    6868 
    6969   template <typename U> 
    70       boost::shared_ptr<U> CObjectFactory::GetObject(const StdString & id) 
     70      std::shared_ptr<U> CObjectFactory::GetObject(const StdString & id) 
    7171   { 
    7272      if (CurrContext.size() == 0) 
     
    8181 
    8282   template <typename U> 
    83       boost::shared_ptr<U> CObjectFactory::GetObject(const StdString & context, const StdString & id) 
     83      std::shared_ptr<U> CObjectFactory::GetObject(const StdString & context, const StdString & id) 
    8484   { 
    8585      if (!CObjectFactory::HasObject<U>(context,id)) 
     
    9191 
    9292   template <typename U> 
    93    boost::shared_ptr<U> CObjectFactory::CreateObject(const StdString& id) 
     93   std::shared_ptr<U> CObjectFactory::CreateObject(const StdString& id) 
    9494   { 
    9595      if (CurrContext.empty()) 
     
    103103      else 
    104104      { 
    105          boost::shared_ptr<U> value(new U(id.empty() ? CObjectFactory::GenUId<U>() : id)); 
     105         std::shared_ptr<U> value(new U(id.empty() ? CObjectFactory::GenUId<U>() : id)); 
    106106 
    107107         U::AllVectObj[CObjectFactory::CurrContext].insert(U::AllVectObj[CObjectFactory::CurrContext].end(), value); 
     
    113113 
    114114   template <typename U> 
    115       const std::vector<boost::shared_ptr<U> > & 
     115      const std::vector<std::shared_ptr<U> > & 
    116116         CObjectFactory::GetObjectVector(const StdString & context) 
    117117   { 
  • XIOS/trunk/src/object_template.hpp

    r1330 r1542  
    7171 
    7272         /// Accesseur statique /// 
    73          static std::vector<boost::shared_ptr<DerivedType> > & 
     73         static std::vector<std::shared_ptr<DerivedType> > & 
    7474            GetAllVectobject(const StdString & contextId); 
    7575 
     
    8383         static T* get(const string& contextId, const string& id) ; 
    8484         T* get(void) ; 
    85          shared_ptr<T> getShared(void) ; 
    86          static shared_ptr<T> getShared(const T* ptr) ; 
     85         std::shared_ptr<T> getShared(void) ; 
     86         static std::shared_ptr<T> getShared(const T* ptr) ; 
    8787 
    8888         static T* create(const string& id=string("")) ; 
     
    108108         static xios_map<StdString, 
    109109                xios_map<StdString, 
    110                 boost::shared_ptr<DerivedType> > > AllMapObj; 
     110                std::shared_ptr<DerivedType> > > AllMapObj; 
    111111         static xios_map<StdString, 
    112                 std::vector<boost::shared_ptr<DerivedType> > > AllVectObj; 
     112                std::vector<std::shared_ptr<DerivedType> > > AllVectObj; 
    113113 
    114114         static xios_map< StdString, long int > GenId ; 
  • XIOS/trunk/src/object_template_impl.hpp

    r1330 r1542  
    2424      xios_map<StdString, 
    2525      xios_map<StdString, 
    26       boost::shared_ptr<T> > > CObjectTemplate<T>::AllMapObj; 
     26      std::shared_ptr<T> > > CObjectTemplate<T>::AllMapObj; 
    2727 
    2828   template <class T> 
    2929      xios_map<StdString, 
    30       std::vector<boost::shared_ptr<T> > > CObjectTemplate<T>::AllVectObj; 
     30      std::vector<std::shared_ptr<T> > > CObjectTemplate<T>::AllVectObj; 
    3131 
    3232   template <class T> 
     
    6363 
    6464   template <class T> 
    65       std::vector<boost::shared_ptr<T> > & 
     65      std::vector<std::shared_ptr<T> > & 
    6666         CObjectTemplate<T>::GetAllVectobject(const StdString & contextId) 
    6767   { 
     
    412412 
    413413   template <typename T> 
    414    shared_ptr<T> CObjectTemplate<T>::getShared(const T* ptr) 
     414   std::shared_ptr<T> CObjectTemplate<T>::getShared(const T* ptr) 
    415415   { 
    416416     return CObjectFactory::GetObject<T>(ptr); 
     
    418418 
    419419   template <typename T> 
    420    shared_ptr<T> CObjectTemplate<T>::getShared(void) 
     420   std::shared_ptr<T> CObjectTemplate<T>::getShared(void) 
    421421   { 
    422422     return CObjectFactory::GetObject<T>((T*)this); 
     
    426426   const vector<T*> CObjectTemplate<T>::getAll() 
    427427   { 
    428      const vector< shared_ptr<T> >& shared_vect= CObjectFactory::GetObjectVector<T>(); 
     428     const vector< std::shared_ptr<T> >& shared_vect= CObjectFactory::GetObjectVector<T>(); 
    429429     vector<T*> vect; 
    430430 
    431      typename vector<shared_ptr<T> >::const_iterator it; 
     431     typename vector<std::shared_ptr<T> >::const_iterator it; 
    432432     for(it=shared_vect.begin();it!=shared_vect.end();++it) vect.push_back(it->get()); 
    433433     return vect; 
     
    437437   const vector<T*> CObjectTemplate<T>::getAll(const string & id) 
    438438   { 
    439      const vector< shared_ptr<T> >& shared_vect= CObjectFactory::GetObjectVector<T>(id); 
     439     const vector< std::shared_ptr<T> >& shared_vect= CObjectFactory::GetObjectVector<T>(id); 
    440440     vector<T*> vect; 
    441441 
    442      typename vector<shared_ptr<T> >::const_iterator it; 
     442     typename vector<std::shared_ptr<T> >::const_iterator it; 
    443443     for(it=shared_vect.begin();it!=shared_vect.end();++it) vect.push_back(it->get()); 
    444444     return vect; 
     
    475475     oss << iendl; 
    476476     oss << "#include <boost/multi_array.hpp>" << iendl; 
    477      oss << "#include <boost/shared_ptr.hpp>" << iendl; 
     477     oss << "#include <boostXXX/shared_ptr.hpp>" << iendl; 
    478478     oss << "#include \"xios.hpp\"" << iendl; 
    479479     oss << "#include \"attribute_template.hpp\"" << iendl; 
  • XIOS/trunk/src/parse_expr/filter_expr_node.cpp

    r1158 r1542  
    1111  { /* Nothing to do */ } 
    1212 
    13   boost::shared_ptr<COutputPin> CFilterFieldExprNode::reduce(CGarbageCollector& gc, CField& thisField) const 
    14   { 
    15     boost::shared_ptr<COutputPin> outputPin; 
     13  std::shared_ptr<COutputPin> CFilterFieldExprNode::reduce(CGarbageCollector& gc, CField& thisField) const 
     14  { 
     15    std::shared_ptr<COutputPin> outputPin; 
    1616 
    1717    if (fieldId == "this") 
     
    2121      CField* field = CField::get(fieldId); 
    2222      if (field == &thisField) 
    23         ERROR("boost::shared_ptr<COutputPin> CFilterFieldExprNode::reduce(CGarbageCollector& gc, CField& thisField) const", 
     23        ERROR("std::shared_ptr<COutputPin> CFilterFieldExprNode::reduce(CGarbageCollector& gc, CField& thisField) const", 
    2424              << "The field " << fieldId << " has an invalid reference to itself. " 
    2525              << "Use the keyword \"this\" if you want to reference the input data sent to this field."); 
     
    2929    } 
    3030    else 
    31       ERROR("boost::shared_ptr<COutputPin> CFilterFieldExprNode::reduce(CGarbageCollector& gc, CField& thisField) const", 
     31      ERROR("std::shared_ptr<COutputPin> CFilterFieldExprNode::reduce(CGarbageCollector& gc, CField& thisField) const", 
    3232            << "The field " << fieldId << " does not exist."); 
    3333 
     
    3939  { /* Nothing to do */ } 
    4040 
    41   boost::shared_ptr<COutputPin> CFilterTemporalFieldExprNode::reduce(CGarbageCollector& gc, CField& thisField) const 
    42   { 
    43     boost::shared_ptr<COutputPin> outputPin; 
     41  std::shared_ptr<COutputPin> CFilterTemporalFieldExprNode::reduce(CGarbageCollector& gc, CField& thisField) const 
     42  { 
     43    std::shared_ptr<COutputPin> outputPin; 
    4444 
    4545    if (fieldId == "this") 
     
    4949      CField* field = CField::get(fieldId); 
    5050      if (field == &thisField) 
    51         ERROR("boost::shared_ptr<COutputPin> CFilterTemporalFieldExprNode::reduce(CGarbageCollector& gc, CField& thisField) const", 
     51        ERROR("std::shared_ptr<COutputPin> CFilterTemporalFieldExprNode::reduce(CGarbageCollector& gc, CField& thisField) const", 
    5252              << "The field " << fieldId << " has an invalid reference to itself. " 
    5353              << "Use the keyword \"this\" if you want to reference the input data sent to this field."); 
     
    5757    } 
    5858    else 
    59       ERROR("boost::shared_ptr<COutputPin> CFilterTemporalFieldExprNode::reduce(CGarbageCollector& gc, CField& thisField) const", 
     59      ERROR("std::shared_ptr<COutputPin> CFilterTemporalFieldExprNode::reduce(CGarbageCollector& gc, CField& thisField) const", 
    6060            << "The field " << fieldId << " does not exist."); 
    6161 
     
    7272  } 
    7373 
    74   boost::shared_ptr<COutputPin> CFilterUnaryOpExprNode::reduce(CGarbageCollector& gc, CField& thisField) const 
    75   { 
    76     boost::shared_ptr<CUnaryArithmeticFilter> filter(new CUnaryArithmeticFilter(gc, opId)); 
     74  std::shared_ptr<COutputPin> CFilterUnaryOpExprNode::reduce(CGarbageCollector& gc, CField& thisField) const 
     75  { 
     76    std::shared_ptr<CUnaryArithmeticFilter> filter(new CUnaryArithmeticFilter(gc, opId)); 
    7777    child->reduce(gc, thisField)->connectOutput(filter, 0); 
    7878    return filter; 
     
    8989  } 
    9090 
    91   boost::shared_ptr<COutputPin> CFilterScalarFieldOpExprNode::reduce(CGarbageCollector& gc, CField& thisField) const 
    92   { 
    93     boost::shared_ptr<CScalarFieldArithmeticFilter> filter(new CScalarFieldArithmeticFilter(gc, opId, child1->reduce())); 
     91  std::shared_ptr<COutputPin> CFilterScalarFieldOpExprNode::reduce(CGarbageCollector& gc, CField& thisField) const 
     92  { 
     93    std::shared_ptr<CScalarFieldArithmeticFilter> filter(new CScalarFieldArithmeticFilter(gc, opId, child1->reduce())); 
    9494    child2->reduce(gc, thisField)->connectOutput(filter, 0); 
    9595    return filter; 
     
    106106  } 
    107107 
    108   boost::shared_ptr<COutputPin> CFilterFieldScalarOpExprNode::reduce(CGarbageCollector& gc, CField& thisField) const 
    109   { 
    110     boost::shared_ptr<CFieldScalarArithmeticFilter> filter(new CFieldScalarArithmeticFilter(gc, opId, child2->reduce())); 
     108  std::shared_ptr<COutputPin> CFilterFieldScalarOpExprNode::reduce(CGarbageCollector& gc, CField& thisField) const 
     109  { 
     110    std::shared_ptr<CFieldScalarArithmeticFilter> filter(new CFieldScalarArithmeticFilter(gc, opId, child2->reduce())); 
    111111    child1->reduce(gc, thisField)->connectOutput(filter, 0); 
    112112    return filter; 
     
    123123  } 
    124124 
    125   boost::shared_ptr<COutputPin> CFilterFieldFieldOpExprNode::reduce(CGarbageCollector& gc, CField& thisField) const 
    126   { 
    127     boost::shared_ptr<CFieldFieldArithmeticFilter> filter(new CFieldFieldArithmeticFilter(gc, opId)); 
     125  std::shared_ptr<COutputPin> CFilterFieldFieldOpExprNode::reduce(CGarbageCollector& gc, CField& thisField) const 
     126  { 
     127    std::shared_ptr<CFieldFieldArithmeticFilter> filter(new CFieldFieldArithmeticFilter(gc, opId)); 
    128128    child1->reduce(gc, thisField)->connectOutput(filter, 0); 
    129129    child2->reduce(gc, thisField)->connectOutput(filter, 1); 
     
    145145  } 
    146146 
    147   boost::shared_ptr<COutputPin> CFilterScalarScalarFieldOpExprNode::reduce(CGarbageCollector& gc, CField& thisField) const 
    148   { 
    149     boost::shared_ptr<CScalarScalarFieldArithmeticFilter> filter(new CScalarScalarFieldArithmeticFilter(gc, opId, child1->reduce(),child2->reduce())); 
     147  std::shared_ptr<COutputPin> CFilterScalarScalarFieldOpExprNode::reduce(CGarbageCollector& gc, CField& thisField) const 
     148  { 
     149    std::shared_ptr<CScalarScalarFieldArithmeticFilter> filter(new CScalarScalarFieldArithmeticFilter(gc, opId, child1->reduce(),child2->reduce())); 
    150150    child3->reduce(gc, thisField)->connectOutput(filter, 0); 
    151151    return filter; 
     
    164164  } 
    165165 
    166   boost::shared_ptr<COutputPin> CFilterScalarFieldScalarOpExprNode::reduce(CGarbageCollector& gc, CField& thisField) const 
    167   { 
    168     boost::shared_ptr<CScalarFieldScalarArithmeticFilter> filter(new CScalarFieldScalarArithmeticFilter(gc, opId, child1->reduce(),child3->reduce())); 
     166  std::shared_ptr<COutputPin> CFilterScalarFieldScalarOpExprNode::reduce(CGarbageCollector& gc, CField& thisField) const 
     167  { 
     168    std::shared_ptr<CScalarFieldScalarArithmeticFilter> filter(new CScalarFieldScalarArithmeticFilter(gc, opId, child1->reduce(),child3->reduce())); 
    169169    child2->reduce(gc, thisField)->connectOutput(filter, 0); 
    170170    return filter; 
     
    183183  } 
    184184 
    185   boost::shared_ptr<COutputPin> CFilterScalarFieldFieldOpExprNode::reduce(CGarbageCollector& gc, CField& thisField) const 
    186   { 
    187     boost::shared_ptr<CScalarFieldFieldArithmeticFilter> filter(new CScalarFieldFieldArithmeticFilter(gc, opId, child1->reduce())); 
     185  std::shared_ptr<COutputPin> CFilterScalarFieldFieldOpExprNode::reduce(CGarbageCollector& gc, CField& thisField) const 
     186  { 
     187    std::shared_ptr<CScalarFieldFieldArithmeticFilter> filter(new CScalarFieldFieldArithmeticFilter(gc, opId, child1->reduce())); 
    188188    child2->reduce(gc, thisField)->connectOutput(filter, 0); 
    189189    child3->reduce(gc, thisField)->connectOutput(filter, 1); 
     
    204204  } 
    205205 
    206   boost::shared_ptr<COutputPin> CFilterFieldScalarScalarOpExprNode::reduce(CGarbageCollector& gc, CField& thisField) const 
    207   { 
    208     boost::shared_ptr<CFieldScalarScalarArithmeticFilter> filter(new CFieldScalarScalarArithmeticFilter(gc, opId, child2->reduce(),child3->reduce())); 
     206  std::shared_ptr<COutputPin> CFilterFieldScalarScalarOpExprNode::reduce(CGarbageCollector& gc, CField& thisField) const 
     207  { 
     208    std::shared_ptr<CFieldScalarScalarArithmeticFilter> filter(new CFieldScalarScalarArithmeticFilter(gc, opId, child2->reduce(),child3->reduce())); 
    209209    child1->reduce(gc, thisField)->connectOutput(filter, 0); 
    210210    return filter; 
     
    224224  } 
    225225 
    226   boost::shared_ptr<COutputPin> CFilterFieldScalarFieldOpExprNode::reduce(CGarbageCollector& gc, CField& thisField) const 
    227   { 
    228     boost::shared_ptr<CFieldScalarFieldArithmeticFilter> filter(new CFieldScalarFieldArithmeticFilter(gc, opId, child2->reduce())); 
     226  std::shared_ptr<COutputPin> CFilterFieldScalarFieldOpExprNode::reduce(CGarbageCollector& gc, CField& thisField) const 
     227  { 
     228    std::shared_ptr<CFieldScalarFieldArithmeticFilter> filter(new CFieldScalarFieldArithmeticFilter(gc, opId, child2->reduce())); 
    229229    child1->reduce(gc, thisField)->connectOutput(filter, 0); 
    230230    child3->reduce(gc, thisField)->connectOutput(filter, 1); 
     
    245245  } 
    246246 
    247   boost::shared_ptr<COutputPin> CFilterFieldFieldScalarOpExprNode::reduce(CGarbageCollector& gc, CField& thisField) const 
    248   { 
    249     boost::shared_ptr<CFieldFieldScalarArithmeticFilter> filter(new CFieldFieldScalarArithmeticFilter(gc, opId, child3->reduce())); 
     247  std::shared_ptr<COutputPin> CFilterFieldFieldScalarOpExprNode::reduce(CGarbageCollector& gc, CField& thisField) const 
     248  { 
     249    std::shared_ptr<CFieldFieldScalarArithmeticFilter> filter(new CFieldFieldScalarArithmeticFilter(gc, opId, child3->reduce())); 
    250250    child1->reduce(gc, thisField)->connectOutput(filter, 0); 
    251251    child2->reduce(gc, thisField)->connectOutput(filter, 1); 
     
    265265  } 
    266266 
    267   boost::shared_ptr<COutputPin> CFilterFieldFieldFieldOpExprNode::reduce(CGarbageCollector& gc, CField& thisField) const 
    268   { 
    269     boost::shared_ptr<CFieldFieldFieldArithmeticFilter> filter(new CFieldFieldFieldArithmeticFilter(gc, opId)); 
     267  std::shared_ptr<COutputPin> CFilterFieldFieldFieldOpExprNode::reduce(CGarbageCollector& gc, CField& thisField) const 
     268  { 
     269    std::shared_ptr<CFieldFieldFieldArithmeticFilter> filter(new CFieldFieldFieldArithmeticFilter(gc, opId)); 
    270270    child1->reduce(gc, thisField)->connectOutput(filter, 0); 
    271271    child2->reduce(gc, thisField)->connectOutput(filter, 1); 
  • XIOS/trunk/src/parse_expr/filter_expr_node.hpp

    r1158 r1542  
    33 
    44#include <string> 
    5 #include <boost/shared_ptr.hpp> 
    65#include <boost/smart_ptr/scoped_ptr.hpp> 
    76#include "scalar_expr_node.hpp" 
     
    2625     * \return the output pin of the filter producing the result of the expression  
    2726     */ 
    28     virtual boost::shared_ptr<COutputPin> reduce(CGarbageCollector& gc, CField& thisField) const = 0; 
     27    virtual std::shared_ptr<COutputPin> reduce(CGarbageCollector& gc, CField& thisField) const = 0; 
    2928  }; 
    3029 
     
    4342      CFilterFieldExprNode(const std::string& fieldId); 
    4443 
    45       virtual boost::shared_ptr<COutputPin> reduce(CGarbageCollector& gc, CField& thisField) const; 
     44      virtual std::shared_ptr<COutputPin> reduce(CGarbageCollector& gc, CField& thisField) const; 
    4645 
    4746    private: 
     
    6463      CFilterTemporalFieldExprNode(const std::string& fieldId); 
    6564 
    66       virtual boost::shared_ptr<COutputPin> reduce(CGarbageCollector& gc, CField& thisField) const; 
     65      virtual std::shared_ptr<COutputPin> reduce(CGarbageCollector& gc, CField& thisField) const; 
    6766 
    6867    private: 
     
    8786      CFilterUnaryOpExprNode(const std::string& opId, IFilterExprNode* child); 
    8887 
    89       virtual boost::shared_ptr<COutputPin> reduce(CGarbageCollector& gc, CField& thisField) const; 
     88      virtual std::shared_ptr<COutputPin> reduce(CGarbageCollector& gc, CField& thisField) const; 
    9089 
    9190    private: 
     
    112111      CFilterScalarFieldOpExprNode(IScalarExprNode* child1, const std::string& opId, IFilterExprNode* child2); 
    113112 
    114       virtual boost::shared_ptr<COutputPin> reduce(CGarbageCollector& gc, CField& thisField) const; 
     113      virtual std::shared_ptr<COutputPin> reduce(CGarbageCollector& gc, CField& thisField) const; 
    115114 
    116115    private: 
     
    138137      CFilterFieldScalarOpExprNode(IFilterExprNode* child1, const std::string& opId, IScalarExprNode* child2); 
    139138 
    140       virtual boost::shared_ptr<COutputPin> reduce(CGarbageCollector& gc, CField& thisField) const; 
     139      virtual std::shared_ptr<COutputPin> reduce(CGarbageCollector& gc, CField& thisField) const; 
    141140 
    142141    private: 
     
    163162      CFilterFieldFieldOpExprNode(IFilterExprNode* child1, const std::string& opId, IFilterExprNode* child2); 
    164163 
    165       virtual boost::shared_ptr<COutputPin> reduce(CGarbageCollector& gc, CField& thisField) const; 
     164      virtual std::shared_ptr<COutputPin> reduce(CGarbageCollector& gc, CField& thisField) const; 
    166165 
    167166    private: 
     
    191190      CFilterScalarScalarFieldOpExprNode(IScalarExprNode* child1, const std::string& opId, IScalarExprNode* child2, IFilterExprNode* child3); 
    192191 
    193       virtual boost::shared_ptr<COutputPin> reduce(CGarbageCollector& gc, CField& thisField) const; 
     192      virtual std::shared_ptr<COutputPin> reduce(CGarbageCollector& gc, CField& thisField) const; 
    194193 
    195194    private: 
     
    220219      CFilterScalarFieldScalarOpExprNode(IScalarExprNode* child1, const std::string& opId, IFilterExprNode* child2, IScalarExprNode* child3); 
    221220 
    222       virtual boost::shared_ptr<COutputPin> reduce(CGarbageCollector& gc, CField& thisField) const; 
     221      virtual std::shared_ptr<COutputPin> reduce(CGarbageCollector& gc, CField& thisField) const; 
    223222 
    224223    private: 
     
    249248      CFilterScalarFieldFieldOpExprNode(IScalarExprNode* child1, const std::string& opId, IFilterExprNode* child2, IFilterExprNode* child3); 
    250249 
    251       virtual boost::shared_ptr<COutputPin> reduce(CGarbageCollector& gc, CField& thisField) const; 
     250      virtual std::shared_ptr<COutputPin> reduce(CGarbageCollector& gc, CField& thisField) const; 
    252251 
    253252    private: 
     
    279278      CFilterFieldScalarScalarOpExprNode(IFilterExprNode* child1, const std::string& opId, IScalarExprNode* child2, IScalarExprNode* child3); 
    280279 
    281       virtual boost::shared_ptr<COutputPin> reduce(CGarbageCollector& gc, CField& thisField) const; 
     280      virtual std::shared_ptr<COutputPin> reduce(CGarbageCollector& gc, CField& thisField) const; 
    282281 
    283282    private: 
     
    308307      CFilterFieldScalarFieldOpExprNode(IFilterExprNode* child1, const std::string& opId, IScalarExprNode* child2, IFilterExprNode* child3); 
    309308 
    310       virtual boost::shared_ptr<COutputPin> reduce(CGarbageCollector& gc, CField& thisField) const; 
     309      virtual std::shared_ptr<COutputPin> reduce(CGarbageCollector& gc, CField& thisField) const; 
    311310 
    312311    private: 
     
    336335      CFilterFieldFieldScalarOpExprNode(IFilterExprNode* child1, const std::string& opId, IFilterExprNode* child2, IScalarExprNode* child3); 
    337336 
    338       virtual boost::shared_ptr<COutputPin> reduce(CGarbageCollector& gc, CField& thisField) const; 
     337      virtual std::shared_ptr<COutputPin> reduce(CGarbageCollector& gc, CField& thisField) const; 
    339338 
    340339    private: 
     
    365364      CFilterFieldFieldFieldOpExprNode(IFilterExprNode* child1, const std::string& opId, IFilterExprNode* child2, IFilterExprNode* child3); 
    366365 
    367       virtual boost::shared_ptr<COutputPin> reduce(CGarbageCollector& gc, CField& thisField) const; 
     366      virtual std::shared_ptr<COutputPin> reduce(CGarbageCollector& gc, CField& thisField) const; 
    368367 
    369368    private: 
  • XIOS/trunk/src/server.cpp

    r1519 r1542  
    791791      if (!fb->is_open()) 
    792792        ERROR("void CServer::openStream(const StdString& fileName, const StdString& ext, std::filebuf* fb)", 
    793               << std::endl << "Can not open <" << fileNameClient << "> file to write the server log(s)."); 
     793              << std::endl << "Can not open <" << fileNameClient.str() << "> file to write the server log(s)."); 
    794794    } 
    795795 
  • XIOS/trunk/src/server_distribution_description.cpp

    r1312 r1542  
    196196  \param [in] positionDimensionDistributed dimension of server on which we make the cut. 
    197197*/ 
    198 std::vector<int> CServerDistributionDescription::computeServerGlobalByElement(std::vector<boost::unordered_map<size_t,std::vector<int> > >& indexServerOnElement, 
     198std::vector<int> CServerDistributionDescription::computeServerGlobalByElement(std::vector<std::unordered_map<size_t,std::vector<int> > >& indexServerOnElement, 
    199199                                                                              int clientRank, 
    200200                                                                              int clientSize, 
     
    510510  Get global index calculated by computeServerGlobalIndexInRange 
    511511*/ 
    512 const boost::unordered_map<size_t,int>& CServerDistributionDescription::getGlobalIndexRange() const 
     512const std::unordered_map<size_t,int>& CServerDistributionDescription::getGlobalIndexRange() const 
    513513{ 
    514514  return globalIndex_; 
  • XIOS/trunk/src/server_distribution_description.hpp

    r1258 r1542  
    1313#include "xios_spl.hpp" 
    1414#include "array_new.hpp" 
    15 #include <boost/unordered_map.hpp> 
     15#include <unordered_map> 
    1616 
    1717namespace xios 
     
    3939    void computeServerDistribution(bool doComputeGlobalIndex = false, int positionDimensionDistributed = 1); 
    4040    std::vector<int> computeServerGlobalIndexInRange(const std::pair<size_t, size_t>& indexBeginEnd, int positionDimensionDistributed = 1); 
    41     std::vector<int> computeServerGlobalByElement(std::vector<boost::unordered_map<size_t,std::vector<int> > >& indexServerOnElement, 
     41    std::vector<int> computeServerGlobalByElement(std::vector<std::unordered_map<size_t,std::vector<int> > >& indexServerOnElement, 
    4242                                                  int rank, 
    4343                                                  int clientSize, 
     
    4848    std::vector<std::vector<int> > getServerDimensionSizes() const; 
    4949    const std::vector<CArray<size_t,1> >& getGlobalIndex() const; 
    50     const boost::unordered_map<size_t,int>& getGlobalIndexRange() const; 
     50    const std::unordered_map<size_t,int>& getGlobalIndexRange() const; 
    5151    int getDimensionDistributed(); 
    5252 
     
    7373 
    7474    //!< In case we need only global index of one server with specific rank 
    75     boost::unordered_map<size_t,int> globalIndex_; 
     75    std::unordered_map<size_t,int> globalIndex_; 
    7676 
    7777    //!< Type of distribution on server side 
  • XIOS/trunk/src/transformation/axis_algorithm_inverse.cpp

    r936 r1542  
    108108  } 
    109109 
    110   typedef boost::unordered_map<size_t, std::vector<double> > GlobalIndexMapFromSrcToDest; 
     110  typedef std::unordered_map<size_t, std::vector<double> > GlobalIndexMapFromSrcToDest; 
    111111  GlobalIndexMapFromSrcToDest globalIndexMapFromSrcToDest; 
    112112  TransformationIndexMap& transMap = this->transformationMapping_[0]; 
     
    126126  dhtIndexProcRank.computeIndexInfoMapping(globalSrcIndex); 
    127127  CClientClientDHTInt::Index2VectorInfoTypeMap& computedGlobalIndexOnProc = dhtIndexProcRank.getInfoIndexMap(); 
    128   boost::unordered_map<int, std::vector<size_t> > globalSrcIndexSendToProc; 
     128  std::unordered_map<int, std::vector<size_t> > globalSrcIndexSendToProc; 
    129129  for (int idx = 0; idx < localIndex; ++idx) 
    130130  { 
     
    137137  } 
    138138 
    139   boost::unordered_map<int, std::vector<size_t> >::const_iterator itbIndex = globalSrcIndexSendToProc.begin(), itIndex, 
     139  std::unordered_map<int, std::vector<size_t> >::const_iterator itbIndex = globalSrcIndexSendToProc.begin(), itIndex, 
    140140                                                                  iteIndex = globalSrcIndexSendToProc.end(); 
    141141  std::map<int,int> sendRankSizeMap,recvRankSizeMap; 
     
    175175  std::vector<MPI_Request> requests; 
    176176  std::vector<MPI_Status> status; 
    177   boost::unordered_map<int, unsigned long* > recvGlobalIndexSrc; 
    178   boost::unordered_map<int, double* > sendValueToDest; 
     177  std::unordered_map<int, unsigned long* > recvGlobalIndexSrc; 
     178  std::unordered_map<int, double* > sendValueToDest; 
    179179  for (std::map<int,int>::const_iterator itRecv = recvRankSizeMap.begin(); itRecv != recvRankSizeMap.end(); ++itRecv) 
    180180  { 
     
    188188  } 
    189189 
    190   boost::unordered_map<int, unsigned long* > sendGlobalIndexSrc; 
    191   boost::unordered_map<int, double* > recvValueFromSrc; 
     190  std::unordered_map<int, unsigned long* > sendGlobalIndexSrc; 
     191  std::unordered_map<int, double* > recvValueFromSrc; 
    192192  for (itIndex = itbIndex; itIndex != iteIndex; ++itIndex) 
    193193  { 
     
    271271  delete [] recvSizeBuff; 
    272272 
    273   boost::unordered_map<int, double* >::const_iterator itChar; 
     273  std::unordered_map<int, double* >::const_iterator itChar; 
    274274  for (itChar = sendValueToDest.begin(); itChar != sendValueToDest.end(); ++itChar) 
    275275    delete [] itChar->second; 
    276276  for (itChar = recvValueFromSrc.begin(); itChar != recvValueFromSrc.end(); ++itChar) 
    277277    delete [] itChar->second; 
    278   boost::unordered_map<int, unsigned long* >::const_iterator itLong; 
     278  std::unordered_map<int, unsigned long* >::const_iterator itLong; 
    279279  for (itLong = sendGlobalIndexSrc.begin(); itLong != sendGlobalIndexSrc.end(); ++itLong) 
    280280    delete [] itLong->second; 
  • XIOS/trunk/src/transformation/domain_algorithm_interpolate.cpp

    r1480 r1542  
    88 */ 
    99#include "domain_algorithm_interpolate.hpp" 
    10 #include <boost/unordered_map.hpp> 
     10#include <unordered_map> 
    1111#include "context.hpp" 
    1212#include "context_client.hpp" 
     
    536536  TransformationWeightMap& transWeight = this->transformationWeight_[0]; 
    537537 
    538   boost::unordered_map<size_t,int> globalIndexOfDomainDest; 
     538  std::unordered_map<size_t,int> globalIndexOfDomainDest; 
    539539  int ni = domainDest_->ni.getValue(); 
    540540  int nj = domainDest_->nj.getValue(); 
  • XIOS/trunk/src/transformation/generic_algorithm_transformation.cpp

    r1480 r1542  
    165165  int nbClient = client->clientSize; 
    166166 
    167   typedef boost::unordered_map<int, std::vector<std::pair<int,double> > > SrcToDstMap; 
     167  typedef std::unordered_map<int, std::vector<std::pair<int,double> > > SrcToDstMap; 
    168168  int idx; 
    169169 
     
    287287        if (idx != elementPositionInGrid) 
    288288        { 
    289           boost::unordered_map<int,std::vector<size_t> >::iterator itb = globalElementIndexOnProc_[idx].begin(), it, 
     289          std::unordered_map<int,std::vector<size_t> >::iterator itb = globalElementIndexOnProc_[idx].begin(), it, 
    290290                                                                   ite = globalElementIndexOnProc_[idx].end(); 
    291291          for (it = itb; it != ite; ++it) it->second.resize(1); 
     
    301301        if (idx != elementPositionInGrid) 
    302302        { 
    303           boost::unordered_map<int,std::vector<size_t> >::iterator itb = globalElementIndexOnProc_[idx].begin(), it, 
     303          std::unordered_map<int,std::vector<size_t> >::iterator itb = globalElementIndexOnProc_[idx].begin(), it, 
    304304                                                                   ite = globalElementIndexOnProc_[idx].end(); 
    305305          for (it = itb; it != ite; ++it) procOfNonTransformedElements_.insert(it->first); 
     
    359359          set<int> tmpSet ;  
    360360          procList.swap(tmpSet) ; 
    361           boost::unordered_map<int,std::vector<size_t> >::iterator itb = globalElementIndexOnProc_[idx].begin(), it, 
     361          std::unordered_map<int,std::vector<size_t> >::iterator itb = globalElementIndexOnProc_[idx].begin(), it, 
    362362                                                                   ite = globalElementIndexOnProc_[idx].end(); 
    363363          for (it = itb; it != ite; ++it) 
     
    395395 
    396396    // Build mapping between global source element index and global destination element index. 
    397     boost::unordered_map<int,std::vector<size_t> >().swap(globalElementIndexOnProc_[elementPositionInGrid]); 
     397    std::unordered_map<int,std::vector<size_t> >().swap(globalElementIndexOnProc_[elementPositionInGrid]); 
    398398    std::set<int> tmpCounter; 
    399399    itTransWeight = itbTransWeight; 
     
    426426        if (idx != elementPositionInGrid) 
    427427        { 
    428           boost::unordered_map<int,std::vector<size_t> >::iterator itb = globalElementIndexOnProc_[idx].begin(), it, 
     428          std::unordered_map<int,std::vector<size_t> >::iterator itb = globalElementIndexOnProc_[idx].begin(), it, 
    429429                                                                   ite = globalElementIndexOnProc_[idx].end(); 
    430430          for (it = itb; it != ite; ++it) it->second[0] = transPos(idxTrans); 
     
    456456void CGenericAlgorithmTransformation::computeGlobalGridIndexMapping(int elementPositionInGrid, 
    457457                                                                   const std::vector<int>& srcRank, 
    458                                                                    boost::unordered_map<int, std::vector<std::pair<int,double> > >& src2DstMap, 
     458                                                                   std::unordered_map<int, std::vector<std::pair<int,double> > >& src2DstMap, 
    459459                                                                   CGrid* gridSrc, 
    460460                                                                   CGrid* gridDst, 
    461                                                                    std::vector<boost::unordered_map<int,std::vector<size_t> > >& globalElementIndexOnProc, 
     461                                                                   std::vector<std::unordered_map<int,std::vector<size_t> > >& globalElementIndexOnProc, 
    462462                                                                   SourceDestinationIndexMap& globaIndexWeightFromSrcToDst) 
    463463{ 
     
    615615  
    616616      SourceDestinationIndexMap::iterator rankIt,rankIte ; 
    617       boost::unordered_map<size_t, std::vector<std::pair<size_t,double> > >::iterator globalSrcIndexIt, globalSrcIndexIte ; 
     617      std::unordered_map<size_t, std::vector<std::pair<size_t,double> > >::iterator globalSrcIndexIt, globalSrcIndexIte ; 
    618618      std::vector<std::pair<size_t,double> >::iterator vectIt,vectIte ; 
    619619    
     
    653653                                                                 CScalar* scalarSrc, 
    654654                                                                 CArray<size_t,1>& destGlobalIndexPositionInGrid, 
    655                                                                  boost::unordered_map<int,std::vector<size_t> >& globalScalarIndexOnProc) 
     655                                                                 std::unordered_map<int,std::vector<size_t> >& globalScalarIndexOnProc) 
    656656{ 
    657657  CContext* context = CContext::getCurrent(); 
     
    677677                                                               CAxis* axisSrc, 
    678678                                                               CArray<size_t,1>& destGlobalIndexPositionInGrid, 
    679                                                                boost::unordered_map<int,std::vector<size_t> >& globalAxisIndexOnProc) 
     679                                                               std::unordered_map<int,std::vector<size_t> >& globalAxisIndexOnProc) 
    680680{ 
    681681  CContext* context = CContext::getCurrent(); 
     
    746746                                                                 CDomain* domainSrc, 
    747747                                                                 CArray<size_t,1>& destGlobalIndexPositionInGrid, 
    748                                                                  boost::unordered_map<int,std::vector<size_t> >& globalDomainIndexOnProc) 
     748                                                                 std::unordered_map<int,std::vector<size_t> >& globalDomainIndexOnProc) 
    749749{ 
    750750  CContext* context = CContext::getCurrent(); 
  • XIOS/trunk/src/transformation/generic_algorithm_transformation.hpp

    r1420 r1542  
    3838public: 
    3939  // Mapping between global index map of DESTINATION and its local index with pair of global index of SOURCE and weights 
    40   typedef boost::unordered_map<int, boost::unordered_map<size_t, std::vector<std::pair<size_t,double> > > > SourceDestinationIndexMap; 
     40  typedef std::unordered_map<int, std::unordered_map<size_t, std::vector<std::pair<size_t,double> > > > SourceDestinationIndexMap; 
    4141 
    4242protected: 
    43   typedef boost::unordered_map<size_t,int> GlobalLocalMap; 
     43  typedef std::unordered_map<size_t,int> GlobalLocalMap; 
    4444protected: 
    45   typedef boost::unordered_map<int, std::vector<int> > TransformationIndexMap; 
    46   typedef boost::unordered_map<int, std::vector<double> > TransformationWeightMap; 
    47   typedef boost::unordered_map<int, std::vector<int> > TransformationPositionMap; 
     45  typedef std::unordered_map<int, std::vector<int> > TransformationIndexMap; 
     46  typedef std::unordered_map<int, std::vector<double> > TransformationWeightMap; 
     47  typedef std::unordered_map<int, std::vector<int> > TransformationPositionMap; 
    4848 
    4949public: 
     
    108108  void computeGlobalGridIndexMapping(int elementPositionInGrid, 
    109109                                     const std::vector<int>& srcRank, 
    110                                      boost::unordered_map<int, std::vector<std::pair<int,double> > >& src2DstMap, 
     110                                     std::unordered_map<int, std::vector<std::pair<int,double> > >& src2DstMap, 
    111111                                     CGrid* gridDst, 
    112112                                     CGrid* gridSrc, 
    113                                      std::vector<boost::unordered_map<int,std::vector<size_t> > >& globalElementIndexOnProc, 
     113                                     std::vector<std::unordered_map<int,std::vector<size_t> > >& globalElementIndexOnProc, 
    114114                                     SourceDestinationIndexMap& globaIndexWeightFromSrcToDst); 
    115115 
     
    117117                                  CDomain* domainSrc, 
    118118                                  CArray<size_t,1>& destGlobalIndexPositionInGrid, 
    119                                   boost::unordered_map<int,std::vector<size_t> >& globalDomainIndexOnProc); 
     119                                  std::unordered_map<int,std::vector<size_t> >& globalDomainIndexOnProc); 
    120120 
    121121  void computeExchangeAxisIndex(CAxis* axisDst, 
    122122                                CAxis* axisSrc, 
    123123                                CArray<size_t,1>& destGlobalIndexPositionInGrid, 
    124                                 boost::unordered_map<int,std::vector<size_t> >& globalAxisIndexOnProc); 
     124                                std::unordered_map<int,std::vector<size_t> >& globalAxisIndexOnProc); 
    125125 
    126126  void computeExchangeScalarIndex(CScalar* scalarDst, 
    127127                                  CScalar* scalarSrc, 
    128128                                  CArray<size_t,1>& destGlobalIndexPositionInGrid, 
    129                                   boost::unordered_map<int,std::vector<size_t> >& globalScalarIndexOnProc); 
     129                                  std::unordered_map<int,std::vector<size_t> >& globalScalarIndexOnProc); 
    130130 
    131131  void computePositionElements(CGrid* dst, CGrid* src); 
     
    151151  std::set<StdSize> indexElementSrc_; 
    152152 
    153   std::vector<boost::unordered_map<int,std::vector<size_t> > > globalElementIndexOnProc_; 
     153  std::vector<std::unordered_map<int,std::vector<size_t> > > globalElementIndexOnProc_; 
    154154 
    155155  std::vector<int> procContainSrcElementIdx_;  // List of processes containing source index of transformed elements 
  • XIOS/trunk/src/transformation/grid_transformation.cpp

    r1412 r1542  
    1515#include "mpi_tag.hpp" 
    1616#include "grid.hpp" 
    17 #include <boost/unordered_map.hpp> 
     17#include <unordered_map> 
    1818#include "timer.hpp" 
    1919 
     
    479479  SourceDestinationIndexMap::const_iterator itbIndex = globaIndexWeightFromSrcToDst.begin(), 
    480480                                            iteIndex = globaIndexWeightFromSrcToDst.end(), itIndex; 
    481   typedef boost::unordered_map<size_t, std::vector<std::pair<size_t,double> > > SendIndexMap; 
     481  typedef std::unordered_map<size_t, std::vector<std::pair<size_t,double> > > SendIndexMap; 
    482482  std::map<int,int> sendRankSizeMap,recvRankSizeMap; 
    483483  int connectedClient = globaIndexWeightFromSrcToDst.size(); 
     
    522522  std::vector<MPI_Request> requests; 
    523523  std::vector<MPI_Status> status; 
    524   boost::unordered_map<int, unsigned char* > recvMaskDst; 
    525   boost::unordered_map<int, unsigned long* > recvGlobalIndexSrc; 
     524  std::unordered_map<int, unsigned char* > recvMaskDst; 
     525  std::unordered_map<int, unsigned long* > recvGlobalIndexSrc; 
    526526  for (std::map<int,int>::const_iterator itRecv = recvRankSizeMap.begin(); itRecv != recvRankSizeMap.end(); ++itRecv) 
    527527  { 
     
    537537  } 
    538538 
    539   boost::unordered_map<int, CArray<size_t,1> > globalIndexDst; 
    540   boost::unordered_map<int, CArray<double,1> > weightDst; 
    541   boost::unordered_map<int, unsigned char* > sendMaskDst; 
    542   boost::unordered_map<int, unsigned long* > sendGlobalIndexSrc; 
     539  std::unordered_map<int, CArray<size_t,1> > globalIndexDst; 
     540  std::unordered_map<int, CArray<double,1> > weightDst; 
     541  std::unordered_map<int, unsigned char* > sendMaskDst; 
     542  std::unordered_map<int, unsigned long* > sendGlobalIndexSrc; 
    543543  for (itIndex = itbIndex; itIndex != iteIndex; ++itIndex) 
    544544  { 
     
    670670  delete [] recvSizeBuff; 
    671671 
    672   boost::unordered_map<int, unsigned char* >::const_iterator itChar; 
     672  std::unordered_map<int, unsigned char* >::const_iterator itChar; 
    673673  for (itChar = sendMaskDst.begin(); itChar != sendMaskDst.end(); ++itChar) 
    674674    delete [] itChar->second; 
    675675  for (itChar = recvMaskDst.begin(); itChar != recvMaskDst.end(); ++itChar) 
    676676    delete [] itChar->second; 
    677   boost::unordered_map<int, unsigned long* >::const_iterator itLong; 
     677  std::unordered_map<int, unsigned long* >::const_iterator itLong; 
    678678  for (itLong = sendGlobalIndexSrc.begin(); itLong != sendGlobalIndexSrc.end(); ++itLong) 
    679679    delete [] itLong->second; 
  • XIOS/trunk/src/xios_spl.hpp

    r1158 r1542  
    66#include <string> 
    77#include <algorithm> 
     8#include <unordered_map> 
     9#include <memory> 
    810 
    911// standard C 
     
    2830 
    2931/// boost headers /// 
    30 #include <boost/unordered_map.hpp> 
    31 #include <boost/shared_ptr.hpp> 
    3232#include <boost/cast.hpp> 
    3333/// Map /// 
Note: See TracChangeset for help on using the changeset viewer.