Changeset 829 for XIOS/trunk/src/client_server_mapping.hpp
- Timestamp:
- 03/23/16 16:11:01 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/trunk/src/client_server_mapping.hpp
r598 r829 13 13 #include "array_new.hpp" 14 14 #include "mpi.hpp" 15 #include <boost/unordered_map.hpp> 15 16 16 17 namespace xios { … … 23 24 class CClientServerMapping 24 25 { 26 public: 27 typedef boost::unordered_map<int, std::vector<size_t> > GlobalIndexMap; 28 typedef std::map<int, std::vector<int> > LocalIndexMap; 25 29 public: 26 30 /** Default constructor */ … … 33 37 virtual void computeServerIndexMapping(const CArray<size_t,1>& globalIndexOnClient) = 0; 34 38 35 // // In case of computing local index on client sent to server39 // // Simple case, global index on client and index on servers 36 40 // virtual void computeServerIndexMapping(const CArray<size_t,1>& globalIndexOnClient, 37 // const CArray<int,1>& localIndexOnClient) = 0; 38 39 // Simple case, global index on client and index on servers 40 virtual void computeServerIndexMapping(const CArray<size_t,1>& globalIndexOnClient, 41 const std::vector<CArray<size_t,1>* >& globalIndexOnServer); 41 // const std::vector<CArray<size_t,1>* >& globalIndexOnServer); 42 42 43 43 static std::map<int,int> computeConnectedClients(int nbServer, int nbClient, … … 45 45 const std::vector<int>& connectedServerRank); 46 46 47 const std::map<int, std::vector<size_t> >& getGlobalIndexOnServer() const;48 const std::map<int, std::vector<int> >& getLocalIndexSendToServer() const;47 const GlobalIndexMap& getGlobalIndexOnServer() const; 48 // const LocalIndexMap& getLocalIndexSendToServer() const; 49 49 50 50 protected: 51 void defaultComputeServerIndexMapping(const CArray<size_t,1>& globalIndexOnClient,52 const std::vector<CArray<size_t,1>* >& globalIndexOnServer,53 const CArray<int,1>* localIndexOnClient = 0);51 // void defaultComputeServerIndexMapping(const CArray<size_t,1>& globalIndexOnClient, 52 // const std::vector<CArray<size_t,1>* >& globalIndexOnServer, 53 // const CArray<int,1>* localIndexOnClient = 0); 54 54 55 55 protected: 56 56 //! Global index of data on SERVER, which are calculated by client(s) 57 std::map<int, std::vector<size_t> >indexGlobalOnServer_;57 GlobalIndexMap indexGlobalOnServer_; 58 58 59 59 //! Index of the local data which will be sent to the corresponding server(s) 60 std::map<int, std::vector<int> >localIndexSend2Server_;60 // LocalIndexMap localIndexSend2Server_; 61 61 62 62 //!< Number of clients connected to a server
Note: See TracChangeset
for help on using the changeset viewer.