4 #define USE_UNORDERED_MAP 1
5 //#undef USE_UNORDERED_MAP
8 #ifdef USE_UNORDERED_MAP
9 # include <tr1/unordered_map>
10 # define MAP_TEMPLATE std::tr1::unordered_map
13 # define MAP_TEMPLATE std::map
16 #include "communicator.h"
21 process(int argc, char* argv[]);
26 typedef std::vector<neighbor> neigh_type;
27 typedef std::vector<neighbor*> pneigh_type;
33 typedef MAP_TEMPLATE<m_host_t, neighbor*> rev_neigh_type;
35 rev_neigh_type rev_neigh;
38 int ctrl_close_pending;
39 int data_close_pending;
46 double sum_of_to_send() const;
47 virtual double load_balance(double my_load);
50 void send1_no_bookkeeping(neighbor& nb);
51 void send1_bookkeeping(neighbor& nb);
53 bool receive(bool wait_for_close);
54 void finalize1(neighbor& nb);
56 void print_loads(e_xbt_log_priority_t logp = xbt_log_priority_info);
58 void insert_neighbor_in_map(neighbor& nb);