void MPIR_MINLOC( void *invec, void *inoutvec, int *Len, MPI_Datatype *type ) { int mpi_errno = MPI_SUCCESS; int i, len = *Len; #ifdef HAVE_FORTRAN_BINDING #ifndef HAVE_NO_FORTRAN_MPI_TYPES_IN_C int flen = len * 2; /* used for Fortran types */ #endif #endif switch (*type) { /* first the C types */ case MPI_2INT: MPIR_MINLOC_C_CASE(MPIR_2int_loctype); case MPI_FLOAT_INT: MPIR_MINLOC_C_CASE(MPIR_floatint_loctype); case MPI_LONG_INT: MPIR_MINLOC_C_CASE(MPIR_longint_loctype); case MPI_SHORT_INT: MPIR_MINLOC_C_CASE(MPIR_shortint_loctype); case MPI_DOUBLE_INT: MPIR_MINLOC_C_CASE(MPIR_doubleint_loctype); #if defined(HAVE_LONG_DOUBLE) case MPI_LONG_DOUBLE_INT: MPIR_MINLOC_C_CASE(MPIR_longdoubleint_loctype); #endif /* now the Fortran types */ #ifdef HAVE_FORTRAN_BINDING #ifndef HAVE_NO_FORTRAN_MPI_TYPES_IN_C case MPI_2INTEGER: MPIR_MINLOC_F_CASE(MPI_Fint); case MPI_2REAL: MPIR_MINLOC_F_CASE(MPIR_FC_REAL_CTYPE); case MPI_2DOUBLE_PRECISION: MPIR_MINLOC_F_CASE(MPIR_FC_DOUBLE_CTYPE); #endif #endif /* --BEGIN ERROR HANDLING-- */ default: { MPIR_ERR_SET1(mpi_errno, MPI_ERR_OP, "**opundefined","**opundefined %s", "MPI_MINLOC" ); { MPIR_Per_thread_t *per_thread = NULL; int err = 0; MPID_THREADPRIV_KEY_GET_ADDR(MPIR_ThreadInfo.isThreaded, MPIR_Per_thread_key, MPIR_Per_thread, per_thread, &err); MPIR_Assert(err == 0); per_thread->op_errno = mpi_errno; } break; } /* --END ERROR HANDLING-- */ } }
void MPIR_MINLOC( void *invec, void *inoutvec, int *Len, MPI_Datatype *type ) { int mpi_errno = MPI_SUCCESS; int i, len = *Len; #ifdef HAVE_FORTRAN_BINDING #ifndef HAVE_NO_FORTRAN_MPI_TYPES_IN_C int flen = len * 2; /* used for Fortran types */ #endif #endif switch (*type) { /* first the C types */ case MPI_2INT: MPIR_MINLOC_C_CASE(MPIR_2int_loctype); case MPI_FLOAT_INT: MPIR_MINLOC_C_CASE(MPIR_floatint_loctype); case MPI_LONG_INT: MPIR_MINLOC_C_CASE(MPIR_longint_loctype); case MPI_SHORT_INT: MPIR_MINLOC_C_CASE(MPIR_shortint_loctype); case MPI_DOUBLE_INT: MPIR_MINLOC_C_CASE(MPIR_doubleint_loctype); #if defined(HAVE_LONG_DOUBLE) case MPI_LONG_DOUBLE_INT: MPIR_MINLOC_C_CASE(MPIR_longdoubleint_loctype); #endif /* now the Fortran types */ #ifdef HAVE_FORTRAN_BINDING #ifndef HAVE_NO_FORTRAN_MPI_TYPES_IN_C case MPI_2INTEGER: MPIR_MINLOC_F_CASE(MPI_Fint); case MPI_2REAL: MPIR_MINLOC_F_CASE(MPIR_FC_REAL_CTYPE); case MPI_2DOUBLE_PRECISION: MPIR_MINLOC_F_CASE(MPIR_FC_DOUBLE_CTYPE); #endif #endif /* --BEGIN ERROR HANDLING-- */ default: { MPID_THREADPRIV_DECL; MPID_THREADPRIV_GET; MPIR_ERR_SET1(mpi_errno, MPI_ERR_OP, "**opundefined","**opundefined %s", "MPI_MINLOC" ); MPID_THREADPRIV_FIELD(op_errno) = mpi_errno; break; } /* --END ERROR HANDLING-- */ } }