root/ompi/mca/coll/sync/coll_sync_reduce_scatter.c

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

DEFINITIONS

This source file includes following definitions.
  1. mca_coll_sync_reduce_scatter

   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-2017 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) 2008      Sun Microsystems, Inc.  All rights reserved.
  13  * Copyright (c) 2009      Cisco Systems, Inc.  All rights reserved.
  14  * $COPYRIGHT$
  15  *
  16  * Additional copyrights may follow
  17  *
  18  * $HEADER$
  19  */
  20 
  21 #include "ompi_config.h"
  22 
  23 #include "coll_sync.h"
  24 
  25 
  26 /*
  27  *      reduce_scatter
  28  *
  29  *      Function:       - reduce then scatter
  30  *      Accepts:        - same as MPI_Reduce_scatter()
  31  *      Returns:        - MPI_SUCCESS or error code
  32  */
  33 int mca_coll_sync_reduce_scatter(const void *sbuf, void *rbuf, const int *rcounts,
  34                                  struct ompi_datatype_t *dtype,
  35                                  struct ompi_op_t *op,
  36                                  struct ompi_communicator_t *comm,
  37                                  mca_coll_base_module_t *module)
  38 {
  39     mca_coll_sync_module_t *s = (mca_coll_sync_module_t*) module;
  40 
  41     if (s->in_operation) {
  42         return s->c_coll.coll_reduce_scatter(sbuf, rbuf, rcounts,
  43                                              dtype, op, comm,
  44                                              s->c_coll.coll_reduce_scatter_module);
  45     }
  46     COLL_SYNC(s, s->c_coll.coll_reduce_scatter(sbuf, rbuf, rcounts,
  47                                                dtype, op, comm,
  48                                                s->c_coll.coll_reduce_scatter_module));
  49 }

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