source: XIOS/trunk/src/client_server_mapping_distributed.hpp @ 1627

Last change on this file since 1627 was 1542, checked in by oabramkina, 6 years ago

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

Two notes for Curie:

  • one can see the content of unordered_map with ddt only if XIOS has been compiled with gnu
  • XIOS will not compile any more with pgi (all available versions use old STL which are not up to the c++11 norms)
File size: 1.8 KB
Line 
1/*!
2   \file client_server_mapping.hpp
3   \author Ha NGUYEN
4   \since 27 Feb 2015
5   \date 09 Mars 2015
6
7   \brief Mapping between index client and server.
8   Clients pre-calculate all information of server distribution.
9 */
10
11#ifndef __XIOS_CLIENT_SERVER_MAPPING_DISTRIBUTED_HPP__
12#define __XIOS_CLIENT_SERVER_MAPPING_DISTRIBUTED_HPP__
13
14#include <client_server_mapping.hpp>
15#include "xios_spl.hpp"
16#include "array_new.hpp"
17#include "mpi.hpp"
18#include <unordered_map>
19#include "client_client_dht_template.hpp"
20
21namespace xios
22{
23/*!
24  \class CClientServerMappingDistributed
25  This class computes index of data which are sent to server as well as index of data
26on server side with a distributed alogrithm. Each client has a piece of information about the distribution
27of servers. To find out all these info, first of all, all client join a discovering process in which each client
28announces the others about the info they have as well as demand others info they are lacked of. After this process,
29each client has enough info to decide to which client it need to send a demand for corresponding server of a global index.
30The alogrithm depends on hashed index.
31*/
32class CClientServerMappingDistributed : public CClientServerMapping
33{
34  public:
35    /** Default constructor */
36    CClientServerMappingDistributed(const std::unordered_map<size_t,int>& globalIndexOfServer,
37                                    const MPI_Comm& clientIntraComm,
38                                    bool isDataDistributed = true);
39
40    virtual void computeServerIndexMapping(const CArray<size_t,1>& globalIndexOnClientSendToServer, int nbServer);
41
42    /** Default destructor */
43    virtual ~CClientServerMappingDistributed();
44
45  protected:
46    CClientClientDHTInt* ccDHT_;
47};
48
49} // namespace xios
50#endif // __XIOS_CLIENT_SERVER_MAPPING_DISTRIBUTED_HPP__
Note: See TracBrowser for help on using the repository browser.