Changeset 1542
- Timestamp:
- 06/13/18 16:48:53 (6 years ago)
- Location:
- XIOS/trunk
- Files:
-
- 128 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/trunk/arch/arch-GCC_LINUX.fcm
r983 r1542 7 7 %LINKER mpif90 8 8 9 %BASE_CFLAGS - ansi -w9 %BASE_CFLAGS -w -std=c++11 10 10 %PROD_CFLAGS -O3 -DBOOST_DISABLE_ASSERTS 11 11 %DEV_CFLAGS -g -O2 -
XIOS/trunk/arch/arch-X64_ADA.fcm
r591 r1542 7 7 %LINKER mpiifort -nofor-main 8 8 9 %BASE_CFLAGS - diag-disable 1125 -diag-disable 2799 %BASE_CFLAGS -std=c++11 -diag-disable 1125 -diag-disable 279 10 10 %PROD_CFLAGS -O3 -D BOOST_DISABLE_ASSERTS 11 11 %DEV_CFLAGS -g -traceback -
XIOS/trunk/arch/arch-X64_CURIE.fcm
r1009 r1542 7 7 %LINKER mpif90 -nofor-main 8 8 9 %BASE_CFLAGS - diag-disable 1125 -diag-disable 2799 %BASE_CFLAGS -std=c++11 -diag-disable 1125 -diag-disable 279 10 10 %PROD_CFLAGS -O3 -D BOOST_DISABLE_ASSERTS 11 11 #%DEV_CFLAGS -g -traceback -
XIOS/trunk/arch/arch-X64_CURIE_GCC.fcm
r591 r1542 7 7 %LINKER mpif90 8 8 9 %BASE_CFLAGS - w9 %BASE_CFLAGS -std=c++11 -w 10 10 %PROD_CFLAGS -O3 -D BOOST_DISABLE_ASSERTS 11 11 %DEV_CFLAGS -g -O2 12 12 %DEBUG_CFLAGS -g 13 13 14 %BASE_FFLAGS -D__NONE__ 14 %BASE_FFLAGS -D__NONE__ -ffree-line-length-none 15 15 %PROD_FFLAGS -O3 16 16 %DEV_FFLAGS -g -O2 -
XIOS/trunk/arch/arch-X64_CURIE_PGI.fcm
r591 r1542 7 7 %LINKER mpif90 -noswitcherror 8 8 9 %BASE_CFLAGS -D__NONE__9 %BASE_CFLAGS c++11 -D__NONE__ 10 10 %PROD_CFLAGS -O3 -D BOOST_DISABLE_ASSERTS 11 11 %DEV_CFLAGS -g -O2 -
XIOS/trunk/arch/arch-X64_CURIE_VAMPIR.fcm
r591 r1542 6 6 %FCOMPILER vtf90 -vt:f90 mpif90 -vt:inst manual -DVTRACE 7 7 %LINKER vtf90 -vt:f90 mpif90 -vt:inst manual -nofor-main -DVTRACE 8 %BASE_CFLAGS - diag-disable 1125 -diag-disable 2798 %BASE_CFLAGS -std=c++11 -diag-disable 1125 -diag-disable 279 9 9 %PROD_CFLAGS -O3 -D BOOST_DISABLE_ASSERTS 10 10 %DEV_CFLAGS -g -traceback -
XIOS/trunk/arch/arch-X64_IRENE.fcm
r1483 r1542 7 7 %LINKER mpif90 -nofor-main 8 8 9 %BASE_CFLAGS - diag-disable 1125 -diag-disable 279 -D BOOST_NO_CXX11_DEFAULTED_FUNCTIONS -D BOOST_NO_CXX11_DELETED_FUNCTIONS9 %BASE_CFLAGS -std=c++11 -diag-disable 1125 -diag-disable 279 10 10 %PROD_CFLAGS -O3 -D BOOST_DISABLE_ASSERTS 11 11 #%DEV_CFLAGS -g -traceback -
XIOS/trunk/arch/arch-X64_OCCIGEN.fcm
r822 r1542 7 7 %LINKER mpif90 -nofor-main 8 8 9 %BASE_CFLAGS - diag-disable 1125 -diag-disable 2799 %BASE_CFLAGS -std=c++11 -diag-disable 1125 -diag-disable 279 10 10 %PROD_CFLAGS -O3 -D BOOST_DISABLE_ASSERTS 11 11 %DEV_CFLAGS -g -traceback -
XIOS/trunk/arch/arch-X64_POINCARE.fcm
r804 r1542 7 7 %LINKER mpif90 -nofor-main 8 8 9 %BASE_CFLAGS - diag-disable 1125 -diag-disable 2799 %BASE_CFLAGS -std=c++11 -diag-disable 1125 -diag-disable 279 10 10 %PROD_CFLAGS -O3 -D BOOST_DISABLE_ASSERTS 11 11 %DEV_CFLAGS -g -traceback -
XIOS/trunk/arch/arch-XC30_Cray.fcm
r591 r1542 19 19 %LINKER CC 20 20 21 %BASE_CFLAGS -DMPICH_SKIP_MPICXX -h msglevel_4 -h zero -h gnu21 %BASE_CFLAGS âhstd=c++11 -DMPICH_SKIP_MPICXX -h msglevel_4 -h zero -h gnu 22 22 23 23 ## Only use -O3 if you can load module cce/8.3.7 or later -
XIOS/trunk/src/array.hpp
r591 r1542 4 4 /// boost headers /// 5 5 #include <boost/cstdint.hpp> 6 #include <boost/shared_ptr.hpp>7 6 #include <boost/multi_array.hpp> 8 7 -
XIOS/trunk/src/array_mac.hpp
r591 r1542 5 5 6 6 // Type Fortran 7 #define ARRAY(valuetype, numdims) boost::shared_ptr<CArray<valuetype, numdims> >7 #define ARRAY(valuetype, numdims) std::shared_ptr<CArray<valuetype, numdims> > 8 8 9 9 #define ARRAY_ASSIGN(value, valuetype, numdims, extent)\ -
XIOS/trunk/src/client.cpp
r1243 r1542 314 314 if (!fb->is_open()) 315 315 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)."); 317 317 } 318 318 -
XIOS/trunk/src/client_client_dht_template.hpp
r941 r1542 15 15 #include "mpi.hpp" 16 16 #include "policy.hpp" 17 #include <boost/unordered_map.hpp>17 #include <unordered_map> 18 18 #include "dht_data_types.hpp" 19 19 … … 34 34 typedef T InfoType; 35 35 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; 39 39 40 40 public: -
XIOS/trunk/src/client_client_dht_template_impl.hpp
r1158 r1542 116 116 size_t index; 117 117 HashXIOS<size_t> hashGlobalIndex; 118 boost::unordered_map<size_t,int> nbIndices;118 std::unordered_map<size_t,int> nbIndices; 119 119 nbIndices.rehash(std::ceil(ssize/nbIndices.max_load_factor())); 120 120 for (int i = 0; i < ssize; ++i) … … 131 131 } 132 132 133 boost::unordered_map<int, size_t* > client2ClientIndex;133 std::unordered_map<int, size_t* > client2ClientIndex; 134 134 for (int idx = 0; idx < nbClient; ++idx) 135 135 { … … 183 183 } 184 184 185 boost::unordered_map<int, size_t* >::iterator itbIndex = client2ClientIndex.begin(), itIndex,185 std::unordered_map<int, size_t* >::iterator itbIndex = client2ClientIndex.begin(), itIndex, 186 186 iteIndex = client2ClientIndex.end(); 187 187 for (itIndex = itbIndex; itIndex != iteIndex; ++itIndex) … … 257 257 } 258 258 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; 261 261 currentIndex = 0; 262 262 for (int idx = 0; idx < nbRecvClient; ++idx) … … 308 308 indexToInfoMappingLevel_.swap(indexToInfoMapping); 309 309 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(); 311 311 it != client2ClientIndex.end(); ++it) 312 312 delete [] it->second; … … 319 319 } 320 320 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(); 322 322 it != client2ClientInfoOnReturn.end(); ++it) 323 323 delete [] it->second; 324 324 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(); 326 326 it != client2ClientIndexOnReturn.end(); ++it) 327 327 delete [] it->second; … … 389 389 } 390 390 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; 393 393 for (int idx = 0; idx < nbClient; ++idx) 394 394 { … … 455 455 } 456 456 457 boost::unordered_map<int, size_t* >::iterator itbIndex = client2ClientIndex.begin(), itIndex,457 std::unordered_map<int, size_t* >::iterator itbIndex = client2ClientIndex.begin(), itIndex, 458 458 iteIndex = client2ClientIndex.end(); 459 459 for (itIndex = itbIndex; itIndex != iteIndex; ++itIndex) 460 460 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, 462 462 iteInfo = client2ClientInfo.end(); 463 463 for (itInfo = itbInfo; itInfo != iteInfo; ++itInfo) … … 490 490 delete [] recvInfoBuff; 491 491 } 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(); 493 493 it != client2ClientInfo.end(); ++it) 494 494 delete [] it->second; 495 495 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(); 497 497 it != client2ClientIndex.end(); ++it) 498 498 delete [] it->second; -
XIOS/trunk/src/client_server_mapping.hpp
r1336 r1542 13 13 #include "array_new.hpp" 14 14 #include "mpi.hpp" 15 #include < boost/unordered_map.hpp>15 #include <unordered_map> 16 16 17 17 namespace xios { … … 25 25 { 26 26 public: 27 typedef boost::unordered_map<int, std::vector<size_t> > GlobalIndexMap;27 typedef std::unordered_map<int, std::vector<size_t> > GlobalIndexMap; 28 28 public: 29 29 /** Default constructor */ -
XIOS/trunk/src/client_server_mapping_distributed.cpp
r1336 r1542 19 19 { 20 20 21 CClientServerMappingDistributed::CClientServerMappingDistributed(const boost::unordered_map<size_t,int>& globalIndexOfServer,21 CClientServerMappingDistributed::CClientServerMappingDistributed(const std::unordered_map<size_t,int>& globalIndexOfServer, 22 22 const MPI_Comm& clientIntraComm, bool isDataDistributed) 23 23 : CClientServerMapping(), ccDHT_(0) -
XIOS/trunk/src/client_server_mapping_distributed.hpp
r1336 r1542 16 16 #include "array_new.hpp" 17 17 #include "mpi.hpp" 18 #include < boost/unordered_map.hpp>18 #include <unordered_map> 19 19 #include "client_client_dht_template.hpp" 20 20 … … 34 34 public: 35 35 /** Default constructor */ 36 CClientServerMappingDistributed(const boost::unordered_map<size_t,int>& globalIndexOfServer,36 CClientServerMappingDistributed(const std::unordered_map<size_t,int>& globalIndexOfServer, 37 37 const MPI_Comm& clientIntraComm, 38 38 bool isDataDistributed = true); -
XIOS/trunk/src/data_output.cpp
r1158 r1542 87 87 { 88 88 CContext* context = CContext::getCurrent() ; 89 boost::shared_ptr<CCalendar> calendar = context->getCalendar();89 std::shared_ptr<CCalendar> calendar = context->getCalendar(); 90 90 91 91 this->writeTimeAxis_(field, calendar); -
XIOS/trunk/src/data_output.hpp
r1158 r1542 59 59 virtual void writeTimeDimension_(void) = 0; 60 60 virtual void writeTimeAxis_ (CField* field, 61 const s hared_ptr<CCalendar> cal) = 0;61 const std::shared_ptr<CCalendar> cal) = 0; 62 62 63 63 /// Propriétés protégées /// -
XIOS/trunk/src/distribution.hpp
r1129 r1542 12 12 #include "xios_spl.hpp" 13 13 #include "array_new.hpp" 14 #include < boost/unordered_map.hpp>14 #include <unordered_map> 15 15 16 16 namespace xios { … … 24 24 { 25 25 public: 26 typedef boost::unordered_map<size_t,int> GlobalLocalMap;26 typedef std::unordered_map<size_t,int> GlobalLocalMap; 27 27 28 28 public: -
XIOS/trunk/src/filter/binary_arithmetic_filter.hpp
r642 r1542 5 5 #include <string> 6 6 #include "operator_expr.hpp" 7 #include <unordered_map> 7 8 8 9 namespace xios -
XIOS/trunk/src/filter/data_packet.hpp
r643 r1542 2 2 #define __XIOS_CDataPacket__ 3 3 4 #include < boost/shared_ptr.hpp>4 #include <memory> 5 5 6 6 #include "array_new.hpp" … … 43 43 }; // struct CDataPacket 44 44 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; 47 47 } // namespace xios 48 48 -
XIOS/trunk/src/filter/output_pin.cpp
r1358 r1542 9 9 { /* Nothing to do */ } 10 10 11 void COutputPin::connectOutput( boost::shared_ptr<CInputPin> inputPin, size_t inputSlot)11 void COutputPin::connectOutput(std::shared_ptr<CInputPin> inputPin, size_t inputSlot) 12 12 { 13 13 if (!inputPin) … … 42 42 "The packet cannot be null."); 43 43 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; 45 45 for (it = outputs.begin(), itEnd = outputs.end(); it != itEnd; ++it) 46 46 it->first->setInput(it->second, packet); … … 68 68 bool COutputPin::mustAutoTrigger() const 69 69 { 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; 71 71 for (it = outputs.begin(), itEnd = outputs.end(); it != itEnd; ++it) 72 72 { … … 80 80 void COutputPin::setOutputTriggers() 81 81 { 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; 83 83 for (it = outputs.begin(), itEnd = outputs.end(); it != itEnd; ++it) 84 84 it->first->setInputTrigger(it->second, this); … … 87 87 bool COutputPin::isDataExpected(const CDate& date) const 88 88 { 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; 90 90 for (it = outputs.begin(), itEnd = outputs.end(); it != itEnd; ++it) 91 91 { -
XIOS/trunk/src/filter/output_pin.hpp
r1358 r1542 29 29 * \param inputSlot the input slot number 30 30 */ 31 void connectOutput( boost::shared_ptr<CInputPin> inputPin, size_t inputSlot);31 void connectOutput(std::shared_ptr<CInputPin> inputPin, size_t inputSlot); 32 32 33 33 /*! … … 93 93 94 94 //!< 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; 96 96 97 97 //! Output buffer, store the packets until the output is triggered -
XIOS/trunk/src/filter/spatial_transform_filter.cpp
r1474 r1542 11 11 { /* Nothing to do */ } 12 12 13 std::pair< boost::shared_ptr<CSpatialTransformFilter>, boost::shared_ptr<CSpatialTransformFilter> >13 std::pair<std::shared_ptr<CSpatialTransformFilter>, std::shared_ptr<CSpatialTransformFilter> > 14 14 CSpatialTransformFilter::buildFilterGraph(CGarbageCollector& gc, CGrid* srcGrid, CGrid* destGrid, bool hasMissingValue, double missingValue) 15 15 { 16 16 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> >" 18 18 "buildFilterGraph(CGarbageCollector& gc, CGrid* srcGrid, CGrid* destGrid)", 19 19 "Impossible to build the filter graph if either the source or the destination grid are null."); 20 20 21 boost::shared_ptr<CSpatialTransformFilter> firstFilter, lastFilter;21 std::shared_ptr<CSpatialTransformFilter> firstFilter, lastFilter; 22 22 // Note that this loop goes from the last transformation to the first transformation 23 23 do … … 36 36 for (it=algoList.begin();it!=algoList.end();++it) if (it->second.first == TRANS_TEMPORAL_SPLITTING) isSpatialTemporal=true ; 37 37 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)); 41 41 42 42 … … 140 140 } 141 141 142 std::map<CGridTransformation*, boost::shared_ptr<CSpatialTransformFilterEngine> > CSpatialTransformFilterEngine::engines;142 std::map<CGridTransformation*, std::shared_ptr<CSpatialTransformFilterEngine> > CSpatialTransformFilterEngine::engines; 143 143 144 144 CSpatialTransformFilterEngine* CSpatialTransformFilterEngine::get(CGridTransformation* gridTransformation) … … 148 148 "Impossible to get the requested engine, the grid transformation is invalid."); 149 149 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); 151 151 if (it == engines.end()) 152 152 { 153 boost::shared_ptr<CSpatialTransformFilterEngine> engine(new CSpatialTransformFilterEngine(gridTransformation));153 std::shared_ptr<CSpatialTransformFilterEngine> engine(new CSpatialTransformFilterEngine(gridTransformation)); 154 154 it = engines.insert(std::make_pair(gridTransformation, engine)).first; 155 155 } -
XIOS/trunk/src/filter/spatial_transform_filter.hpp
r1275 r1542 36 36 * \return the first and the last filters of the filter graph 37 37 */ 38 static std::pair< boost::shared_ptr<CSpatialTransformFilter>, boost::shared_ptr<CSpatialTransformFilter> >38 static std::pair<std::shared_ptr<CSpatialTransformFilter>, std::shared_ptr<CSpatialTransformFilter> > 39 39 buildFilterGraph(CGarbageCollector& gc, CGrid* srcGrid, CGrid* destGrid, bool hasMissingValue, double defaultValue); 40 40 … … 141 141 142 142 //! The allocated engines 143 static std::map<CGridTransformation*, boost::shared_ptr<CSpatialTransformFilterEngine> > engines;143 static std::map<CGridTransformation*, std::shared_ptr<CSpatialTransformFilterEngine> > engines; 144 144 }; // class CSpatialTransformFilterEngine 145 145 } // namespace xios -
XIOS/trunk/src/group_factory.hpp
r591 r1542 1 1 #ifndef __XIOS_CGroupFactory__ 2 2 #define __XIOS_CGroupFactory__ 3 4 /// boost headers ///5 #include <boost/shared_ptr.hpp>6 3 7 4 /// XIOS headers /// … … 23 20 24 21 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); 27 24 28 25 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); 31 28 32 29 /// Accesseurs /// … … 34 31 35 32 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); 38 35 39 36 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); 42 39 43 40 template <typename U> 44 static int GetGroupNum( boost::shared_ptr<U> group);41 static int GetGroupNum(std::shared_ptr<U> group); 45 42 template <typename U> 46 static int GetGroupIdNum( boost::shared_ptr<U> group);43 static int GetGroupIdNum(std::shared_ptr<U> group); 47 44 template <typename U> 48 static int GetChildNum( boost::shared_ptr<U> group);45 static int GetChildNum(std::shared_ptr<U> group); 49 46 template <typename U> 50 static int GetChildIdNum( boost::shared_ptr<U> group);47 static int GetChildIdNum(std::shared_ptr<U> group); 51 48 52 49 /// Tests /// 53 50 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); 55 52 56 53 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); 58 55 59 56 /// Instanciateur /// 60 57 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("")); 63 60 64 61 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("")); 67 64 68 65 private : -
XIOS/trunk/src/group_factory_decl.cpp
r1457 r1542 5 5 { 6 6 # define macro(U) \ 7 template void CGroupFactory::AddGroup<U>(s hared_ptr<U> pgroup,shared_ptr<U> cgroup); \8 template void CGroupFactory::AddChild<U>(s hared_ptr<U> group,shared_ptr<U::RelChild> child); \9 template s hared_ptr<U> CGroupFactory::GetGroup<U>(shared_ptr<U> group, const StdString & id); \10 template s hared_ptr<U::RelChild> CGroupFactory::GetChild<U>(shared_ptr<U> group, const StdString & id); \11 template int CGroupFactory::GetGroupNum<U>(s hared_ptr<U> group); \12 template int CGroupFactory::GetGroupIdNum<U>(s hared_ptr<U> group); \13 template int CGroupFactory::GetChildNum<U>(s hared_ptr<U> group); \14 template int CGroupFactory::GetChildIdNum<U>( boost::shared_ptr<U> group); \15 template bool CGroupFactory::HasGroup<U>(s hared_ptr<U> group, const StdString & id); \16 template bool CGroupFactory::HasChild<U>( boost::shared_ptr<U> group, const StdString & id); \17 template s hared_ptr<U> CGroupFactory::CreateGroup<U>(shared_ptr<U> group, const StdString & id ); \18 template s hared_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); 19 19 20 20 macro(CFieldGroup) -
XIOS/trunk/src/group_factory_impl.hpp
r591 r1542 9 9 10 10 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) 13 13 { 14 14 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)", 16 16 << " pgroup or cgroup NULL !"); 17 17 if (!cgroup->hasId()) … … 25 25 26 26 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) 29 29 { 30 30 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)", 32 32 << " pgroup or cgroup NULL !"); 33 33 if (!child->hasId()) … … 41 41 42 42 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) 45 45 { 46 46 CObjectFactory::SetCurrentContextId … … 48 48 if (id.size() == 0) 49 49 { 50 boost::shared_ptr<U> value = CObjectFactory::CreateObject<U>(CObjectFactory::GenUId<U>());50 std::shared_ptr<U> value = CObjectFactory::CreateObject<U>(CObjectFactory::GenUId<U>()); 51 51 group->groupList.insert(group->groupList.end(), value.get()); 52 52 group->groupMap.insert(std::make_pair(value->getId(), value.get())); … … 57 57 else 58 58 { 59 boost::shared_ptr<U> value = CObjectFactory::CreateObject<U>(id);59 std::shared_ptr<U> value = CObjectFactory::CreateObject<U>(id); 60 60 group->groupList.insert(group->groupList.end(), value.get()); 61 61 group->groupMap.insert(std::make_pair(id, value.get())); … … 65 65 66 66 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) 69 69 { 70 70 CObjectFactory::SetCurrentContextId … … 72 72 if (id.size() == 0) 73 73 { 74 boost::shared_ptr<typename U::RelChild> value =74 std::shared_ptr<typename U::RelChild> value = 75 75 CObjectFactory::CreateObject<typename U::RelChild>(); 76 76 group->childList.insert(group->childList.end(), value.get()); … … 82 82 else 83 83 { 84 boost::shared_ptr<typename U::RelChild> value =84 std::shared_ptr<typename U::RelChild> value = 85 85 CObjectFactory::CreateObject<typename U::RelChild>(id); 86 86 group->childList.insert(group->childList.end(), value.get()); … … 91 91 92 92 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) 94 94 { return (group->groupMap.find(id) != group->groupMap.end()); } 95 95 96 96 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) 98 98 { return (group->childMap.find(id) != group->childMap.end()); } 99 99 100 100 template <typename U> 101 int CGroupFactory::GetGroupNum( boost::shared_ptr<U> group)101 int CGroupFactory::GetGroupNum(std::shared_ptr<U> group) 102 102 { return (group->groupList.size()); } 103 103 104 104 template <typename U> 105 int CGroupFactory::GetGroupIdNum( boost::shared_ptr<U> group)105 int CGroupFactory::GetGroupIdNum(std::shared_ptr<U> group) 106 106 { return (group->groupMap.size()); } 107 107 108 108 template <typename U> 109 int CGroupFactory::GetChildNum( boost::shared_ptr<U> group)109 int CGroupFactory::GetChildNum(std::shared_ptr<U> group) 110 110 { return (group->childList.size()); } 111 111 112 112 template <typename U> 113 int CGroupFactory::GetChildIdNum( boost::shared_ptr<U> group)113 int CGroupFactory::GetChildIdNum(std::shared_ptr<U> group) 114 114 { return (group->childMap.size()); } 115 115 116 116 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) 119 119 { 120 120 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)", 122 122 << "[ id = " << id << ", U = " << U::GetName() << " ] " 123 123 << " group is not referenced !"); … … 126 126 127 127 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) 130 130 { 131 131 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)", 133 133 << "[ id = " << id << ", U = " << U::GetName() << " ] " 134 134 << " child is not referenced !"); -
XIOS/trunk/src/group_template.hpp
r1021 r1542 64 64 void solveRefInheritance(void); 65 65 // 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("")) ; 68 68 U* createChild(const string& id="") ; 69 69 -
XIOS/trunk/src/group_template_impl.hpp
r1158 r1542 326 326 327 327 // 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) 329 329 // { 330 330 // return CObjectFactory::GetObject<V>(id) ; … … 332 332 333 333 // 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() 335 335 // { 336 336 // return CObjectFactory::GetObject<V>(this) ; … … 338 338 339 339 // 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) 341 341 // { 342 342 // return CObjectFactory::CreateObject<V>(id) ; -
XIOS/trunk/src/interface/c/icaxis.cpp
r591 r1542 4 4 5 5 #include <boost/multi_array.hpp> 6 #include < boost/shared_ptr.hpp>6 #include <memory> 7 7 8 8 #include "xios.hpp" -
XIOS/trunk/src/interface/c/iccalendar.cpp
r704 r1542 24 24 CTimer::get("XIOS").resume(); 25 25 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(); 27 27 if (!cal) 28 28 ERROR("void cxios_get_current_date(cxios_date* current_date_c)", … … 41 41 { 42 42 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(); 44 44 if (!cal) 45 45 ERROR("int cxios_get_year_length_in_seconds(int year)", … … 54 54 { 55 55 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(); 57 57 if (!cal) 58 58 ERROR("int cxios_get_day_length_in_seconds()", -
XIOS/trunk/src/interface/c/iccalendar_wrapper.cpp
r591 r1542 4 4 5 5 #include <boost/multi_array.hpp> 6 #include <boost/shared_ptr.hpp> 6 7 #include <memory> 7 8 8 9 #include "xios.hpp" -
XIOS/trunk/src/interface/c/iccompute_connectivity_domain.cpp
r934 r1542 4 4 5 5 #include <boost/multi_array.hpp> 6 #include <boost/shared_ptr.hpp>7 6 8 7 #include "xios.hpp" -
XIOS/trunk/src/interface/c/iccontext.cpp
r591 r1542 4 4 5 5 #include <boost/multi_array.hpp> 6 #include <boost/shared_ptr.hpp> 6 7 #include <memory> 7 8 8 9 #include "xios.hpp" -
XIOS/trunk/src/interface/c/icdata.cpp
r1054 r1542 4 4 5 5 #include <boost/multi_array.hpp> 6 #include < boost/shared_ptr.hpp>6 #include <memory> 7 7 #include <string> 8 8 #include <cstring> -
XIOS/trunk/src/interface/c/icdate.cpp
r1472 r1542 4 4 5 5 #include <boost/multi_array.hpp> 6 #include <boost/shared_ptr.hpp>7 6 8 7 #include "xios.hpp" … … 27 26 if (!context) 28 27 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(); 30 29 if (!cal) 31 30 ERROR(idFunc, << "Impossible to do calendar operations: no calendar was defined."); -
XIOS/trunk/src/interface/c/icdomain.cpp
r591 r1542 4 4 5 5 #include <boost/multi_array.hpp> 6 #include <boost/shared_ptr.hpp> 6 7 #include <memory> 7 8 8 9 #include "xios.hpp" -
XIOS/trunk/src/interface/c/icduplicate_scalar_to_axis.cpp
r1492 r1542 4 4 5 5 #include <boost/multi_array.hpp> 6 #include < boost/shared_ptr.hpp>6 #include <memory> 7 7 8 8 #include "xios.hpp" -
XIOS/trunk/src/interface/c/icexpand_domain.cpp
r981 r1542 4 4 5 5 #include <boost/multi_array.hpp> 6 #include <boost/shared_ptr.hpp> 6 7 #include <memory> 7 8 8 9 #include "xios.hpp" -
XIOS/trunk/src/interface/c/icextract_to_axis.cpp
r981 r1542 4 4 5 5 #include <boost/multi_array.hpp> 6 #include < boost/shared_ptr.hpp>6 #include <memory> 7 7 8 8 #include "xios.hpp" -
XIOS/trunk/src/interface/c/icextract_to_scalar.cpp
r981 r1542 4 4 5 5 #include <boost/multi_array.hpp> 6 #include < boost/shared_ptr.hpp>6 #include <memory> 7 7 8 8 #include "xios.hpp" -
XIOS/trunk/src/interface/c/icfield.cpp
r1158 r1542 4 4 5 5 #include <boost/multi_array.hpp> 6 #include <boost/shared_ptr.hpp> 6 7 #include <memory> 7 8 8 9 #include "xios.hpp" -
XIOS/trunk/src/interface/c/icfile.cpp
r591 r1542 4 4 5 5 #include <boost/multi_array.hpp> 6 #include < boost/shared_ptr.hpp>6 #include <memory> 7 7 8 8 #include "xios.hpp" -
XIOS/trunk/src/interface/c/icgenerate_rectilinear_domain.cpp
r786 r1542 4 4 5 5 #include <boost/multi_array.hpp> 6 #include <boost/shared_ptr.hpp> 6 7 #include <memory> 7 8 8 9 #include "xios.hpp" -
XIOS/trunk/src/interface/c/icgrid.cpp
r591 r1542 4 4 5 5 #include <boost/multi_array.hpp> 6 #include <boost/shared_ptr.hpp>7 6 8 7 #include "xios.hpp" -
XIOS/trunk/src/interface/c/icinterpolate.cpp
r786 r1542 4 4 5 5 #include <boost/multi_array.hpp> 6 #include <boost/shared_ptr.hpp>7 6 8 7 #include "xios.hpp" -
XIOS/trunk/src/interface/c/icinverse_axis.cpp
r786 r1542 4 4 5 5 #include <boost/multi_array.hpp> 6 #include <boost/shared_ptr.hpp> 6 7 #include <memory> 7 8 8 9 #include "xios.hpp" -
XIOS/trunk/src/interface/c/icreduce_axis_to_axis.cpp
r1492 r1542 4 4 5 5 #include <boost/multi_array.hpp> 6 #include <boost/shared_ptr.hpp> 6 7 #include <memory> 7 8 8 9 #include "xios.hpp" -
XIOS/trunk/src/interface/c/icreduce_scalar_to_scalar.cpp
r1492 r1542 4 4 5 5 #include <boost/multi_array.hpp> 6 #include <boost/shared_ptr.hpp> 6 7 #include <memory> 7 8 8 9 #include "xios.hpp" -
XIOS/trunk/src/interface/c/icreduce_to_axis.cpp
r981 r1542 4 4 5 5 #include <boost/multi_array.hpp> 6 #include <boost/shared_ptr.hpp> 6 7 #include <memory> 7 8 8 9 #include "xios.hpp" -
XIOS/trunk/src/interface/c/icreduce_to_scalar.cpp
r981 r1542 4 4 5 5 #include <boost/multi_array.hpp> 6 #include <boost/shared_ptr.hpp>7 6 8 7 #include "xios.hpp" -
XIOS/trunk/src/interface/c/icreorder_domain.cpp
r1492 r1542 4 4 5 5 #include <boost/multi_array.hpp> 6 #include <boost/shared_ptr.hpp> 6 7 #include <memory> 7 8 8 9 #include "xios.hpp" -
XIOS/trunk/src/interface/c/icscalar.cpp
r891 r1542 4 4 5 5 #include <boost/multi_array.hpp> 6 #include < boost/shared_ptr.hpp>6 #include <memory> 7 7 8 8 #include "xios.hpp" -
XIOS/trunk/src/interface/c/ictemporal_splitting.cpp
r1492 r1542 4 4 5 5 #include <boost/multi_array.hpp> 6 #include <boost/shared_ptr.hpp> 6 7 #include <memory> 7 8 8 9 #include "xios.hpp" -
XIOS/trunk/src/interface/c/icvariable.cpp
r591 r1542 4 4 5 5 #include <boost/multi_array.hpp> 6 #include <boost/shared_ptr.hpp> 6 7 #include <memory> 7 8 8 9 #include "xios.hpp" -
XIOS/trunk/src/interface/c/icxml_tree.cpp
r981 r1542 4 4 5 5 #include <boost/multi_array.hpp> 6 #include < boost/shared_ptr.hpp>6 #include <memory> 7 7 8 8 #include "xios.hpp" -
XIOS/trunk/src/interface/c/iczoom.cpp
r786 r1542 4 4 5 5 #include <boost/multi_array.hpp> 6 #include <boost/shared_ptr.hpp> 6 7 #include <memory> 7 8 8 9 #include "xios.hpp" -
XIOS/trunk/src/interface/c_attr/icaxis_attr.cpp
r1492 r1542 4 4 5 5 #include <boost/multi_array.hpp> 6 #include < boost/shared_ptr.hpp>6 #include <memory> 7 7 #include "xios.hpp" 8 8 #include "attribute_template.hpp" -
XIOS/trunk/src/interface/c_attr/icaxisgroup_attr.cpp
r1492 r1542 4 4 5 5 #include <boost/multi_array.hpp> 6 #include < boost/shared_ptr.hpp>6 #include <memory> 7 7 #include "xios.hpp" 8 8 #include "attribute_template.hpp" -
XIOS/trunk/src/interface/c_attr/iccalendar_wrapper_attr.cpp
r1492 r1542 4 4 5 5 #include <boost/multi_array.hpp> 6 #include < boost/shared_ptr.hpp>6 #include <memory> 7 7 #include "xios.hpp" 8 8 #include "attribute_template.hpp" -
XIOS/trunk/src/interface/c_attr/iccompute_connectivity_domain_attr.cpp
r934 r1542 4 4 5 5 #include <boost/multi_array.hpp> 6 #include < boost/shared_ptr.hpp>6 #include <memory> 7 7 #include "xios.hpp" 8 8 #include "attribute_template.hpp" -
XIOS/trunk/src/interface/c_attr/iccontext_attr.cpp
r591 r1542 4 4 5 5 #include <boost/multi_array.hpp> 6 #include < boost/shared_ptr.hpp>6 #include <memory> 7 7 #include "xios.hpp" 8 8 #include "attribute_template.hpp" -
XIOS/trunk/src/interface/c_attr/icdomain_attr.cpp
r1492 r1542 4 4 5 5 #include <boost/multi_array.hpp> 6 #include < boost/shared_ptr.hpp>6 #include <memory> 7 7 #include "xios.hpp" 8 8 #include "attribute_template.hpp" -
XIOS/trunk/src/interface/c_attr/icdomaingroup_attr.cpp
r1492 r1542 4 4 5 5 #include <boost/multi_array.hpp> 6 #include < boost/shared_ptr.hpp>6 #include <memory> 7 7 #include "xios.hpp" 8 8 #include "attribute_template.hpp" -
XIOS/trunk/src/interface/c_attr/icduplicate_scalar_to_axis_attr.cpp
r1492 r1542 4 4 5 5 #include <boost/multi_array.hpp> 6 #include < boost/shared_ptr.hpp>6 #include <memory> 7 7 #include "xios.hpp" 8 8 #include "attribute_template.hpp" -
XIOS/trunk/src/interface/c_attr/icexpand_domain_attr.cpp
r1158 r1542 4 4 5 5 #include <boost/multi_array.hpp> 6 #include < boost/shared_ptr.hpp>6 #include <memory> 7 7 #include "xios.hpp" 8 8 #include "attribute_template.hpp" -
XIOS/trunk/src/interface/c_attr/icextract_axis_to_scalar_attr.cpp
r981 r1542 4 4 5 5 #include <boost/multi_array.hpp> 6 #include < boost/shared_ptr.hpp>6 #include <memory> 7 7 #include "xios.hpp" 8 8 #include "attribute_template.hpp" -
XIOS/trunk/src/interface/c_attr/icextract_domain_to_axis_attr.cpp
r981 r1542 4 4 5 5 #include <boost/multi_array.hpp> 6 #include < boost/shared_ptr.hpp>6 #include <memory> 7 7 #include "xios.hpp" 8 8 #include "attribute_template.hpp" -
XIOS/trunk/src/interface/c_attr/icfield_attr.cpp
r1492 r1542 4 4 5 5 #include <boost/multi_array.hpp> 6 #include < boost/shared_ptr.hpp>6 #include <memory> 7 7 #include "xios.hpp" 8 8 #include "attribute_template.hpp" -
XIOS/trunk/src/interface/c_attr/icfieldgroup_attr.cpp
r1492 r1542 4 4 5 5 #include <boost/multi_array.hpp> 6 #include < boost/shared_ptr.hpp>6 #include <memory> 7 7 #include "xios.hpp" 8 8 #include "attribute_template.hpp" -
XIOS/trunk/src/interface/c_attr/icfile_attr.cpp
r1492 r1542 4 4 5 5 #include <boost/multi_array.hpp> 6 #include < boost/shared_ptr.hpp>6 #include <memory> 7 7 #include "xios.hpp" 8 8 #include "attribute_template.hpp" -
XIOS/trunk/src/interface/c_attr/icfilegroup_attr.cpp
r1492 r1542 4 4 5 5 #include <boost/multi_array.hpp> 6 #include < boost/shared_ptr.hpp>6 #include <memory> 7 7 #include "xios.hpp" 8 8 #include "attribute_template.hpp" -
XIOS/trunk/src/interface/c_attr/icgenerate_rectilinear_domain_attr.cpp
r786 r1542 4 4 5 5 #include <boost/multi_array.hpp> 6 #include < boost/shared_ptr.hpp>6 #include <memory> 7 7 #include "xios.hpp" 8 8 #include "attribute_template.hpp" -
XIOS/trunk/src/interface/c_attr/icgrid_attr.cpp
r1492 r1542 4 4 5 5 #include <boost/multi_array.hpp> 6 #include < boost/shared_ptr.hpp>6 #include <memory> 7 7 #include "xios.hpp" 8 8 #include "attribute_template.hpp" -
XIOS/trunk/src/interface/c_attr/icgridgroup_attr.cpp
r1492 r1542 4 4 5 5 #include <boost/multi_array.hpp> 6 #include < boost/shared_ptr.hpp>6 #include <memory> 7 7 #include "xios.hpp" 8 8 #include "attribute_template.hpp" -
XIOS/trunk/src/interface/c_attr/icinterpolate_axis_attr.cpp
r891 r1542 4 4 5 5 #include <boost/multi_array.hpp> 6 #include < boost/shared_ptr.hpp>6 #include <memory> 7 7 #include "xios.hpp" 8 8 #include "attribute_template.hpp" -
XIOS/trunk/src/interface/c_attr/icinterpolate_domain_attr.cpp
r1492 r1542 4 4 5 5 #include <boost/multi_array.hpp> 6 #include < boost/shared_ptr.hpp>6 #include <memory> 7 7 #include "xios.hpp" 8 8 #include "attribute_template.hpp" -
XIOS/trunk/src/interface/c_attr/icinverse_axis_attr.cpp
r786 r1542 4 4 5 5 #include <boost/multi_array.hpp> 6 #include < boost/shared_ptr.hpp>6 #include <memory> 7 7 #include "xios.hpp" 8 8 #include "attribute_template.hpp" -
XIOS/trunk/src/interface/c_attr/icreduce_axis_to_axis_attr.cpp
r1492 r1542 4 4 5 5 #include <boost/multi_array.hpp> 6 #include < boost/shared_ptr.hpp>6 #include <memory> 7 7 #include "xios.hpp" 8 8 #include "attribute_template.hpp" -
XIOS/trunk/src/interface/c_attr/icreduce_axis_to_scalar_attr.cpp
r980 r1542 4 4 5 5 #include <boost/multi_array.hpp> 6 #include < boost/shared_ptr.hpp>6 #include <memory> 7 7 #include "xios.hpp" 8 8 #include "attribute_template.hpp" -
XIOS/trunk/src/interface/c_attr/icreduce_domain_to_axis_attr.cpp
r1492 r1542 4 4 5 5 #include <boost/multi_array.hpp> 6 #include < boost/shared_ptr.hpp>6 #include <memory> 7 7 #include "xios.hpp" 8 8 #include "attribute_template.hpp" -
XIOS/trunk/src/interface/c_attr/icreduce_domain_to_scalar_attr.cpp
r1492 r1542 4 4 5 5 #include <boost/multi_array.hpp> 6 #include < boost/shared_ptr.hpp>6 #include <memory> 7 7 #include "xios.hpp" 8 8 #include "attribute_template.hpp" -
XIOS/trunk/src/interface/c_attr/icreduce_scalar_to_scalar_attr.cpp
r1492 r1542 4 4 5 5 #include <boost/multi_array.hpp> 6 #include < boost/shared_ptr.hpp>6 #include <memory> 7 7 #include "xios.hpp" 8 8 #include "attribute_template.hpp" -
XIOS/trunk/src/interface/c_attr/icreorder_domain_attr.cpp
r1492 r1542 4 4 5 5 #include <boost/multi_array.hpp> 6 #include < boost/shared_ptr.hpp>6 #include <memory> 7 7 #include "xios.hpp" 8 8 #include "attribute_template.hpp" -
XIOS/trunk/src/interface/c_attr/icscalar_attr.cpp
r1492 r1542 4 4 5 5 #include <boost/multi_array.hpp> 6 #include < boost/shared_ptr.hpp>6 #include <memory> 7 7 #include "xios.hpp" 8 8 #include "attribute_template.hpp" -
XIOS/trunk/src/interface/c_attr/icscalargroup_attr.cpp
r1492 r1542 4 4 5 5 #include <boost/multi_array.hpp> 6 #include < boost/shared_ptr.hpp>6 #include <memory> 7 7 #include "xios.hpp" 8 8 #include "attribute_template.hpp" -
XIOS/trunk/src/interface/c_attr/ictemporal_splitting_attr.cpp
r1492 r1542 4 4 5 5 #include <boost/multi_array.hpp> 6 #include < boost/shared_ptr.hpp>6 #include <memory> 7 7 #include "xios.hpp" 8 8 #include "attribute_template.hpp" -
XIOS/trunk/src/interface/c_attr/icvariable_attr.cpp
r1158 r1542 4 4 5 5 #include <boost/multi_array.hpp> 6 #include < boost/shared_ptr.hpp>6 #include <memory> 7 7 #include "xios.hpp" 8 8 #include "attribute_template.hpp" -
XIOS/trunk/src/interface/c_attr/icvariablegroup_attr.cpp
r1158 r1542 4 4 5 5 #include <boost/multi_array.hpp> 6 #include < boost/shared_ptr.hpp>6 #include <memory> 7 7 #include "xios.hpp" 8 8 #include "attribute_template.hpp" -
XIOS/trunk/src/interface/c_attr/iczoom_axis_attr.cpp
r1201 r1542 4 4 5 5 #include <boost/multi_array.hpp> 6 #include < boost/shared_ptr.hpp>6 #include <memory> 7 7 #include "xios.hpp" 8 8 #include "attribute_template.hpp" -
XIOS/trunk/src/interface/c_attr/iczoom_domain_attr.cpp
r787 r1542 4 4 5 5 #include <boost/multi_array.hpp> 6 #include < boost/shared_ptr.hpp>6 #include <memory> 7 7 #include "xios.hpp" 8 8 #include "attribute_template.hpp" -
XIOS/trunk/src/io/nc4_data_output.cpp
r1509 r1542 2697 2697 void CNc4DataOutput::writeTimeAxis_ 2698 2698 (CField* field, 2699 const boost::shared_ptr<CCalendar> cal)2699 const std::shared_ptr<CCalendar> cal) 2700 2700 { 2701 2701 StdOStringStream oss; … … 2920 2920 msg.append(e.what()); 2921 2921 ERROR("CNc4DataOutput::writeTimeAxis_ (CField* field, \ 2922 const boost::shared_ptr<CCalendar> cal)", << msg);2922 const std::shared_ptr<CCalendar> cal)", << msg); 2923 2923 } 2924 2924 } -
XIOS/trunk/src/io/nc4_data_output.hpp
r1456 r1542 61 61 virtual void syncFile_ (void); 62 62 virtual void writeTimeAxis_ (CField* field, 63 const boost::shared_ptr<CCalendar> cal);63 const std::shared_ptr<CCalendar> cal); 64 64 65 65 protected : -
XIOS/trunk/src/node/axis.cpp
r1421 r1542 202 202 { 203 203 // 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(); 205 205 for (it = indSrv_[client->serverSize].begin(); it != ite; ++it) 206 206 { … … 623 623 624 624 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); 626 626 627 627 std::list<int> serverZeroIndexLeader; … … 689 689 // we need to compute the local index on the server from its corresponding global index 690 690 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(), 692 692 ite = globalLocalIndexMap_.end(), it; 693 693 CArray<size_t,1>::const_iterator itSrvb = writtenGlobalIndex.begin(), … … 721 721 { 722 722 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(), 724 724 ite = globalLocalIndexMap_.end(), it; 725 725 for (int i = 0; i < zoom_index.numElements(); ++i) … … 745 745 // { 746 746 // nbWritten = 0; 747 // boost::unordered_map<size_t,size_t> localGlobalIndexMap;747 // std::unordered_map<size_t,size_t> localGlobalIndexMap; 748 748 // for (itSrv = itSrvb; itSrv != itSrve; ++itSrv) 749 749 // { … … 810 810 CDistributionServer srvDist(server->intraCommSize, nBegin, nSize, nBeginGlobal, nGlob); 811 811 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(), 813 813 ite = globalLocalIndexMap_.end(), it; 814 814 815 815 CArray<size_t,1>::const_iterator itSrvb = writtenGlobalIndex.begin(), 816 816 itSrve = writtenGlobalIndex.end(), itSrv; 817 boost::unordered_map<size_t,size_t> localGlobalIndexMap;817 std::unordered_map<size_t,size_t> localGlobalIndexMap; 818 818 for (itSrv = itSrvb; itSrv != itSrve; ++itSrv) 819 819 { … … 1137 1137 } 1138 1138 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; 1140 1140 iteMap = indSrv_[nbServer].end(); 1141 1141 for (int k = 0; k < connectedServerRank_[nbServer].size(); ++k) -
XIOS/trunk/src/node/axis.hpp
r1371 r1542 166 166 bool isCompressible_; 167 167 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 server168 std::map<int, std::unordered_map<int, vector<size_t> > > indSrv_; // Global index of each client sent to server 169 169 // 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_; 171 171 std::vector<int> indexesToWrite; 172 172 std::map<int,int> numberWrittenIndexes_, totalNumberWrittenIndexes_, offsetWrittenIndexes_; -
XIOS/trunk/src/node/calendar_wrapper.cpp
r1201 r1542 32 32 \return the calendar 33 33 */ 34 boost::shared_ptr<CCalendar> CCalendarWrapper::getCalendar(bool checkValid /*= false*/) const34 std::shared_ptr<CCalendar> CCalendarWrapper::getCalendar(bool checkValid /*= false*/) const 35 35 { 36 36 if (checkValid && !this->calendar) … … 92 92 #define DECLARE_CALENDAR(MType, eType) \ 93 93 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()); 95 95 #include "calendar_type.conf" 96 96 #undef DECLARE_CALENDAR … … 111 111 << "Both leap_year_drift and leap_year_month attributes are mandatory if you wish to use leap_year_drift_offset attribute."); 112 112 113 boost::shared_ptr<CUserDefinedCalendar> userDefinedCalendar;113 std::shared_ptr<CUserDefinedCalendar> userDefinedCalendar; 114 114 if (year_length.isEmpty()) 115 115 userDefinedCalendar.reset(new CUserDefinedCalendar(day_length.getValue(), month_lengths.getValue())); -
XIOS/trunk/src/node/calendar_wrapper.hpp
r591 r1542 67 67 public : 68 68 /// Accesseurs /// 69 boost::shared_ptr<CCalendar> getCalendar(bool checkValid = false) const;69 std::shared_ptr<CCalendar> getCalendar(bool checkValid = false) const; 70 70 71 71 const CDate& getInitDate() const; … … 78 78 private: 79 79 // Calendar of context 80 boost::shared_ptr<CCalendar> calendar;80 std::shared_ptr<CCalendar> calendar; 81 81 82 82 }; // class CCalendarWrapper -
XIOS/trunk/src/node/context.cpp
r1489 r1542 23 23 namespace xios { 24 24 25 s hared_ptr<CContextGroup> CContext::root;25 std::shared_ptr<CContextGroup> CContext::root; 26 26 27 27 /// ////////////////////// Définitions ////////////////////// /// … … 66 66 CContextGroup* CContext::getRoot(void) 67 67 { 68 if (root.get()==NULL) root=s hared_ptr<CContextGroup>(new CContextGroup(xml::CXMLNode::GetRootName()));68 if (root.get()==NULL) root=std::shared_ptr<CContextGroup>(new CContextGroup(xml::CXMLNode::GetRootName())); 69 69 return root.get(); 70 70 } … … 76 76 \return Calendar 77 77 */ 78 boost::shared_ptr<CCalendar> CContext::getCalendar(void) const78 std::shared_ptr<CCalendar> CContext::getCalendar(void) const 79 79 { 80 80 return (this->calendar); … … 87 87 \param[in] newCalendar new calendar 88 88 */ 89 void CContext::setCalendar( boost::shared_ptr<CCalendar> newCalendar)89 void CContext::setCalendar(std::shared_ptr<CCalendar> newCalendar) 90 90 { 91 91 this->calendar = newCalendar; … … 1414 1414 idServer_ = this->getId(); 1415 1415 idServer_ += "_server_"; 1416 idServer_ += boost::lexical_cast<string>(i);1416 idServer_ += std::to_string(static_cast<unsigned long long>(i)); 1417 1417 return idServer_; 1418 1418 } -
XIOS/trunk/src/node/context.hpp
r1378 r1542 8 8 9 9 #include "declare_group.hpp" 10 //#include "context_client.hpp"11 //#include "context_server.hpp"12 10 #include "data_output.hpp" 13 11 #include "garbage_collector.hpp" … … 83 81 84 82 /// Mutateurs /// 85 void setCalendar( boost::shared_ptr<CCalendar> newCalendar);83 void setCalendar(std::shared_ptr<CCalendar> newCalendar); 86 84 87 85 /// Accesseurs /// 88 boost::shared_ptr<CCalendar> getCalendar(void) const;86 std::shared_ptr<CCalendar> getCalendar(void) const; 89 87 90 88 public : … … 227 225 public : 228 226 // Calendar of context 229 boost::shared_ptr<CCalendar> calendar;227 std::shared_ptr<CCalendar> calendar; 230 228 231 229 // List of all enabled files (files on which fields are written or read) … … 241 239 242 240 // Context root 243 static s hared_ptr<CContextGroup> root;241 static std::shared_ptr<CContextGroup> root; 244 242 245 243 // Determine context on client or not -
XIOS/trunk/src/node/domain.cpp
r1509 r1542 150 150 } 151 151 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(); 153 153 // std::map<int, std::vector<int> >::const_iterator itWrittenIndexEnd = indWrittenSrv_.end(); 154 154 for (size_t k = 0; k < connectedServerRank_[client->serverSize].size(); ++k) 155 155 { 156 156 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); 158 158 size_t idxCount = (it != itIndexEnd) ? it->second.size() : 0; 159 159 … … 1838 1838 CServerDistributionDescription serverDescription(nGlobDomain, nbServer); 1839 1839 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); 1842 1842 1843 1843 std::list<int> serverZeroIndexLeader; … … 1896 1896 1897 1897 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(), 1899 1899 ite = globalLocalIndexMap_.end(), it; 1900 1900 CArray<size_t,1>::const_iterator itSrvb = writtenGlobalIndex.begin(), … … 1932 1932 // { 1933 1933 // nbWritten = 0; 1934 // boost::unordered_map<size_t,size_t> localGlobalIndexMap;1934 // std::unordered_map<size_t,size_t> localGlobalIndexMap; 1935 1935 // for (itSrv = itSrvb; itSrv != itSrve; ++itSrv) 1936 1936 // { … … 1996 1996 const CArray<size_t,1>& writtenGlobalIndex = srvDist.getGlobalIndex(); 1997 1997 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(), 1999 1999 ite = globalLocalIndexMap_.end(), it; 2000 2000 CArray<size_t,1>::const_iterator itSrvb = writtenGlobalIndex.begin(), 2001 2001 itSrve = writtenGlobalIndex.end(), itSrv; 2002 boost::unordered_map<size_t,size_t> localGlobalIndexMap;2002 std::unordered_map<size_t,size_t> localGlobalIndexMap; 2003 2003 for (itSrv = itSrvb; itSrv != itSrve; ++itSrv) 2004 2004 { … … 2076 2076 list<CArray<int,1> > list_indZoom, list_writtenInd, list_indGlob; 2077 2077 2078 boost::unordered_map<int, vector<size_t> >::const_iterator itIndex, iteIndex;2078 std::unordered_map<int, vector<size_t> >::const_iterator itIndex, iteIndex; 2079 2079 iteIndex = indSrv_[serverSize].end(); 2080 2080 for (int k = 0; k < connectedServerRank_[serverSize].size(); ++k) … … 2177 2177 list<CArray<bool,1> > list_mask; 2178 2178 2179 boost::unordered_map<int, vector<size_t> >::const_iterator it, iteMap;2179 std::unordered_map<int, vector<size_t> >::const_iterator it, iteMap; 2180 2180 iteMap = indSrv_[serverSize].end(); 2181 2181 for (int k = 0; k < connectedServerRank_[serverSize].size(); ++k) … … 2224 2224 list<CArray<double,1> > list_area; 2225 2225 2226 boost::unordered_map<int, vector<size_t> >::const_iterator it, iteMap;2226 std::unordered_map<int, vector<size_t> >::const_iterator it, iteMap; 2227 2227 iteMap = indSrv_[serverSize].end(); 2228 2228 for (int k = 0; k < connectedServerRank_[serverSize].size(); ++k) … … 2275 2275 list<CArray<double,2> > list_boundslon, list_boundslat; 2276 2276 2277 boost::unordered_map<int, vector<size_t> >::const_iterator it, iteMap;2277 std::unordered_map<int, vector<size_t> >::const_iterator it, iteMap; 2278 2278 iteMap = indSrv_[serverSize].end(); 2279 2279 for (int k = 0; k < connectedServerRank_[serverSize].size(); ++k) … … 2392 2392 } 2393 2393 2394 boost::unordered_map<int, vector<size_t> >::const_iterator it, iteMap;2394 std::unordered_map<int, vector<size_t> >::const_iterator it, iteMap; 2395 2395 iteMap = indSrv_[serverSize].end(); 2396 2396 for (int k = 0; k < connectedServerRank_[serverSize].size(); ++k) -
XIOS/trunk/src/node/domain.hpp
r1353 r1542 215 215 216 216 /** 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_; 218 218 // std::map<CContextClient*, std::map<int, vector<int> > > indWrittenSrv_; // Global written index of each client sent to server 219 219 std::vector<int> indexesToWrite; … … 229 229 TransMapTypes transformationMap_; 230 230 bool isUnstructed_; 231 boost::unordered_map<size_t,size_t> globalLocalIndexMap_;231 std::unordered_map<size_t,size_t> globalLocalIndexMap_; 232 232 233 233 private: -
XIOS/trunk/src/node/field.cpp
r1524 r1542 219 219 // Gather all data from different clients 220 220 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)); 222 222 } 223 223 … … 716 716 //---------------------------------------------------------------- 717 717 718 boost::shared_ptr<COutputPin> CField::getInstantDataFilter()718 std::shared_ptr<COutputPin> CField::getInstantDataFilter() 719 719 { 720 720 return instantDataFilter; … … 984 984 << "An operation must be defined for field \"" << getId() << "\"."); 985 985 986 boost::shared_ptr<func::CFunctor> functor;986 std::shared_ptr<func::CFunctor> functor; 987 987 CArray<double, 1> dummyData; 988 988 … … 1027 1027 { 1028 1028 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)); 1030 1030 1031 1031 … … 1035 1035 if (file && (file->mode.isEmpty() || file->mode == CFile::mode_attr::write)) 1036 1036 { 1037 fileServerWriterFilter = boost::shared_ptr<CFileServerWriterFilter>(new CFileServerWriterFilter(gc, this));1037 fileServerWriterFilter = std::shared_ptr<CFileServerWriterFilter>(new CFileServerWriterFilter(gc, this)); 1038 1038 instantDataFilter->connectOutput(fileServerWriterFilter, 0); 1039 1039 } … … 1043 1043 { 1044 1044 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)); 1046 1046 1047 1047 // If the field data is to be read by the client or/and written to a file … … 1050 1050 if (file && (file->mode.isEmpty() || file->mode == CFile::mode_attr::write)) 1051 1051 { 1052 fileWriterFilter = boost::shared_ptr<CFileWriterFilter>(new CFileWriterFilter(gc, this));1052 fileWriterFilter = std::shared_ptr<CFileWriterFilter>(new CFileWriterFilter(gc, this)); 1053 1053 instantDataFilter->connectOutput(fileWriterFilter, 0); 1054 1054 } … … 1064 1064 { 1065 1065 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); 1067 1067 1068 1068 // Check if a spatial transformation is needed … … 1073 1073 if (grid && grid != gridRef && grid->hasTransform()) 1074 1074 { 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); 1076 1076 1077 1077 filter->connectOutput(filters.first, 0); … … 1089 1089 { 1090 1090 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, 1092 1092 detectMissingValues, defaultValue)); 1093 1093 } … … 1095 1095 { 1096 1096 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, 1098 1098 detectMissingValues, defaultValue)); 1099 1099 } … … 1105 1105 if (!read_access.isEmpty() && read_access) 1106 1106 { 1107 storeFilter = boost::shared_ptr<CStoreFilter>(new CStoreFilter(gc, CContext::getCurrent(), grid,1107 storeFilter = std::shared_ptr<CStoreFilter>(new CStoreFilter(gc, CContext::getCurrent(), grid, 1108 1108 detectMissingValues, defaultValue)); 1109 1109 instantDataFilter->connectOutput(storeFilter, 0); … … 1112 1112 if (file && (file->mode.isEmpty() || file->mode == CFile::mode_attr::write)) 1113 1113 { 1114 fileWriterFilter = boost::shared_ptr<CFileWriterFilter>(new CFileWriterFilter(gc, this));1114 fileWriterFilter = std::shared_ptr<CFileWriterFilter>(new CFileWriterFilter(gc, this)); 1115 1115 getTemporalDataFilter(gc, file->output_freq)->connectOutput(fileWriterFilter, 0); 1116 1116 } … … 1126 1126 * \return the output pin corresponding to the field reference 1127 1127 */ 1128 boost::shared_ptr<COutputPin> CField::getFieldReference(CGarbageCollector& gc)1128 std::shared_ptr<COutputPin> CField::getFieldReference(CGarbageCollector& gc) 1129 1129 { 1130 1130 if (instantDataFilter || field_ref.isEmpty()) … … 1135 1135 fieldRef->buildFilterGraph(gc, false); 1136 1136 1137 std::pair< boost::shared_ptr<CFilter>, boost::shared_ptr<CFilter> > filters;1137 std::pair<std::shared_ptr<CFilter>, std::shared_ptr<CFilter> > filters; 1138 1138 // Check if a spatial transformation is needed 1139 1139 if (grid && grid != fieldRef->grid && grid->hasTransform()) … … 1144 1144 } 1145 1145 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)); 1147 1147 1148 1148 fieldRef->getInstantDataFilter()->connectOutput(filters.first, 0); … … 1160 1160 * \return the output pin corresponding to a self reference 1161 1161 */ 1162 boost::shared_ptr<COutputPin> CField::getSelfReference(CGarbageCollector& gc)1162 std::shared_ptr<COutputPin> CField::getSelfReference(CGarbageCollector& gc) 1163 1163 { 1164 1164 if (instantDataFilter || !hasExpression()) … … 1176 1176 { 1177 1177 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, 1179 1179 detectMissingValues, defaultValue)); 1180 1180 } … … 1193 1193 { 1194 1194 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, 1196 1196 detectMissingValues, defaultValue)); 1197 1197 } … … 1213 1213 * \return the output pin corresponding to the requested temporal filter 1214 1214 */ 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); 1218 1218 1219 1219 if (it == temporalDataFilters.end()) … … 1226 1226 1227 1227 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, 1229 1229 CContext::getCurrent()->getCalendar()->getInitDate(), 1230 1230 freq_op, freq_offset, outFreq, detectMissingValues)); … … 1247 1247 */ 1248 1248 1249 boost::shared_ptr<COutputPin> CField::getSelfTemporalDataFilter(CGarbageCollector& gc, CDuration outFreq)1249 std::shared_ptr<COutputPin> CField::getSelfTemporalDataFilter(CGarbageCollector& gc, CDuration outFreq) 1250 1250 { 1251 1251 if (instantDataFilter || !hasExpression()) … … 1264 1264 1265 1265 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, 1267 1267 CContext::getCurrent()->getCalendar()->getInitDate(), 1268 1268 freq_op, freq_offset, outFreq, detectMissingValues)); -
XIOS/trunk/src/node/field.hpp
r1524 r1542 92 92 template <int N> void getData(CArray<double, N>& _data) const; 93 93 94 boost::shared_ptr<COutputPin> getInstantDataFilter();94 std::shared_ptr<COutputPin> getInstantDataFilter(); 95 95 96 96 /// Mutateur /// … … 143 143 144 144 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); 149 149 150 150 // virtual void fromBinary(StdIStream& is); … … 226 226 bool mustAutoTrigger; 227 227 228 map<int, boost::shared_ptr<func::CFunctor> > foperation_srv;228 map<int,std::shared_ptr<func::CFunctor> > foperation_srv; 229 229 230 230 // map<int, CArray<double,1> > data_srv; 231 231 CArray<double,1> recvDataSrv; 232 232 233 boost::shared_ptr<func::CFunctor> recvFoperationSrv;233 std::shared_ptr<func::CFunctor> recvFoperationSrv; 234 234 string content; 235 235 … … 258 258 259 259 //! 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; 261 261 //! 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; 263 263 //! 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; 265 265 //! The source filter for data provided by the client 266 boost::shared_ptr<CSourceFilter> clientSourceFilter;266 std::shared_ptr<CSourceFilter> clientSourceFilter; 267 267 //! The source filter for data provided by the server 268 boost::shared_ptr<CSourceFilter> serverSourceFilter;268 std::shared_ptr<CSourceFilter> serverSourceFilter; 269 269 //! The terminal filter which stores the instant data 270 boost::shared_ptr<CStoreFilter> storeFilter;270 std::shared_ptr<CStoreFilter> storeFilter; 271 271 //! The terminal filter which writes the data to file 272 boost::shared_ptr<CFileWriterFilter> fileWriterFilter;272 std::shared_ptr<CFileWriterFilter> fileWriterFilter; 273 273 //! The terminal filter which writes data to file 274 boost::shared_ptr<CFileServerWriterFilter> fileServerWriterFilter;274 std::shared_ptr<CFileServerWriterFilter> fileServerWriterFilter; 275 275 }; // class CField 276 276 -
XIOS/trunk/src/node/file.cpp
r1516 r1542 64 64 \return data writer object. 65 65 */ 66 boost::shared_ptr<CDataOutput> CFile::getDataOutput(void) const66 std::shared_ptr<CDataOutput> CFile::getDataOutput(void) const 67 67 { 68 68 return data_out; … … 75 75 \return data reader object. 76 76 */ 77 boost::shared_ptr<CDataInput> CFile::getDataInput(void) const77 std::shared_ptr<CDataInput> CFile::getDataInput(void) const 78 78 { 79 79 return data_in; … … 545 545 if (isOpen) data_out->closeFile(); 546 546 547 data_out = s hared_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, 548 548 fileComm, multifile, isCollective, time_counter_name)); 549 549 isOpen = true; … … 669 669 bool ugridConvention = !convention.isEmpty() ? (convention == convention_attr::UGRID) : false; 670 670 if (time_counter_name.isEmpty()) 671 data_in = s hared_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)); 672 672 else 673 data_in = s hared_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)); 674 674 isOpen = true; 675 675 } -
XIOS/trunk/src/node/file.hpp
r1494 r1542 71 71 /// Accesseurs /// 72 72 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; 75 75 CFieldGroup* getVirtualFieldGroup(void) const; 76 76 CVariableGroup* getVirtualVariableGroup(void) const; … … 186 186 CFieldGroup* vFieldGroup; 187 187 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; 190 190 std::vector<CField*> enabledFields; 191 191 -
XIOS/trunk/src/node/grid.cpp
r1397 r1542 783 783 784 784 // 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; 786 786 CServerDistributionDescription serverDistributionDescription(getGlobalDimension(), client->serverSize); 787 787 std::vector<int> serverZeroIndex = serverDistributionDescription.computeServerGlobalByElement(indexServerOnElement, … … 889 889 \param [out] globalIndexOnServer global index of grid and its corresponding rank of server. 890 890 */ 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, 892 892 const CContextClient* client, 893 893 CClientServerMapping::GlobalIndexMap& globalIndexOnServer) … … 942 942 943 943 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); 945 945 CArray<int,1> nbIndexOnServer(serverSize); // Number of distributed global index held by each client for each server 946 946 // Number of temporary distributed global index held by each client for each server … … 950 950 { 951 951 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]; 953 953 const CArray<size_t,1>& globalIndexElementOnClient = globalIndexElement[idx]; 954 954 CClientClientDHTInt clientClientDHT(indexServerElement, client->intraComm); -
XIOS/trunk/src/node/grid.hpp
r1422 r1542 288 288 void checkAttributesAfterTransformation(); 289 289 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, 291 291 const CContextClient* client, 292 292 CClientServerMapping::GlobalIndexMap& globalIndexOnServer); -
XIOS/trunk/src/node/mesh.cpp
r1507 r1542 6 6 7 7 #include "mesh.hpp" 8 #include <boost/functional/hash.hpp> 9 //#include <unordered_map> 8 10 9 11 namespace xios { … … 136 138 } 137 139 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 otherwise147 */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 else177 {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 else189 {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 else210 return ( (hashed_map_nodes[hash0]+1) / 4 );211 212 } // nodeIndex()213 214 140 ///---------------------------------------------------------------- 215 141 /*! … … 298 224 * \param [in] bounds_lat Array of boundary latitudes. Its size depends on the element type. 299 225 */ 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 connectivity325 node_lon.resizeAndPreserve(nbEdges_*nvertex); // Max possible number of nodes326 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 else342 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 edges349 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 else365 {366 nbFaces_ = bounds_lon.shape()[1];367 368 // Create nodes and face_node connectivity369 node_lon.resizeAndPreserve(nbFaces_*nvertex); // Max possible number of nodes370 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 else386 {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 connectivity395 edge_lon.resizeAndPreserve(nbFaces_*nvertex); // Max possible number of edges396 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 generated403 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 rotation413 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 else428 {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 else439 {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 else449 {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 faces468 face_lon.resize(nbFaces_);469 face_lat.resize(nbFaces_);470 face_lon = lonvalue;471 face_lat = latvalue;472 facesAreWritten = true;473 474 } // nvertex > 2475 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() 477 403 478 404 ///---------------------------------------------------------------- … … 2088 2014 2089 2015 // 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) 2091 2017 int maxNb = 20; // some assumption on the max possible number of neighboring cells 2092 2018 faceToFaces.resize(maxNb, nbFaces); … … 2145 2071 CArray<double, 2> faceToNodes (nvertex, nbFaces); 2146 2072 2147 boost::unordered_map <pair<double,double>, int> mapNodes;2073 std::unordered_map <pairDouble, int, boost::hash<pairDouble> > mapNodes; 2148 2074 2149 2075 for (int nf = 0; nf < nbFaces; ++nf) … … 2161 2087 2162 2088 // faceToFaces connectivity 2163 boost::unordered_map <pair<int,int>, int> mapEdges;2089 std::unordered_map <pairInt, int, boost::hash<pairInt> > mapEdges; 2164 2090 faceToFaces.resize(nvertex, nbFaces); 2165 2091 CArray<int, 2> edgeToFaces(2, nbFaces*nvertex); // max possible -
XIOS/trunk/src/node/mesh.hpp
r931 r1542 76 76 private: 77 77 78 typedef std::pair<double, double> pairDouble; 79 typedef std::pair<int, int> pairInt; 80 78 81 int nbNodes_; 79 82 int nbEdges_; … … 91 94 vector<size_t> createHashes (const double, const double); 92 95 93 size_t nodeIndex (double, double); // redundant in parallel version with epsilon precision94 boost::unordered_map <size_t, size_t> hashed_map_nodes; // redundant in parallel version with epsilon precision95 boost::unordered_map <pair<double,double>, int> map_nodes; // redundant in parallel version with epsilon precision96 boost::unordered_map <pair<int,int>, int> map_edges; // redundant in parallel version with epsilon precision97 98 96 }; 99 97 -
XIOS/trunk/src/object_factory.hpp
r769 r1542 2 2 #define __XIOS_CObjectFactory__ 3 3 4 /// boost headers /// 5 #include <boost/shared_ptr.hpp> 4 #include <memory> 6 5 7 6 /// XIOS headers /// … … 24 23 25 24 template <typename U> 26 static boost::shared_ptr<U> GetObject(const StdString & id);25 static std::shared_ptr<U> GetObject(const StdString & id); 27 26 28 27 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); 30 29 31 30 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); 33 32 34 33 template <typename U> … … 38 37 39 38 template <typename U> 40 static const std::vector< boost::shared_ptr<U> > &39 static const std::vector<std::shared_ptr<U> > & 41 40 GetObjectVector(const StdString & context = CObjectFactory::GetCurrentContextId()); 42 41 … … 50 49 /// Instanciateur /// 51 50 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("")); 53 52 54 53 template <typename U> static const StdString& GetUIdBase(void); -
XIOS/trunk/src/object_factory_decl.cpp
r1457 r1542 5 5 { 6 6 #define macro(U) \ 7 template s hared_ptr<U> CObjectFactory::GetObject<U>(const StdString& id); \8 template s hared_ptr<U> CObjectFactory::GetObject<U>(const StdString& context,const StdString& id); \9 template s hared_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); \ 10 10 template int CObjectFactory::GetObjectNum<U>(void); \ 11 11 template int CObjectFactory::GetObjectIdNum<U>(void); \ 12 template const std::vector<s hared_ptr<U> >& CObjectFactory::GetObjectVector<U>(const StdString& context ); \12 template const std::vector<std::shared_ptr<U> >& CObjectFactory::GetObjectVector<U>(const StdString& context ); \ 13 13 template bool CObjectFactory::HasObject<U>(const StdString& id); \ 14 14 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 ); \ 16 16 template const StdString& CObjectFactory::GetUIdBase<U>(void); \ 17 17 template StdString CObjectFactory::GenUId<U>(void); \ -
XIOS/trunk/src/object_factory_impl.hpp
r769 r1542 43 43 44 44 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) 46 46 { 47 47 if (CurrContext.size() == 0) 48 48 ERROR("CObjectFactory::GetObject(const U * const object)", 49 49 << "please define current context id !"); 50 std::vector< boost::shared_ptr<U> > & vect =50 std::vector<std::shared_ptr<U> > & vect = 51 51 U::AllVectObj[CObjectFactory::CurrContext]; 52 52 53 typename std::vector< boost::shared_ptr<U> >::const_iterator53 typename std::vector<std::shared_ptr<U> >::const_iterator 54 54 it = vect.begin(), end = vect.end(); 55 55 56 56 for (; it != end; it++) 57 57 { 58 boost::shared_ptr<U> ptr = *it;58 std::shared_ptr<U> ptr = *it; 59 59 if (ptr.get() == object) 60 60 return (ptr); … … 64 64 << "[type = " << U::GetName() << ", adress = " << object << "] " 65 65 << "object was not found."); 66 return ( boost::shared_ptr<U>()); // jamais atteint66 return (std::shared_ptr<U>()); // jamais atteint 67 67 } 68 68 69 69 template <typename U> 70 boost::shared_ptr<U> CObjectFactory::GetObject(const StdString & id)70 std::shared_ptr<U> CObjectFactory::GetObject(const StdString & id) 71 71 { 72 72 if (CurrContext.size() == 0) … … 81 81 82 82 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) 84 84 { 85 85 if (!CObjectFactory::HasObject<U>(context,id)) … … 91 91 92 92 template <typename U> 93 boost::shared_ptr<U> CObjectFactory::CreateObject(const StdString& id)93 std::shared_ptr<U> CObjectFactory::CreateObject(const StdString& id) 94 94 { 95 95 if (CurrContext.empty()) … … 103 103 else 104 104 { 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)); 106 106 107 107 U::AllVectObj[CObjectFactory::CurrContext].insert(U::AllVectObj[CObjectFactory::CurrContext].end(), value); … … 113 113 114 114 template <typename U> 115 const std::vector< boost::shared_ptr<U> > &115 const std::vector<std::shared_ptr<U> > & 116 116 CObjectFactory::GetObjectVector(const StdString & context) 117 117 { -
XIOS/trunk/src/object_template.hpp
r1330 r1542 71 71 72 72 /// Accesseur statique /// 73 static std::vector< boost::shared_ptr<DerivedType> > &73 static std::vector<std::shared_ptr<DerivedType> > & 74 74 GetAllVectobject(const StdString & contextId); 75 75 … … 83 83 static T* get(const string& contextId, const string& id) ; 84 84 T* get(void) ; 85 s hared_ptr<T> getShared(void) ;86 static s hared_ptr<T> getShared(const T* ptr) ;85 std::shared_ptr<T> getShared(void) ; 86 static std::shared_ptr<T> getShared(const T* ptr) ; 87 87 88 88 static T* create(const string& id=string("")) ; … … 108 108 static xios_map<StdString, 109 109 xios_map<StdString, 110 boost::shared_ptr<DerivedType> > > AllMapObj;110 std::shared_ptr<DerivedType> > > AllMapObj; 111 111 static xios_map<StdString, 112 std::vector< boost::shared_ptr<DerivedType> > > AllVectObj;112 std::vector<std::shared_ptr<DerivedType> > > AllVectObj; 113 113 114 114 static xios_map< StdString, long int > GenId ; -
XIOS/trunk/src/object_template_impl.hpp
r1330 r1542 24 24 xios_map<StdString, 25 25 xios_map<StdString, 26 boost::shared_ptr<T> > > CObjectTemplate<T>::AllMapObj;26 std::shared_ptr<T> > > CObjectTemplate<T>::AllMapObj; 27 27 28 28 template <class T> 29 29 xios_map<StdString, 30 std::vector< boost::shared_ptr<T> > > CObjectTemplate<T>::AllVectObj;30 std::vector<std::shared_ptr<T> > > CObjectTemplate<T>::AllVectObj; 31 31 32 32 template <class T> … … 63 63 64 64 template <class T> 65 std::vector< boost::shared_ptr<T> > &65 std::vector<std::shared_ptr<T> > & 66 66 CObjectTemplate<T>::GetAllVectobject(const StdString & contextId) 67 67 { … … 412 412 413 413 template <typename T> 414 s hared_ptr<T> CObjectTemplate<T>::getShared(const T* ptr)414 std::shared_ptr<T> CObjectTemplate<T>::getShared(const T* ptr) 415 415 { 416 416 return CObjectFactory::GetObject<T>(ptr); … … 418 418 419 419 template <typename T> 420 s hared_ptr<T> CObjectTemplate<T>::getShared(void)420 std::shared_ptr<T> CObjectTemplate<T>::getShared(void) 421 421 { 422 422 return CObjectFactory::GetObject<T>((T*)this); … … 426 426 const vector<T*> CObjectTemplate<T>::getAll() 427 427 { 428 const vector< s hared_ptr<T> >& shared_vect= CObjectFactory::GetObjectVector<T>();428 const vector< std::shared_ptr<T> >& shared_vect= CObjectFactory::GetObjectVector<T>(); 429 429 vector<T*> vect; 430 430 431 typename vector<s hared_ptr<T> >::const_iterator it;431 typename vector<std::shared_ptr<T> >::const_iterator it; 432 432 for(it=shared_vect.begin();it!=shared_vect.end();++it) vect.push_back(it->get()); 433 433 return vect; … … 437 437 const vector<T*> CObjectTemplate<T>::getAll(const string & id) 438 438 { 439 const vector< s hared_ptr<T> >& shared_vect= CObjectFactory::GetObjectVector<T>(id);439 const vector< std::shared_ptr<T> >& shared_vect= CObjectFactory::GetObjectVector<T>(id); 440 440 vector<T*> vect; 441 441 442 typename vector<s hared_ptr<T> >::const_iterator it;442 typename vector<std::shared_ptr<T> >::const_iterator it; 443 443 for(it=shared_vect.begin();it!=shared_vect.end();++it) vect.push_back(it->get()); 444 444 return vect; … … 475 475 oss << iendl; 476 476 oss << "#include <boost/multi_array.hpp>" << iendl; 477 oss << "#include <boost /shared_ptr.hpp>" << iendl;477 oss << "#include <boostXXX/shared_ptr.hpp>" << iendl; 478 478 oss << "#include \"xios.hpp\"" << iendl; 479 479 oss << "#include \"attribute_template.hpp\"" << iendl; -
XIOS/trunk/src/parse_expr/filter_expr_node.cpp
r1158 r1542 11 11 { /* Nothing to do */ } 12 12 13 boost::shared_ptr<COutputPin> CFilterFieldExprNode::reduce(CGarbageCollector& gc, CField& thisField) const14 { 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; 16 16 17 17 if (fieldId == "this") … … 21 21 CField* field = CField::get(fieldId); 22 22 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", 24 24 << "The field " << fieldId << " has an invalid reference to itself. " 25 25 << "Use the keyword \"this\" if you want to reference the input data sent to this field."); … … 29 29 } 30 30 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", 32 32 << "The field " << fieldId << " does not exist."); 33 33 … … 39 39 { /* Nothing to do */ } 40 40 41 boost::shared_ptr<COutputPin> CFilterTemporalFieldExprNode::reduce(CGarbageCollector& gc, CField& thisField) const42 { 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; 44 44 45 45 if (fieldId == "this") … … 49 49 CField* field = CField::get(fieldId); 50 50 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", 52 52 << "The field " << fieldId << " has an invalid reference to itself. " 53 53 << "Use the keyword \"this\" if you want to reference the input data sent to this field."); … … 57 57 } 58 58 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", 60 60 << "The field " << fieldId << " does not exist."); 61 61 … … 72 72 } 73 73 74 boost::shared_ptr<COutputPin> CFilterUnaryOpExprNode::reduce(CGarbageCollector& gc, CField& thisField) const75 { 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)); 77 77 child->reduce(gc, thisField)->connectOutput(filter, 0); 78 78 return filter; … … 89 89 } 90 90 91 boost::shared_ptr<COutputPin> CFilterScalarFieldOpExprNode::reduce(CGarbageCollector& gc, CField& thisField) const92 { 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())); 94 94 child2->reduce(gc, thisField)->connectOutput(filter, 0); 95 95 return filter; … … 106 106 } 107 107 108 boost::shared_ptr<COutputPin> CFilterFieldScalarOpExprNode::reduce(CGarbageCollector& gc, CField& thisField) const109 { 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())); 111 111 child1->reduce(gc, thisField)->connectOutput(filter, 0); 112 112 return filter; … … 123 123 } 124 124 125 boost::shared_ptr<COutputPin> CFilterFieldFieldOpExprNode::reduce(CGarbageCollector& gc, CField& thisField) const126 { 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)); 128 128 child1->reduce(gc, thisField)->connectOutput(filter, 0); 129 129 child2->reduce(gc, thisField)->connectOutput(filter, 1); … … 145 145 } 146 146 147 boost::shared_ptr<COutputPin> CFilterScalarScalarFieldOpExprNode::reduce(CGarbageCollector& gc, CField& thisField) const148 { 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())); 150 150 child3->reduce(gc, thisField)->connectOutput(filter, 0); 151 151 return filter; … … 164 164 } 165 165 166 boost::shared_ptr<COutputPin> CFilterScalarFieldScalarOpExprNode::reduce(CGarbageCollector& gc, CField& thisField) const167 { 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())); 169 169 child2->reduce(gc, thisField)->connectOutput(filter, 0); 170 170 return filter; … … 183 183 } 184 184 185 boost::shared_ptr<COutputPin> CFilterScalarFieldFieldOpExprNode::reduce(CGarbageCollector& gc, CField& thisField) const186 { 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())); 188 188 child2->reduce(gc, thisField)->connectOutput(filter, 0); 189 189 child3->reduce(gc, thisField)->connectOutput(filter, 1); … … 204 204 } 205 205 206 boost::shared_ptr<COutputPin> CFilterFieldScalarScalarOpExprNode::reduce(CGarbageCollector& gc, CField& thisField) const207 { 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())); 209 209 child1->reduce(gc, thisField)->connectOutput(filter, 0); 210 210 return filter; … … 224 224 } 225 225 226 boost::shared_ptr<COutputPin> CFilterFieldScalarFieldOpExprNode::reduce(CGarbageCollector& gc, CField& thisField) const227 { 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())); 229 229 child1->reduce(gc, thisField)->connectOutput(filter, 0); 230 230 child3->reduce(gc, thisField)->connectOutput(filter, 1); … … 245 245 } 246 246 247 boost::shared_ptr<COutputPin> CFilterFieldFieldScalarOpExprNode::reduce(CGarbageCollector& gc, CField& thisField) const248 { 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())); 250 250 child1->reduce(gc, thisField)->connectOutput(filter, 0); 251 251 child2->reduce(gc, thisField)->connectOutput(filter, 1); … … 265 265 } 266 266 267 boost::shared_ptr<COutputPin> CFilterFieldFieldFieldOpExprNode::reduce(CGarbageCollector& gc, CField& thisField) const268 { 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)); 270 270 child1->reduce(gc, thisField)->connectOutput(filter, 0); 271 271 child2->reduce(gc, thisField)->connectOutput(filter, 1); -
XIOS/trunk/src/parse_expr/filter_expr_node.hpp
r1158 r1542 3 3 4 4 #include <string> 5 #include <boost/shared_ptr.hpp>6 5 #include <boost/smart_ptr/scoped_ptr.hpp> 7 6 #include "scalar_expr_node.hpp" … … 26 25 * \return the output pin of the filter producing the result of the expression 27 26 */ 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; 29 28 }; 30 29 … … 43 42 CFilterFieldExprNode(const std::string& fieldId); 44 43 45 virtual boost::shared_ptr<COutputPin> reduce(CGarbageCollector& gc, CField& thisField) const;44 virtual std::shared_ptr<COutputPin> reduce(CGarbageCollector& gc, CField& thisField) const; 46 45 47 46 private: … … 64 63 CFilterTemporalFieldExprNode(const std::string& fieldId); 65 64 66 virtual boost::shared_ptr<COutputPin> reduce(CGarbageCollector& gc, CField& thisField) const;65 virtual std::shared_ptr<COutputPin> reduce(CGarbageCollector& gc, CField& thisField) const; 67 66 68 67 private: … … 87 86 CFilterUnaryOpExprNode(const std::string& opId, IFilterExprNode* child); 88 87 89 virtual boost::shared_ptr<COutputPin> reduce(CGarbageCollector& gc, CField& thisField) const;88 virtual std::shared_ptr<COutputPin> reduce(CGarbageCollector& gc, CField& thisField) const; 90 89 91 90 private: … … 112 111 CFilterScalarFieldOpExprNode(IScalarExprNode* child1, const std::string& opId, IFilterExprNode* child2); 113 112 114 virtual boost::shared_ptr<COutputPin> reduce(CGarbageCollector& gc, CField& thisField) const;113 virtual std::shared_ptr<COutputPin> reduce(CGarbageCollector& gc, CField& thisField) const; 115 114 116 115 private: … … 138 137 CFilterFieldScalarOpExprNode(IFilterExprNode* child1, const std::string& opId, IScalarExprNode* child2); 139 138 140 virtual boost::shared_ptr<COutputPin> reduce(CGarbageCollector& gc, CField& thisField) const;139 virtual std::shared_ptr<COutputPin> reduce(CGarbageCollector& gc, CField& thisField) const; 141 140 142 141 private: … … 163 162 CFilterFieldFieldOpExprNode(IFilterExprNode* child1, const std::string& opId, IFilterExprNode* child2); 164 163 165 virtual boost::shared_ptr<COutputPin> reduce(CGarbageCollector& gc, CField& thisField) const;164 virtual std::shared_ptr<COutputPin> reduce(CGarbageCollector& gc, CField& thisField) const; 166 165 167 166 private: … … 191 190 CFilterScalarScalarFieldOpExprNode(IScalarExprNode* child1, const std::string& opId, IScalarExprNode* child2, IFilterExprNode* child3); 192 191 193 virtual boost::shared_ptr<COutputPin> reduce(CGarbageCollector& gc, CField& thisField) const;192 virtual std::shared_ptr<COutputPin> reduce(CGarbageCollector& gc, CField& thisField) const; 194 193 195 194 private: … … 220 219 CFilterScalarFieldScalarOpExprNode(IScalarExprNode* child1, const std::string& opId, IFilterExprNode* child2, IScalarExprNode* child3); 221 220 222 virtual boost::shared_ptr<COutputPin> reduce(CGarbageCollector& gc, CField& thisField) const;221 virtual std::shared_ptr<COutputPin> reduce(CGarbageCollector& gc, CField& thisField) const; 223 222 224 223 private: … … 249 248 CFilterScalarFieldFieldOpExprNode(IScalarExprNode* child1, const std::string& opId, IFilterExprNode* child2, IFilterExprNode* child3); 250 249 251 virtual boost::shared_ptr<COutputPin> reduce(CGarbageCollector& gc, CField& thisField) const;250 virtual std::shared_ptr<COutputPin> reduce(CGarbageCollector& gc, CField& thisField) const; 252 251 253 252 private: … … 279 278 CFilterFieldScalarScalarOpExprNode(IFilterExprNode* child1, const std::string& opId, IScalarExprNode* child2, IScalarExprNode* child3); 280 279 281 virtual boost::shared_ptr<COutputPin> reduce(CGarbageCollector& gc, CField& thisField) const;280 virtual std::shared_ptr<COutputPin> reduce(CGarbageCollector& gc, CField& thisField) const; 282 281 283 282 private: … … 308 307 CFilterFieldScalarFieldOpExprNode(IFilterExprNode* child1, const std::string& opId, IScalarExprNode* child2, IFilterExprNode* child3); 309 308 310 virtual boost::shared_ptr<COutputPin> reduce(CGarbageCollector& gc, CField& thisField) const;309 virtual std::shared_ptr<COutputPin> reduce(CGarbageCollector& gc, CField& thisField) const; 311 310 312 311 private: … … 336 335 CFilterFieldFieldScalarOpExprNode(IFilterExprNode* child1, const std::string& opId, IFilterExprNode* child2, IScalarExprNode* child3); 337 336 338 virtual boost::shared_ptr<COutputPin> reduce(CGarbageCollector& gc, CField& thisField) const;337 virtual std::shared_ptr<COutputPin> reduce(CGarbageCollector& gc, CField& thisField) const; 339 338 340 339 private: … … 365 364 CFilterFieldFieldFieldOpExprNode(IFilterExprNode* child1, const std::string& opId, IFilterExprNode* child2, IFilterExprNode* child3); 366 365 367 virtual boost::shared_ptr<COutputPin> reduce(CGarbageCollector& gc, CField& thisField) const;366 virtual std::shared_ptr<COutputPin> reduce(CGarbageCollector& gc, CField& thisField) const; 368 367 369 368 private: -
XIOS/trunk/src/server.cpp
r1519 r1542 791 791 if (!fb->is_open()) 792 792 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)."); 794 794 } 795 795 -
XIOS/trunk/src/server_distribution_description.cpp
r1312 r1542 196 196 \param [in] positionDimensionDistributed dimension of server on which we make the cut. 197 197 */ 198 std::vector<int> CServerDistributionDescription::computeServerGlobalByElement(std::vector< boost::unordered_map<size_t,std::vector<int> > >& indexServerOnElement,198 std::vector<int> CServerDistributionDescription::computeServerGlobalByElement(std::vector<std::unordered_map<size_t,std::vector<int> > >& indexServerOnElement, 199 199 int clientRank, 200 200 int clientSize, … … 510 510 Get global index calculated by computeServerGlobalIndexInRange 511 511 */ 512 const boost::unordered_map<size_t,int>& CServerDistributionDescription::getGlobalIndexRange() const512 const std::unordered_map<size_t,int>& CServerDistributionDescription::getGlobalIndexRange() const 513 513 { 514 514 return globalIndex_; -
XIOS/trunk/src/server_distribution_description.hpp
r1258 r1542 13 13 #include "xios_spl.hpp" 14 14 #include "array_new.hpp" 15 #include < boost/unordered_map.hpp>15 #include <unordered_map> 16 16 17 17 namespace xios … … 39 39 void computeServerDistribution(bool doComputeGlobalIndex = false, int positionDimensionDistributed = 1); 40 40 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, 42 42 int rank, 43 43 int clientSize, … … 48 48 std::vector<std::vector<int> > getServerDimensionSizes() const; 49 49 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; 51 51 int getDimensionDistributed(); 52 52 … … 73 73 74 74 //!< 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_; 76 76 77 77 //!< Type of distribution on server side -
XIOS/trunk/src/transformation/axis_algorithm_inverse.cpp
r936 r1542 108 108 } 109 109 110 typedef boost::unordered_map<size_t, std::vector<double> > GlobalIndexMapFromSrcToDest;110 typedef std::unordered_map<size_t, std::vector<double> > GlobalIndexMapFromSrcToDest; 111 111 GlobalIndexMapFromSrcToDest globalIndexMapFromSrcToDest; 112 112 TransformationIndexMap& transMap = this->transformationMapping_[0]; … … 126 126 dhtIndexProcRank.computeIndexInfoMapping(globalSrcIndex); 127 127 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; 129 129 for (int idx = 0; idx < localIndex; ++idx) 130 130 { … … 137 137 } 138 138 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, 140 140 iteIndex = globalSrcIndexSendToProc.end(); 141 141 std::map<int,int> sendRankSizeMap,recvRankSizeMap; … … 175 175 std::vector<MPI_Request> requests; 176 176 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; 179 179 for (std::map<int,int>::const_iterator itRecv = recvRankSizeMap.begin(); itRecv != recvRankSizeMap.end(); ++itRecv) 180 180 { … … 188 188 } 189 189 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; 192 192 for (itIndex = itbIndex; itIndex != iteIndex; ++itIndex) 193 193 { … … 271 271 delete [] recvSizeBuff; 272 272 273 boost::unordered_map<int, double* >::const_iterator itChar;273 std::unordered_map<int, double* >::const_iterator itChar; 274 274 for (itChar = sendValueToDest.begin(); itChar != sendValueToDest.end(); ++itChar) 275 275 delete [] itChar->second; 276 276 for (itChar = recvValueFromSrc.begin(); itChar != recvValueFromSrc.end(); ++itChar) 277 277 delete [] itChar->second; 278 boost::unordered_map<int, unsigned long* >::const_iterator itLong;278 std::unordered_map<int, unsigned long* >::const_iterator itLong; 279 279 for (itLong = sendGlobalIndexSrc.begin(); itLong != sendGlobalIndexSrc.end(); ++itLong) 280 280 delete [] itLong->second; -
XIOS/trunk/src/transformation/domain_algorithm_interpolate.cpp
r1480 r1542 8 8 */ 9 9 #include "domain_algorithm_interpolate.hpp" 10 #include < boost/unordered_map.hpp>10 #include <unordered_map> 11 11 #include "context.hpp" 12 12 #include "context_client.hpp" … … 536 536 TransformationWeightMap& transWeight = this->transformationWeight_[0]; 537 537 538 boost::unordered_map<size_t,int> globalIndexOfDomainDest;538 std::unordered_map<size_t,int> globalIndexOfDomainDest; 539 539 int ni = domainDest_->ni.getValue(); 540 540 int nj = domainDest_->nj.getValue(); -
XIOS/trunk/src/transformation/generic_algorithm_transformation.cpp
r1480 r1542 165 165 int nbClient = client->clientSize; 166 166 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; 168 168 int idx; 169 169 … … 287 287 if (idx != elementPositionInGrid) 288 288 { 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, 290 290 ite = globalElementIndexOnProc_[idx].end(); 291 291 for (it = itb; it != ite; ++it) it->second.resize(1); … … 301 301 if (idx != elementPositionInGrid) 302 302 { 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, 304 304 ite = globalElementIndexOnProc_[idx].end(); 305 305 for (it = itb; it != ite; ++it) procOfNonTransformedElements_.insert(it->first); … … 359 359 set<int> tmpSet ; 360 360 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, 362 362 ite = globalElementIndexOnProc_[idx].end(); 363 363 for (it = itb; it != ite; ++it) … … 395 395 396 396 // 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]); 398 398 std::set<int> tmpCounter; 399 399 itTransWeight = itbTransWeight; … … 426 426 if (idx != elementPositionInGrid) 427 427 { 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, 429 429 ite = globalElementIndexOnProc_[idx].end(); 430 430 for (it = itb; it != ite; ++it) it->second[0] = transPos(idxTrans); … … 456 456 void CGenericAlgorithmTransformation::computeGlobalGridIndexMapping(int elementPositionInGrid, 457 457 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, 459 459 CGrid* gridSrc, 460 460 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, 462 462 SourceDestinationIndexMap& globaIndexWeightFromSrcToDst) 463 463 { … … 615 615 616 616 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 ; 618 618 std::vector<std::pair<size_t,double> >::iterator vectIt,vectIte ; 619 619 … … 653 653 CScalar* scalarSrc, 654 654 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) 656 656 { 657 657 CContext* context = CContext::getCurrent(); … … 677 677 CAxis* axisSrc, 678 678 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) 680 680 { 681 681 CContext* context = CContext::getCurrent(); … … 746 746 CDomain* domainSrc, 747 747 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) 749 749 { 750 750 CContext* context = CContext::getCurrent(); -
XIOS/trunk/src/transformation/generic_algorithm_transformation.hpp
r1420 r1542 38 38 public: 39 39 // 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; 41 41 42 42 protected: 43 typedef boost::unordered_map<size_t,int> GlobalLocalMap;43 typedef std::unordered_map<size_t,int> GlobalLocalMap; 44 44 protected: 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; 48 48 49 49 public: … … 108 108 void computeGlobalGridIndexMapping(int elementPositionInGrid, 109 109 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, 111 111 CGrid* gridDst, 112 112 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, 114 114 SourceDestinationIndexMap& globaIndexWeightFromSrcToDst); 115 115 … … 117 117 CDomain* domainSrc, 118 118 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); 120 120 121 121 void computeExchangeAxisIndex(CAxis* axisDst, 122 122 CAxis* axisSrc, 123 123 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); 125 125 126 126 void computeExchangeScalarIndex(CScalar* scalarDst, 127 127 CScalar* scalarSrc, 128 128 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); 130 130 131 131 void computePositionElements(CGrid* dst, CGrid* src); … … 151 151 std::set<StdSize> indexElementSrc_; 152 152 153 std::vector< boost::unordered_map<int,std::vector<size_t> > > globalElementIndexOnProc_;153 std::vector<std::unordered_map<int,std::vector<size_t> > > globalElementIndexOnProc_; 154 154 155 155 std::vector<int> procContainSrcElementIdx_; // List of processes containing source index of transformed elements -
XIOS/trunk/src/transformation/grid_transformation.cpp
r1412 r1542 15 15 #include "mpi_tag.hpp" 16 16 #include "grid.hpp" 17 #include < boost/unordered_map.hpp>17 #include <unordered_map> 18 18 #include "timer.hpp" 19 19 … … 479 479 SourceDestinationIndexMap::const_iterator itbIndex = globaIndexWeightFromSrcToDst.begin(), 480 480 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; 482 482 std::map<int,int> sendRankSizeMap,recvRankSizeMap; 483 483 int connectedClient = globaIndexWeightFromSrcToDst.size(); … … 522 522 std::vector<MPI_Request> requests; 523 523 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; 526 526 for (std::map<int,int>::const_iterator itRecv = recvRankSizeMap.begin(); itRecv != recvRankSizeMap.end(); ++itRecv) 527 527 { … … 537 537 } 538 538 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; 543 543 for (itIndex = itbIndex; itIndex != iteIndex; ++itIndex) 544 544 { … … 670 670 delete [] recvSizeBuff; 671 671 672 boost::unordered_map<int, unsigned char* >::const_iterator itChar;672 std::unordered_map<int, unsigned char* >::const_iterator itChar; 673 673 for (itChar = sendMaskDst.begin(); itChar != sendMaskDst.end(); ++itChar) 674 674 delete [] itChar->second; 675 675 for (itChar = recvMaskDst.begin(); itChar != recvMaskDst.end(); ++itChar) 676 676 delete [] itChar->second; 677 boost::unordered_map<int, unsigned long* >::const_iterator itLong;677 std::unordered_map<int, unsigned long* >::const_iterator itLong; 678 678 for (itLong = sendGlobalIndexSrc.begin(); itLong != sendGlobalIndexSrc.end(); ++itLong) 679 679 delete [] itLong->second; -
XIOS/trunk/src/xios_spl.hpp
r1158 r1542 6 6 #include <string> 7 7 #include <algorithm> 8 #include <unordered_map> 9 #include <memory> 8 10 9 11 // standard C … … 28 30 29 31 /// boost headers /// 30 #include <boost/unordered_map.hpp>31 #include <boost/shared_ptr.hpp>32 32 #include <boost/cast.hpp> 33 33 /// Map ///
Note: See TracChangeset
for help on using the changeset viewer.