PaCO++  0.05
paco_comScheduling Class Referenceabstract

#include <CommunicationScheduling.h>

Inheritance diagram for paco_comScheduling:
Inheritance graph
Collaboration diagram for paco_comScheduling:
Collaboration graph

Public Member Functions

virtual void clearAllSchedules ()
 
virtual void clearScheduleId (long id) throw (InvalidArgument)
 
virtual paco_comSchedulecomputeScheduling (unsigned rank, PaCO::PacoTopology_t *srctopo, PaCO::PacoTopology_t *dsttopo, unsigned **com_matrix, void **info_vector[])=0
 
virtual void displayStatus ()
 
paco_comSchedulegetSchedule (long id)
 
 paco_comScheduling ()
 
virtual void propageComMatrix (PaCO_operation *op, unsigned **comMatrix)
 
virtual void setSchedule (long id, paco_comSchedule *cs)
 
virtual ~paco_comScheduling ()
 

Protected Types

typedef map< long, paco_comSchedule * > _schedule_info_map_t
 

Protected Attributes

PaCO::PacoTopology_t_client_topo
 
_schedule_info_map_t _schedule_info_map
 
PaCO::PacoTopology_t_server_topo
 

Detailed Description

paco_comScheduling is able to compute scheduling, represented by paco_comSchedule

Definition at line 27 of file CommunicationScheduling.h.

Member Typedef Documentation

◆ _schedule_info_map_t

Definition at line 56 of file CommunicationScheduling.h.

Constructor & Destructor Documentation

◆ paco_comScheduling()

paco_comScheduling::paco_comScheduling ( )

Definition at line 3 of file CommunicationScheduling.cc.

3 {}

◆ ~paco_comScheduling()

paco_comScheduling::~paco_comScheduling ( )
virtual

Definition at line 5 of file CommunicationScheduling.cc.

5 {}

Member Function Documentation

◆ clearAllSchedules()

void paco_comScheduling::clearAllSchedules ( )
virtual

Definition at line 44 of file CommunicationScheduling.cc.

References _schedule_info_map.

Referenced by PaCO_operation::clearAllScheduleMemory(), paco_comScheduling_libgraph::set_beta(), and paco_comScheduling_libgraph::set_k().

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 }
_schedule_info_map_t _schedule_info_map

◆ clearScheduleId()

void paco_comScheduling::clearScheduleId ( long  id)
throw (InvalidArgument
)
virtual

Definition at line 26 of file CommunicationScheduling.cc.

References _schedule_info_map.

Referenced by PaCO_operation::clearCommunicationMemoryId(), and PaCO_operation::clearScheduleMemoryId().

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 }
_schedule_info_map_t _schedule_info_map

◆ computeScheduling()

virtual paco_comSchedule* paco_comScheduling::computeScheduling ( unsigned  rank,
PaCO::PacoTopology_t srctopo,
PaCO::PacoTopology_t dsttopo,
unsigned **  com_matrix,
void **  info_vector[] 
)
pure virtual

◆ displayStatus()

void paco_comScheduling::displayStatus ( )
virtual

Definition at line 70 of file CommunicationScheduling.cc.

References _client_topo, _schedule_info_map, _server_topo, and PaCO::PacoTopology_s::total.

71 {
72  cerr << this << " ctopo: "<<_client_topo<<" - "<<_client_topo->total<< " stopo: "<<_server_topo<<" - "<<_server_topo->total << " map: "<< _schedule_info_map.size() << endl;
73 }
PaCO::PacoTopology_t * _server_topo
PaCO::PacoTopology_t * _client_topo
unsigned long total
Definition: PaCO++.idl:35
_schedule_info_map_t _schedule_info_map

◆ getSchedule()

paco_comSchedule * paco_comScheduling::getSchedule ( long  id)

return NULL if schedule id is unknown

Definition at line 8 of file CommunicationScheduling.cc.

References _schedule_info_map.

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  }
_schedule_info_map_t _schedule_info_map

◆ propageComMatrix()

void paco_comScheduling::propageComMatrix ( PaCO_operation op,
unsigned **  comMatrix 
)
virtual

Reimplemented in paco_comScheduling_direct.

Definition at line 58 of file CommunicationScheduling.cc.

References PaCO_operation::my_com, PaCO_operation::mytopo, paco_com::paco_bcast(), PaCO_operation::serveur_topo_aller, and PaCO::PacoTopology_s::total.

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 }
virtual int paco_bcast(void *buf, int count, int root)=0
PaCO::PacoTopology_t serveur_topo_aller
unsigned long total
Definition: PaCO++.idl:35
PaCO::PacoTopology_t mytopo
Here is the call graph for this function:

◆ setSchedule()

void paco_comScheduling::setSchedule ( long  id,
paco_comSchedule cs 
)
virtual

Definition at line 20 of file CommunicationScheduling.cc.

21 {
22  // _schedule_info_map[id] = cs;
23 }

Member Data Documentation

◆ _client_topo

PaCO::PacoTopology_t* paco_comScheduling::_client_topo
protected

Definition at line 52 of file CommunicationScheduling.h.

Referenced by displayStatus().

◆ _schedule_info_map

_schedule_info_map_t paco_comScheduling::_schedule_info_map
protected

◆ _server_topo

PaCO::PacoTopology_t* paco_comScheduling::_server_topo
protected

Definition at line 53 of file CommunicationScheduling.h.

Referenced by displayStatus().


The documentation for this class was generated from the following files: