root/ompi/mca/coll/base/coll_base_topo.h

/* [<][>][^][v][top][bottom][index][help] */

INCLUDED FROM


   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-2015 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$
  13  *
  14  * Additional copyrights may follow
  15  *
  16  * $HEADER$
  17  */
  18 
  19 #ifndef MCA_COLL_BASE_TOPO_H_HAS_BEEN_INCLUDED
  20 #define MCA_COLL_BASE_TOPO_H_HAS_BEEN_INCLUDED
  21 
  22 #include "ompi_config.h"
  23 #include <stddef.h>
  24 
  25 #define MAXTREEFANOUT 32
  26 
  27 #define MEMBSIZE(type, member) (sizeof(((type *)0)->member[0]))
  28 #define COLL_TREE_SIZE(fanout) \
  29         (offsetof(ompi_coll_tree_t, tree_next) + (fanout) * MEMBSIZE(ompi_coll_tree_t, tree_next))
  30 
  31 BEGIN_C_DECLS
  32 
  33 typedef struct ompi_coll_tree_t {
  34     int32_t tree_root;
  35     int32_t tree_fanout;
  36     int32_t tree_bmtree;
  37     int32_t tree_prev;
  38     int32_t tree_nextsize;
  39     int32_t tree_next[];
  40 } ompi_coll_tree_t;
  41 
  42 ompi_coll_tree_t*
  43 ompi_coll_base_topo_build_tree( int fanout,
  44                                  struct ompi_communicator_t* com,
  45                                  int root );
  46 ompi_coll_tree_t*
  47 ompi_coll_base_topo_build_in_order_bintree( struct ompi_communicator_t* comm );
  48 
  49 ompi_coll_tree_t*
  50 ompi_coll_base_topo_build_bmtree( struct ompi_communicator_t* comm,
  51                                    int root );
  52 ompi_coll_tree_t*
  53 ompi_coll_base_topo_build_in_order_bmtree( struct ompi_communicator_t* comm,
  54                                             int root );
  55 
  56 ompi_coll_tree_t*
  57 ompi_coll_base_topo_build_kmtree(struct ompi_communicator_t* comm,
  58                                  int root, int radix);
  59 
  60 ompi_coll_tree_t*
  61 ompi_coll_base_topo_build_chain( int fanout,
  62                                   struct ompi_communicator_t* com,
  63                                   int root );
  64 
  65 int ompi_coll_base_topo_destroy_tree( ompi_coll_tree_t** tree );
  66 
  67 /* debugging stuff, will be removed later */
  68 int ompi_coll_base_topo_dump_tree (ompi_coll_tree_t* tree, int rank);
  69 
  70 END_C_DECLS
  71 
  72 #endif  /* MCA_COLL_BASE_TOPO_H_HAS_BEEN_INCLUDED */

/* [<][>][^][v][top][bottom][index][help] */