topology.hpp 1.17 KB
Newer Older
Francois Tessier's avatar
Francois Tessier committed
1 2 3 4 5 6 7 8
#ifndef TOPOLOGY_H
#define TOPOLOGY_H

#include <stdio.h>
#include <stdlib.h>

class iTopology {
 public:
Francois Tessier's avatar
Francois Tessier committed
9 10 11
  /**********************/
  /*  |-- Nodes         */
  /**********************/
Francois Tessier's avatar
Francois Tessier committed
12 13
  virtual int IONodeId () = 0;
  virtual int BridgeNodeId () = 0;
14 15
  virtual int ComputeNodeId () = 0;
  virtual int ProcessPerNode () = 0;
Francois Tessier's avatar
Francois Tessier committed
16 17 18 19 20 21 22 23

  /**********************/
  /*  |-- Network       */
  /**********************/
  virtual int NetworkDimensions () = 0;

  /*  |---- Coordinates */
  virtual void RankToCoordinates ( int rank, int* coord ) = 0;
Francois Tessier's avatar
Francois Tessier committed
24 25 26
  // Number of IO nodes
  // List of IO nodes
  // By rank -> what is my IO node
Francois Tessier's avatar
Francois Tessier committed
27 28 29
  virtual void IONodeCoordinates ( int* coord ) = 0;

  /*  |---- Distance    */
Francois Tessier's avatar
Francois Tessier committed
30
  // Minimal/maximal/exact(root?) distance
Francois Tessier's avatar
Francois Tessier committed
31 32 33
  virtual int DistanceToIONode ( int srcRank ) = 0;
  virtual int DistanceBetweenRanks ( int srcRank, int destRank ) = 0;

Francois Tessier's avatar
Francois Tessier committed
34
  /*  |---- Routes      */
Francois Tessier's avatar
Francois Tessier committed
35 36 37
  virtual int RouteToIONode ( int srcRank, int* path ) = 0;
  virtual int RouteBetweenRanks ( int srcRank, int destRank, int* path ) = 0;

Francois Tessier's avatar
Francois Tessier committed
38
  /*  |---- Links       */
Francois Tessier's avatar
Francois Tessier committed
39 40
  virtual void LinksList ( int* linksList ) = 0;
  //virtual int LinkToId ( int srcRank, int destRank ) = 0;
Francois Tessier's avatar
Francois Tessier committed
41 42 43
};

#endif // TOPOLOGY_H