PaCO++  0.05
CommunicationScheduling.cc
Go to the documentation of this file.
2 
4 
6 
9 {
10  _schedule_info_map_t::iterator it = _schedule_info_map.find(id);
11  if (it != _schedule_info_map.end())
12  {
13  return it->second;
14  }
15  else
16  return NULL;
17  }
18 
19 void
21 {
22  // _schedule_info_map[id] = cs;
23 }
24 
25 void
27 {
28  if (id<0)
29  throw new InvalidArgument("clearScheduleMemeoryId expects an id >0");
30 
31 #ifdef DEBUG_INTERNAL
32  std::cerr <<"[INFO] clearing schedule memory Id "<<id<<endl;
33 #endif
34 
35  _schedule_info_map_t::iterator it = _schedule_info_map.find(id);
36  if (it != _schedule_info_map.end())
37  {
38  delete _schedule_info_map[id];
39  _schedule_info_map.erase(it);
40  }
41 }
42 
43 void
45 {
46 #ifdef DEBUG_INTERNAL
47  std::cerr <<"[INFO] clearing all schedule memories\n";
48 #endif
49  for(_schedule_info_map_t::iterator it = _schedule_info_map.begin(); it!= _schedule_info_map.end(); it++)
50  {
51  delete it->second;
52  }
53  _schedule_info_map.clear();
54 }
55 
56 
57 void
59 {
60  std::cerr << "[Debug] doing all-2-all communication, #phases: " << op->mytopo.total << endl;
61  int size_temp_vector = sizeof(unsigned) * op->serveur_topo_aller.total;;
62  for (unsigned i = 0; i < op->mytopo.total; i++)
63  {
64  std::cerr << "[Debug] all-2-all phase: "<<i<<" sz:"<<size_temp_vector<< endl;
65  op->my_com->paco_bcast((void*) comMatrix[i], size_temp_vector, i);
66  }
67 }
68 
69 void
71 {
72  cerr << this << " ctopo: "<<_client_topo<<" - "<<_client_topo->total<< " stopo: "<<_server_topo<<" - "<<_server_topo->total << " map: "<< _schedule_info_map.size() << endl;
73 }
paco_comSchedule * getSchedule(long id)
virtual int paco_bcast(void *buf, int count, int root)=0
PaCO::PacoTopology_t * _server_topo
virtual void clearAllSchedules()
virtual void clearScheduleId(long id)
PaCO::PacoTopology_t * _client_topo
PaCO::PacoTopology_t serveur_topo_aller
unsigned long total
Definition: PaCO++.idl:35
PaCO::PacoTopology_t mytopo
_schedule_info_map_t _schedule_info_map
virtual void propageComMatrix(PaCO_operation *op, unsigned **comMatrix)
virtual void setSchedule(long id, paco_comSchedule *cs)