PaCO++  0.05
paco_comScheduling Class Reference

#include <CommunicationScheduling.h>

Inheritance diagram for paco_comScheduling:
Collaboration diagram for paco_comScheduling:

List of all members.

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

Definition at line 56 of file CommunicationScheduling.h.


Constructor & Destructor Documentation

Definition at line 5 of file CommunicationScheduling.cc.

{}

Member Function Documentation

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]

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;
}

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);
    }
}

Here is the call graph for this function:

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

Definition at line 20 of file CommunicationScheduling.cc.

{
  //  _schedule_info_map[id] = cs;
}

Member Data Documentation


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