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
22 class Topo_Cart: public Topo {
32 Topo_Cart(MPI_Comm comm_old, int ndims, int dims[], int periods[], int reorder, MPI_Comm *comm_cart);
33 Topo_Cart* sub(const int remain_dims[], MPI_Comm *newcomm) ;
34 int coords(int rank, int maxdims, int coords[]) ;
35 int get(int maxdims, int* dims, int* periods, int* coords);
36 int rank(int* coords, int* rank);
37 int shift(int direction, int disp, int *rank_source, int *rank_dest) ;
38 int dim_get(int *ndims);
42 class Topo_Graph: public Topo {
53 class Topo_Dist_Graph: public Topo {
68 * This is a utility function, no need to have anything in the lower layer for this at all
70 extern int Dims_create(int nnodes, int ndims, int dims[]);