1 /* 2 * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana 3 * University Research and Technology 4 * Corporation. All rights reserved. 5 * Copyright (c) 2004-2013 The University of Tennessee and The University 6 * of Tennessee Research Foundation. All rights 7 * reserved. 8 * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, 9 * University of Stuttgart. All rights reserved. 10 * Copyright (c) 2004-2005 The Regents of the University of California. 11 * All rights reserved. 12 * Copyright (c) 2009 Cisco Systems, Inc. All rights reserved. 13 * Copyright (c) 2012-2013 Inria. All rights reserved. 14 * $COPYRIGHT$ 15 * 16 * Additional copyrights may follow 17 * 18 * $HEADER$ 19 */ 20 21 #ifndef MCA_TOPO_UNTIY_H 22 #define MCA_TOPO_UNTIY_H 23 24 #include "ompi_config.h" 25 #include "ompi/mca/topo/topo.h" 26 27 /* 28 * ****************************************************************** 29 * ******** functions which provide MCA interface comppliance ******* 30 * ****************************************************************** 31 * These functions are: 32 * - mca_topo_example_module_open 33 * - mca_topo_example_module_close 34 * - mca_topo_example_module_query 35 * - mca_topo_example_module_finalize 36 * These functions are always found on the mca_topo_example_module 37 * structure. They are the "meta" functions to ensure smooth op. 38 * ****************************************************************** 39 */ 40 BEGIN_C_DECLS 41 42 /* 43 * Public component instance 44 */ 45 OMPI_MODULE_DECLSPEC extern mca_topo_base_component_2_2_0_t 46 mca_topo_example_component; 47 48 /* 49 * A unique module class for the module so that we can both cache 50 * module-specific information on the module and have a 51 * module-specific constructor and destructor. 52 */ 53 typedef struct { 54 mca_topo_base_module_t super; 55 56 /* Modules can add their own information here */ 57 int example_module_specific_data; 58 } mca_topo_example_module_t; 59 60 OBJ_CLASS_DECLARATION(mca_topo_example_module_t); 61 62 63 /* 64 * Module functions 65 */ 66 67 int mca_topo_example_cart_map(struct ompi_communicator_t *comm, 68 int ndims, 69 int *dims, 70 int *periods, 71 int *newrank); 72 73 int mca_topo_example_graph_map(struct ompi_communicator_t *comm, 74 int nnodes, 75 int *index, 76 int *edges, 77 int *newrank); 78 /* 79 * ****************************************************************** 80 * ************ functions implemented in this module end ************ 81 * ****************************************************************** 82 */ 83 84 END_C_DECLS 85 86 #endif /* MCA_TOPO_EXAMPLE_H */