root/ompi/mpi/c/pack_external_size.c

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

DEFINITIONS

This source file includes following definitions.
  1. MPI_Pack_external_size

   1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
   2 /*
   3  * Copyright (c) 2004-2007 The Trustees of Indiana University and Indiana
   4  *                         University Research and Technology
   5  *                         Corporation.  All rights reserved.
   6  * Copyright (c) 2004-2005 The University of Tennessee and The University
   7  *                         of Tennessee Research Foundation.  All rights
   8  *                         reserved.
   9  * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart,
  10  *                         University of Stuttgart.  All rights reserved.
  11  * Copyright (c) 2004-2005 The Regents of the University of California.
  12  *                         All rights reserved.
  13  * Copyright (c) 2006      Cisco Systems, Inc.  All rights reserved.
  14  * Copyright (c) 2013      Los Alamos National Security, LLC.  All rights
  15  *                         reserved.
  16  * Copyright (c) 2015-2017 Research Organization for Information Science
  17  *                         and Technology (RIST). All rights reserved.
  18  * $COPYRIGHT$
  19  *
  20  * Additional copyrights may follow
  21  *
  22  * $HEADER$
  23  */
  24 #include "ompi_config.h"
  25 #include <stdio.h>
  26 
  27 #include "ompi/mpi/c/bindings.h"
  28 #include "ompi/runtime/params.h"
  29 #include "ompi/communicator/communicator.h"
  30 #include "ompi/errhandler/errhandler.h"
  31 #include "ompi/datatype/ompi_datatype.h"
  32 #include "opal/datatype/opal_convertor.h"
  33 #include "ompi/memchecker.h"
  34 
  35 #if OMPI_BUILD_MPI_PROFILING
  36 #if OPAL_HAVE_WEAK_SYMBOLS
  37 #pragma weak MPI_Pack_external_size = PMPI_Pack_external_size
  38 #endif
  39 #define MPI_Pack_external_size PMPI_Pack_external_size
  40 #endif
  41 
  42 static const char FUNC_NAME[] = "MPI_Pack_external_size";
  43 
  44 
  45 int MPI_Pack_external_size(const char datarep[], int incount,
  46                            MPI_Datatype datatype, MPI_Aint *size)
  47 {
  48     int rc = MPI_SUCCESS;
  49 
  50     MEMCHECKER(
  51         memchecker_datatype(datatype);
  52     );
  53 
  54     if (MPI_PARAM_CHECK) {
  55         OMPI_ERR_INIT_FINALIZE(FUNC_NAME);
  56         if (NULL == size) {
  57             return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_ARG, FUNC_NAME);
  58         } else if (MPI_DATATYPE_NULL == datatype || NULL == datatype) {
  59             return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_TYPE, FUNC_NAME);
  60         }
  61     }
  62 
  63     OPAL_CR_ENTER_LIBRARY();
  64 
  65     rc = ompi_datatype_pack_external_size(datarep, incount,
  66                                           datatype, size);
  67     OPAL_CR_EXIT_LIBRARY();
  68 
  69     OMPI_ERRHANDLER_RETURN(rc, MPI_COMM_WORLD, rc, FUNC_NAME);
  70 }

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