[mpich2-commits] r7973 - mpich2/trunk/src/include
goodell at mcs.anl.gov
goodell at mcs.anl.gov
Tue Feb 15 15:58:59 CST 2011
Author: goodell
Date: 2011-02-15 15:58:59 -0600 (Tue, 15 Feb 2011)
New Revision: 7973
Modified:
mpich2/trunk/src/include/mpiimpl.h
Log:
add MPIR_Op_release helper macro
Reviewed by buntinas at .
Modified: mpich2/trunk/src/include/mpiimpl.h
===================================================================
--- mpich2/trunk/src/include/mpiimpl.h 2011-02-15 21:58:56 UTC (rev 7972)
+++ mpich2/trunk/src/include/mpiimpl.h 2011-02-15 21:58:59 UTC (rev 7973)
@@ -1771,6 +1771,16 @@
#define MPIR_Op_release_ref( _op, _inuse ) \
do { MPIU_Object_release_ref( _op, _inuse ); } while (0)
+/* release and free-if-not-in-use helper */
+#define MPIR_Op_release(op_p_) \
+ do { \
+ int in_use_; \
+ MPIR_Op_release_ref((op_p_), &in_use_); \
+ if (!in_use_) { \
+ MPIU_Handle_obj_free(&MPID_Op_mem, (op_p_)); \
+ } \
+ } while (0)
+
/* ------------------------------------------------------------------------- */
/* ------------------------------------------------------------------------- */
More information about the mpich2-commits
mailing list