PaCO++
0.05
|
#include <CommunicationScheduling.h>
Public Member Functions | |
virtual void | clearAllSchedules () |
virtual void | clearScheduleId (long id) throw (InvalidArgument) |
virtual paco_comSchedule * | computeScheduling (unsigned rank, PaCO::PacoTopology_t *srctopo, PaCO::PacoTopology_t *dsttopo, unsigned **com_matrix, void **info_vector[])=0 |
virtual void | displayStatus () |
paco_comSchedule * | getSchedule (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 |
paco_comScheduling is able to compute scheduling, represented by paco_comSchedule
Definition at line 27 of file CommunicationScheduling.h.
typedef map<long, paco_comSchedule*> paco_comScheduling::_schedule_info_map_t [protected] |
Definition at line 56 of file CommunicationScheduling.h.
Definition at line 3 of file CommunicationScheduling.cc.
{}
paco_comScheduling::~paco_comScheduling | ( | ) | [virtual] |
Definition at line 5 of file CommunicationScheduling.cc.
{}
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().
{ #ifdef DEBUG_INTERNAL std::cerr <<"[INFO] clearing all schedule memories\n"; #endif for(_schedule_info_map_t::iterator it = _schedule_info_map.begin(); it!= _schedule_info_map.end(); it++) { delete it->second; } _schedule_info_map.clear(); }
void paco_comScheduling::clearScheduleId | ( | long | id | ) | throw (InvalidArgument) [virtual] |
Definition at line 26 of file CommunicationScheduling.cc.
{ if (id<0) throw new InvalidArgument("clearScheduleMemeoryId expects an id >0"); #ifdef DEBUG_INTERNAL std::cerr <<"[INFO] clearing schedule memory Id "<<id<<endl; #endif _schedule_info_map_t::iterator it = _schedule_info_map.find(id); if (it != _schedule_info_map.end()) { delete _schedule_info_map[id]; _schedule_info_map.erase(it); } }
virtual paco_comSchedule* paco_comScheduling::computeScheduling | ( | unsigned | rank, |
PaCO::PacoTopology_t * | srctopo, | ||
PaCO::PacoTopology_t * | dsttopo, | ||
unsigned ** | com_matrix, | ||
void ** | info_vector[] | ||
) | [pure virtual] |
Implemented in paco_comScheduling_libgraph, and paco_comScheduling_direct.
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.
{ cerr << this << " ctopo: "<<_client_topo<<" - "<<_client_topo->total<< " stopo: "<<_server_topo<<" - "<<_server_topo->total << " map: "<< _schedule_info_map.size() << endl; }
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.
{ _schedule_info_map_t::iterator it = _schedule_info_map.find(id); if (it != _schedule_info_map.end()) { return it->second; } else return NULL; }
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.
{ std::cerr << "[Debug] doing all-2-all communication, #phases: " << op->mytopo.total << endl; int size_temp_vector = sizeof(unsigned) * op->serveur_topo_aller.total;; for (unsigned i = 0; i < op->mytopo.total; i++) { std::cerr << "[Debug] all-2-all phase: "<<i<<" sz:"<<size_temp_vector<< endl; op->my_com->paco_bcast((void*) comMatrix[i], size_temp_vector, i); } }
void paco_comScheduling::setSchedule | ( | long | id, |
paco_comSchedule * | cs | ||
) | [virtual] |
Definition at line 20 of file CommunicationScheduling.cc.
{
// _schedule_info_map[id] = cs;
}
PaCO::PacoTopology_t* paco_comScheduling::_client_topo [protected] |
Definition at line 52 of file CommunicationScheduling.h.
Referenced by displayStatus().
Definition at line 57 of file CommunicationScheduling.h.
Referenced by clearAllSchedules(), displayStatus(), and getSchedule().
PaCO::PacoTopology_t* paco_comScheduling::_server_topo [protected] |
Definition at line 53 of file CommunicationScheduling.h.
Referenced by displayStatus().