2005-01-30 00:30:31 +00:00
|
|
|
/*
|
2005-11-05 19:57:48 +00:00
|
|
|
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
|
|
|
* University Research and Technology
|
|
|
|
* Corporation. All rights reserved.
|
|
|
|
* Copyright (c) 2004-2005 The University of Tennessee and The University
|
|
|
|
* of Tennessee Research Foundation. All rights
|
|
|
|
* reserved.
|
2005-01-30 00:30:31 +00:00
|
|
|
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
|
|
|
* University of Stuttgart. All rights reserved.
|
2005-03-24 12:43:37 +00:00
|
|
|
* Copyright (c) 2004-2005 The Regents of the University of California.
|
|
|
|
* All rights reserved.
|
2005-01-30 00:30:31 +00:00
|
|
|
* $COPYRIGHT$
|
|
|
|
*
|
|
|
|
* Additional copyrights may follow
|
|
|
|
*
|
|
|
|
* $HEADER$
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "ompi_config.h"
|
|
|
|
|
2006-02-12 01:33:29 +00:00
|
|
|
#include "ompi/constants.h"
|
|
|
|
#include "ompi/datatype/datatype.h"
|
2005-01-30 00:30:31 +00:00
|
|
|
#include "coll_self.h"
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* gatherv_intra
|
|
|
|
*
|
|
|
|
* Function: - gatherv
|
|
|
|
* Accepts: - same arguments as MPI_Gatherv()
|
|
|
|
* Returns: - MPI_SUCCESS or error code
|
|
|
|
*/
|
|
|
|
int mca_coll_self_gatherv_intra(void *sbuf, int scount,
|
|
|
|
struct ompi_datatype_t *sdtype,
|
|
|
|
void *rbuf, int *rcounts, int *disps,
|
|
|
|
struct ompi_datatype_t *rdtype, int root,
|
|
|
|
struct ompi_communicator_t *comm)
|
|
|
|
{
|
2005-09-13 19:39:49 +00:00
|
|
|
if (MPI_IN_PLACE == sbuf) {
|
|
|
|
return MPI_SUCCESS;
|
|
|
|
} else {
|
|
|
|
return ompi_ddt_sndrcv(sbuf, scount, sdtype,
|
|
|
|
((char *) rbuf) + disps[0], rcounts[0], rdtype);
|
|
|
|
}
|
2005-01-30 00:30:31 +00:00
|
|
|
}
|