Ignore:
Timestamp:
03/23/16 16:11:06 (5 years ago)
Author:
mhnguyen
Message:

Implementing pack and unpack function for generic type of dht

+) Replace union with the more generic function for packing data into buffer and unpacking data from buffer
+) Change PairIntInt? from struct to std::pair<int,int>

Test
+) On Curie
+) All tests pass

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/trunk/src/client_client_dht_template.hpp

    r829 r830  
    1616#include "policy.hpp" 
    1717#include <boost/unordered_map.hpp> 
    18 //#include "utils.hpp" 
    1918#include "dht_data_types.hpp" 
    2019 
     
    3938 
    4039  public: 
    41     /** Default constructor */ 
    4240    CClientClientDHTTemplate(const Index2InfoTypeMap& indexInfoInitMap, 
    4341                             const MPI_Comm& clientIntraComm, 
     
    4644    void computeIndexInfoMapping(const CArray<size_t,1>& indices); 
    4745 
    48     const Index2InfoTypeMap& getInfoIndexMap() const {return infoIndexMapping_; } 
     46    const Index2InfoTypeMap& getInfoIndexMap() const {return indexToInfoMappingLevel_; } 
    4947 
    5048    /** Default destructor */ 
     
    7472                                     const int recvNbIndexCount, 
    7573                                     int& countIndexServer, 
    76                                      std::map<int, unsigned char*>& indexServerBuffBegin, 
     74                                     std::map<int, unsigned char*>& infoBuffBegin, 
    7775                                     std::map<int, MPI_Request>& requestRecvIndexServer, 
    7876                                     const MPI_Comm& intraComm); 
    7977 
    80     // Send server index to clients 
    81     void sendInfoToClients(int clientDestRank, std::vector<InfoType>& indexServer, 
     78    // Send information to clients 
     79    void sendInfoToClients(int clientDestRank, unsigned char* info, int infoSize, 
    8280                           const MPI_Comm& clientIntraComm, std::list<MPI_Request>& requestSendIndexServer); 
    8381 
     
    9997    Index2InfoTypeMap index2InfoMapping_; 
    10098 
    101     //! A temporary mapping of index to the corresponding information in each level of hierarchy 
     99    //! A mapping of index to the corresponding information in each level of hierarchy 
    102100    Index2InfoTypeMap indexToInfoMappingLevel_; 
    103  
    104     //! Data (information) corresponding to global index 
    105     Index2InfoTypeMap infoIndexMapping_; 
    106101 
    107102    //! intracommuntion of clients 
Note: See TracChangeset for help on using the changeset viewer.