PaCO++  0.05
paco_direct_comScheduling.h
Go to the documentation of this file.
1 #ifndef DIRECT_COMSCHEDULE_IS_DEFINED
2 #define DIRECT_COMSCHEDULE_IS_DEFINED
3 
5 
7 {
8 protected:
9  unsigned _myrank;
10  unsigned _nbelement;
11  unsigned *_dst;
12  unsigned *_len;
13  void* *_inf;
14 
15 public:
16  paco_comSchedule_direct(int rank, int max, unsigned *loca_com_vector, void** info_vector[]);
17  virtual ~paco_comSchedule_direct();
18 
19  unsigned int getNbPhases() { return 1; }
20  unsigned int getElementPhase(const unsigned phase) { return _nbelement; }
21  unsigned int getSrc(const unsigned phase, const unsigned id) { return _myrank; }
22  unsigned int getDst(const unsigned phase, const unsigned id) { return _dst[id]; }
23  unsigned int getSize(const unsigned phase, const unsigned id) { return _len[id]; }
24  void* getInfo(const unsigned phase, const unsigned id) { return _inf[id]; }
25 };
26 
28 {
29 
30 public:
32  virtual ~paco_comScheduling_direct();
33 
34  paco_comSchedule* computeScheduling(unsigned rank,
35  PaCO::PacoTopology_t* srctopo, PaCO::PacoTopology_t* dsttopo,
36  unsigned **com_matrix, void** info_vector[]);
37 
38  void propageComMatrix(PaCO_operation* op, unsigned **comMatrix) { /* overloading all-2-all: no propagation needed for direct */}
39 
40 };
41 
43 {
44  public:
46  return new paco_comScheduling_direct();
47  }
48 };
49 
50 #endif
unsigned int getSize(const unsigned phase, const unsigned id)
paco_comScheduling * create_comScheduling()
unsigned int getElementPhase(const unsigned phase)
paco_comSchedule_direct(int rank, int max, unsigned *loca_com_vector, void **info_vector[])
unsigned int getSrc(const unsigned phase, const unsigned id)
unsigned int getDst(const unsigned phase, const unsigned id)
void * getInfo(const unsigned phase, const unsigned id)
void propageComMatrix(PaCO_operation *op, unsigned **comMatrix)