From 20d789feb17e6542e180dc4b93bd82d5c51db072 Mon Sep 17 00:00:00 2001 From: George Bosilca Date: Fri, 11 Feb 2005 06:34:17 +0000 Subject: [PATCH] Dont do any param check in this function as we call another MPI function and the checking will be done there. This commit was SVN r4395. --- src/mpi/c/type_struct.c | 38 ++++++-------------------------------- 1 file changed, 6 insertions(+), 32 deletions(-) diff --git a/src/mpi/c/type_struct.c b/src/mpi/c/type_struct.c index de713ef95e..45ec6a2a00 100644 --- a/src/mpi/c/type_struct.c +++ b/src/mpi/c/type_struct.c @@ -36,36 +36,10 @@ int MPI_Type_struct(int count, MPI_Datatype array_of_types[], MPI_Datatype *newtype) { - int i; - - if ( MPI_PARAM_CHECK ) { - OMPI_ERR_INIT_FINALIZE(FUNC_NAME); - if (NULL == newtype || NULL == array_of_types) { - return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_TYPE, - FUNC_NAME ); - } else if (count < 0) { - return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COUNT, - FUNC_NAME ); - } else if (NULL == array_of_blocklengths || - NULL == array_of_displacements) { - return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_ARG, - FUNC_NAME ); - } - for (i = 0; i < count; ++i) { - if (NULL == array_of_types[i] || - MPI_DATATYPE_NULL == array_of_types[i]) { - return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_TYPE, - FUNC_NAME ); - } else if (array_of_blocklengths[i] < 0) { - return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_ARG, - FUNC_NAME ); - } - } - } - - return MPI_Type_create_struct(count, - array_of_blocklengths, - array_of_displacements, - array_of_types, - newtype); + /* the param check will be done if necessary on the MPI_Type_create_struct */ + return MPI_Type_create_struct(count, + array_of_blocklengths, + array_of_displacements, + array_of_types, + newtype); }