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;
34 enum recv_wait_mode { NO_WAIT = 0, WAIT, WAIT_FOR_CLOSE };
36 rev_neigh_type rev_neigh;
39 int ctrl_close_pending;
40 int data_close_pending;
44 double prev_load_broadcast;
48 double sum_of_to_send() const;
49 virtual double load_balance(double my_load);
52 void send1_no_bookkeeping(neighbor& nb);
53 void send1_bookkeeping(neighbor& nb);
55 bool receive(recv_wait_mode wait);
56 void finalize1(neighbor& nb);
58 void print_loads(e_xbt_log_priority_t logp = xbt_log_priority_info);