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.
Этот коммит содержится в:
родитель
f24afe3bf8
Коммит
20d789feb1
@ -36,33 +36,7 @@ int MPI_Type_struct(int count,
|
|||||||
MPI_Datatype array_of_types[],
|
MPI_Datatype array_of_types[],
|
||||||
MPI_Datatype *newtype)
|
MPI_Datatype *newtype)
|
||||||
{
|
{
|
||||||
int i;
|
/* the param check will be done if necessary on the MPI_Type_create_struct */
|
||||||
|
|
||||||
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,
|
return MPI_Type_create_struct(count,
|
||||||
array_of_blocklengths,
|
array_of_blocklengths,
|
||||||
array_of_displacements,
|
array_of_displacements,
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user