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-2005 The University of Tennessee and The University
6 * of Tennessee Research Foundation. All rights
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.
14 * Additional copyrights may follow
19 #ifndef MCA_COLL_TUNED_TOPO_H_HAS_BEEN_INCLUDED
20 #define MCA_COLL_TUNED_TOPO_H_HAS_BEEN_INCLUDED
22 #include "colls_private.h"
24 #define MAXTREEFANOUT 32
26 #define COLL_TUNED_COMPUTED_SEGCOUNT(SEGSIZE, TYPELNG, SEGCOUNT) \
27 if( ((SEGSIZE) >= (TYPELNG)) && \
28 ((SEGSIZE) < ((TYPELNG) * (SEGCOUNT))) ) { \
30 (SEGCOUNT) = (int)((SEGSIZE) / (TYPELNG)); \
31 residual = (SEGSIZE) - (SEGCOUNT) * (TYPELNG); \
32 if( residual > ((TYPELNG) >> 1) ) \
37 typedef struct ompi_coll_tree_t {
42 int32_t tree_next[MAXTREEFANOUT];
43 int32_t tree_nextsize;
47 ompi_coll_tuned_topo_build_tree( int fanout,
51 ompi_coll_tuned_topo_build_in_order_bintree( MPI_Comm comm );
54 ompi_coll_tuned_topo_build_bmtree( MPI_Comm comm,
57 ompi_coll_tuned_topo_build_in_order_bmtree( MPI_Comm comm,
60 ompi_coll_tuned_topo_build_chain( int fanout,
64 int ompi_coll_tuned_topo_destroy_tree( ompi_coll_tree_t** tree );
66 /* debugging stuff, will be removed later */
67 int ompi_coll_tuned_topo_dump_tree (ompi_coll_tree_t* tree, int rank);
69 #endif /* MCA_COLL_TUNED_TOPO_H_HAS_BEEN_INCLUDED */