1 /* Copyright (c) 2010-2015. The SimGrid Team.
2 * All rights reserved. */
4 /* This program is free software; you can redistribute it and/or modify it
5 * under the terms of the license (GNU LGPL) which comes with this package. */
7 #ifndef SMPI_TOPO_HPP_INCLUDED
8 #define SMPI_TOPO_HPP_INCLUDED
12 typedef enum MPIR_Topo_type {
28 class Topo_Cart: public Topo {
38 Topo_Cart(MPI_Comm comm_old, int ndims, int dims[], int periods[], int reorder, MPI_Comm *comm_cart);
39 Topo_Cart* sub(const int remain_dims[], MPI_Comm *newcomm) ;
40 int coords(int rank, int maxdims, int coords[]) ;
41 int get(int maxdims, int* dims, int* periods, int* coords);
42 int rank(int* coords, int* rank);
43 int shift(int direction, int disp, int *rank_source, int *rank_dest) ;
44 int dim_get(int *ndims);
48 class Topo_Graph: public Topo {
59 class Topo_Dist_Graph: public Topo {
74 * This is a utility function, no need to have anything in the lower layer for this at all
76 extern int Dims_create(int nnodes, int ndims, int dims[]);