1
1

Correct a few #if issues that George identified in a code review

This commit was SVN r7724.
Этот коммит содержится в:
Jeff Squyres 2005-10-12 13:19:46 +00:00
родитель 62bd7849f4
Коммит 727a2cf8b2
3 изменённых файлов: 31 добавлений и 13 удалений

Просмотреть файл

@ -187,13 +187,14 @@ OBJ_CLASS_INSTANCE(ompi_op_t, opal_object_t,
/** Fortran complex *****************************************************/ /** Fortran complex *****************************************************/
#if OMPI_HAVE_FORTRAN_REAL && OMPI_HAVE_FORTRAN_COMPLEX #if OMPI_HAVE_FORTRAN_REAL && OMPI_HAVE_FORTRAN_COMPLEX
#define COMPLEX_PLAIN(name) \ #define COMPLEX_PLAIN(name) { ompi_mpi_op_##name##_fortran_complex }
{ ompi_mpi_op_##name##_fortran_complex }, \
{ ompi_mpi_op_##name##_fortran_double_complex }
#else #else
#define COMPLEX_PLAIN(name) \ #define COMPLEX_PLAIN(name) { NULL }
{ NULL }, \ #endif
{ NULL } #if OMPI_HAVE_FORTRAN_DOUBLE_PRECISION && OMPI_HAVE_FORTRAN_COMPLEX
#define COMPLEX_DOUBLE(name) { ompi_mpi_op_##name##_fortran_double_complex }
#else
#define COMPLEX_DOUBLE(name) { NULL }
#endif #endif
#if OMPI_HAVE_FORTRAN_REAL4 && OMPI_HAVE_FORTRAN_COMPLEX8 #if OMPI_HAVE_FORTRAN_REAL4 && OMPI_HAVE_FORTRAN_COMPLEX8
#define COMPLEX8(name) { ompi_mpi_op_##name##_fortran_complex8 } #define COMPLEX8(name) { ompi_mpi_op_##name##_fortran_complex8 }
@ -212,13 +213,14 @@ OBJ_CLASS_INSTANCE(ompi_op_t, opal_object_t,
#endif #endif
#define COMPLEX(name) \ #define COMPLEX(name) \
COMPLEX_PLAIN(name), /* OMPI_OP_TYPE_COMPLEX */ \ COMPLEX_PLAIN(name), /* OMPI_OP_TYPE_COMPLEX */ \
COMPLEX8(name), /* OMPI_OP_TYPE_COMPLEX8 */ \ COMPLEX_DOUBLE(name), /* OMPI_OP_TYPE_DOUBLE_COMPLEX */ \
COMPLEX16(name), /* OMPI_OP_TYPE_COMPLEX16 */ \ COMPLEX8(name), /* OMPI_OP_TYPE_COMPLEX8 */ \
COMPLEX32(name) /* OMPI_OP_TYPE_COMPLEX32 */ COMPLEX16(name), /* OMPI_OP_TYPE_COMPLEX16 */ \
COMPLEX32(name) /* OMPI_OP_TYPE_COMPLEX32 */
#define COMPLEX_NULL \ #define COMPLEX_NULL \
{ NULL }, /* OMPI_OP_TYPE_COMPLEX (single) */ \ { NULL }, /* OMPI_OP_TYPE_COMPLEX */ \
{ NULL }, /* OMPI_OP_TYPE_COMPLEX (double) */ \ { NULL }, /* OMPI_OP_TYPE_DOUBLE_COMPLEX */ \
{ NULL }, /* OMPI_OP_TYPE_COMPLEX8 */ \ { NULL }, /* OMPI_OP_TYPE_COMPLEX8 */ \
{ NULL }, /* OMPI_OP_TYPE_COMPLEX16 */ \ { NULL }, /* OMPI_OP_TYPE_COMPLEX16 */ \
{ NULL } /* OMPI_OP_TYPE_COMPLEX32 */ { NULL } /* OMPI_OP_TYPE_COMPLEX32 */

Просмотреть файл

@ -295,6 +295,8 @@ OP_FUNC(sum, fortran_real16, ompi_fortran_real16_t, +=)
/* Complex */ /* Complex */
#if OMPI_HAVE_FORTRAN_REAL && OMPI_HAVE_FORTRAN_COMPLEX #if OMPI_HAVE_FORTRAN_REAL && OMPI_HAVE_FORTRAN_COMPLEX
COMPLEX_OP_FUNC_SUM(fortran_complex, ompi_fortran_complex_t) COMPLEX_OP_FUNC_SUM(fortran_complex, ompi_fortran_complex_t)
#endif
#if OMPI_HAVE_FORTRAN_DOUBLE_PRECISION && OMPI_HAVE_FORTRAN_COMPLEX
COMPLEX_OP_FUNC_SUM(fortran_double_complex, ompi_fortran_double_complex_t) COMPLEX_OP_FUNC_SUM(fortran_double_complex, ompi_fortran_double_complex_t)
#endif #endif
#if OMPI_HAVE_FORTRAN_REAL4 && OMPI_HAVE_FORTRAN_COMPLEX8 #if OMPI_HAVE_FORTRAN_REAL4 && OMPI_HAVE_FORTRAN_COMPLEX8
@ -364,6 +366,8 @@ OP_FUNC(prod, fortran_real16, ompi_fortran_real16_t, +=)
/* Complex */ /* Complex */
#if OMPI_HAVE_FORTRAN_REAL && OMPI_HAVE_FORTRAN_COMPLEX #if OMPI_HAVE_FORTRAN_REAL && OMPI_HAVE_FORTRAN_COMPLEX
COMPLEX_OP_FUNC_PROD(fortran_complex, ompi_fortran_complex_t) COMPLEX_OP_FUNC_PROD(fortran_complex, ompi_fortran_complex_t)
#endif
#if OMPI_HAVE_FORTRAN_DOUBLE_PRECISION && OMPI_HAVE_FORTRAN_COMPLEX
COMPLEX_OP_FUNC_PROD(fortran_double_complex, ompi_fortran_double_complex_t) COMPLEX_OP_FUNC_PROD(fortran_double_complex, ompi_fortran_double_complex_t)
#endif #endif
#if OMPI_HAVE_FORTRAN_REAL4 && OMPI_HAVE_FORTRAN_COMPLEX8 #if OMPI_HAVE_FORTRAN_REAL4 && OMPI_HAVE_FORTRAN_COMPLEX8
@ -677,6 +681,8 @@ OP_FUNC(replace, long_double, long double, =)
/* Complex */ /* Complex */
#if OMPI_HAVE_FORTRAN_REAL && OMPI_HAVE_FORTRAN_COMPLEX #if OMPI_HAVE_FORTRAN_REAL && OMPI_HAVE_FORTRAN_COMPLEX
OP_FUNC(replace, fortran_complex, ompi_fortran_complex_t, =) OP_FUNC(replace, fortran_complex, ompi_fortran_complex_t, =)
#endif
#if OMPI_HAVE_FORTRAN_DOUBLE_PRECISION && OMPI_HAVE_FORTRAN_COMPLEX
OP_FUNC(replace, fortran_double_complex, ompi_fortran_double_complex_t, =) OP_FUNC(replace, fortran_double_complex, ompi_fortran_double_complex_t, =)
#endif #endif
#if OMPI_HAVE_FORTRAN_REAL4 && OMPI_HAVE_FORTRAN_COMPLEX8 #if OMPI_HAVE_FORTRAN_REAL4 && OMPI_HAVE_FORTRAN_COMPLEX8

Просмотреть файл

@ -127,9 +127,18 @@
/* Complex */ /* Complex */
#if OMPI_HAVE_FORTRAN_REAL
#define OMPI_OP_HANDLER_COMPLEX_INTRINSIC(name) \ #define OMPI_OP_HANDLER_COMPLEX_INTRINSIC(name) \
void ompi_mpi_op_##name##_fortran_complex OMPI_OP_PROTO; \ void ompi_mpi_op_##name##_fortran_complex OMPI_OP_PROTO;
#else
#define OMPI_OP_HANDLER_COMPLEX_INTRINSIC(name)
#endif
#if OMPI_HAVE_FORTRAN_DOUBLE_PRECISION
#define OMPI_OP_HANDLER_DOUBLE_COMPLEX_INTRINSIC(name) \
void ompi_mpi_op_##name##_fortran_double_complex OMPI_OP_PROTO; void ompi_mpi_op_##name##_fortran_double_complex OMPI_OP_PROTO;
#else
#define OMPI_OP_HANDLER_DOUBLE_COMPLEX_INTRINSIC(name)
#endif
#if OMPI_HAVE_FORTRAN_REAL4 #if OMPI_HAVE_FORTRAN_REAL4
#define OMPI_OP_HANDLER_COMPLEX8(name) \ #define OMPI_OP_HANDLER_COMPLEX8(name) \
void ompi_mpi_op_##name##_fortran_complex8 OMPI_OP_PROTO; void ompi_mpi_op_##name##_fortran_complex8 OMPI_OP_PROTO;
@ -150,6 +159,7 @@
#endif #endif
#define OMPI_OP_HANDLER_COMPLEX(name) \ #define OMPI_OP_HANDLER_COMPLEX(name) \
OMPI_OP_HANDLER_COMPLEX_INTRINSIC(name) \ OMPI_OP_HANDLER_COMPLEX_INTRINSIC(name) \
OMPI_OP_HANDLER_DOUBLE_COMPLEX_INTRINSIC(name) \
OMPI_OP_HANDLER_COMPLEX8(name) \ OMPI_OP_HANDLER_COMPLEX8(name) \
OMPI_OP_HANDLER_COMPLEX16(name) \ OMPI_OP_HANDLER_COMPLEX16(name) \
OMPI_OP_HANDLER_COMPLEX32(name) OMPI_OP_HANDLER_COMPLEX32(name)