root/ompi/mca/topo/base/topo_base_dist_graph_neighbors_count.c

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

DEFINITIONS

This source file includes following definitions.
  1. mca_topo_base_dist_graph_neighbors_count

   1 /*
   2  * Copyright (c) 2008 The Trustees of Indiana University and Indiana
   3  *                    University Research and Technology
   4  *                    Corporation.  All rights reserved.
   5  * Copyright (c) 2009 Cisco Systems, Inc.  All rights reserved.
   6  * Copyright (c) 2014      Research Organization for Information Science
   7  *                         and Technology (RIST). All rights reserved.
   8  */
   9 
  10 #include "ompi_config.h"
  11 
  12 #include "ompi/communicator/communicator.h"
  13 #include "ompi/info/info.h"
  14 #include "ompi/mca/topo/base/base.h"
  15 
  16 
  17 int mca_topo_base_dist_graph_neighbors_count(ompi_communicator_t *comm,
  18                                              int *inneighbors,
  19                                              int *outneighbors, int *weighted)
  20 {
  21     mca_topo_base_comm_dist_graph_2_2_0_t* dist_graph = comm->c_topo->mtc.dist_graph;
  22 
  23     if (!OMPI_COMM_IS_DIST_GRAPH(comm)) {
  24         return OMPI_ERR_NOT_FOUND;
  25     }
  26 
  27     *inneighbors = dist_graph->indegree;
  28     *outneighbors = dist_graph->outdegree;
  29     *weighted = (int)dist_graph->weighted;
  30 
  31     return MPI_SUCCESS;
  32 }

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