PaCO++  0.05
paco_comScheduling_direct Class Reference

#include <paco_direct_comScheduling.h>

Inheritance diagram for paco_comScheduling_direct:
Inheritance graph
Collaboration diagram for paco_comScheduling_direct:
Collaboration graph

Public Member Functions

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

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

Definition at line 27 of file paco_direct_comScheduling.h.

Member Typedef Documentation

◆ _schedule_info_map_t

typedef map<long, paco_comSchedule*> paco_comScheduling::_schedule_info_map_t
protectedinherited

Definition at line 56 of file CommunicationScheduling.h.

Constructor & Destructor Documentation

◆ paco_comScheduling_direct()

paco_comScheduling_direct::paco_comScheduling_direct ( )
inline

Definition at line 31 of file paco_direct_comScheduling.h.

31 {};

◆ ~paco_comScheduling_direct()

paco_comScheduling_direct::~paco_comScheduling_direct ( )
virtual

Definition at line 33 of file paco_direct_comScheduling.cc.

34 {
35 }

Member Function Documentation

◆ clearAllSchedules()

void paco_comScheduling::clearAllSchedules ( )
virtualinherited

Definition at line 44 of file CommunicationScheduling.cc.

References paco_comScheduling::_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
)
virtualinherited

Definition at line 26 of file CommunicationScheduling.cc.

References paco_comScheduling::_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()

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

Implements paco_comScheduling.

Definition at line 38 of file paco_direct_comScheduling.cc.

References paco_comSchedule_direct::paco_comSchedule_direct(), and PaCO::PacoTopology_s::total.

41 {
42  // cerr << __FUNCTION__ << " : rank: "<<rank<<" srvtopo: "<<dsttopo->total<<endl;
43  return new paco_comSchedule_direct(rank, dsttopo->total, com_matrix[rank], info_vector);
44 }
unsigned long total
Definition: PaCO++.idl:35
Here is the call graph for this function:

◆ displayStatus()

void paco_comScheduling::displayStatus ( )
virtualinherited

Definition at line 70 of file CommunicationScheduling.cc.

References paco_comScheduling::_client_topo, paco_comScheduling::_schedule_info_map, paco_comScheduling::_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)
inherited

return NULL if schedule id is unknown

Definition at line 8 of file CommunicationScheduling.cc.

References paco_comScheduling::_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_direct::propageComMatrix ( PaCO_operation op,
unsigned **  comMatrix 
)
inlinevirtual

Reimplemented from paco_comScheduling.

Definition at line 38 of file paco_direct_comScheduling.h.

38 { /* overloading all-2-all: no propagation needed for direct */}

◆ setSchedule()

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

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
protectedinherited

Definition at line 52 of file CommunicationScheduling.h.

Referenced by paco_comScheduling::displayStatus().

◆ _schedule_info_map

◆ _server_topo

PaCO::PacoTopology_t* paco_comScheduling::_server_topo
protectedinherited

Definition at line 53 of file CommunicationScheduling.h.

Referenced by paco_comScheduling::displayStatus().


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