Commit 379fcf52 authored by Junchao Zhang's avatar Junchao Zhang
Browse files

Add macro MPIR_T_PVAR_{COUNTER, TIMER}_ADDR

With the macro, we can get pointers on counter/timer pvars.

Signed-off-by: Junchao Zhang<jczhang@mcs.anl.gov> (Reviewed by Bill Gropp)
parent a2299cd5
......@@ -330,6 +330,8 @@ static inline cvar_table_entry_t * LOOKUP_CVAR_BY_NAME(const char* cvar_name)
MPIR_T_PVAR_COUNTER_GET_impl(name_)
#define MPIR_T_PVAR_COUNTER_INC(MODULE, name_, inc_) \
PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_COUNTER_INC_impl(name_, inc_))
#define MPIR_T_PVAR_COUNTER_ADDR(name_) \
MPIR_T_PVAR_COUNTER_ADDR_impl(name_)
#define MPIR_T_PVAR_COUNTER_REGISTER_STATIC(MODULE, dtype_, name_, \
verb_, bind_, flags_, cat_, desc_) \
......@@ -468,6 +470,8 @@ static inline cvar_table_entry_t * LOOKUP_CVAR_BY_NAME(const char* cvar_name)
PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_TIMER_START_impl(name_))
#define MPIR_T_PVAR_TIMER_END(MODULE, name_) \
PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_TIMER_END_impl(name_))
#define MPIR_T_PVAR_TIMER_ADDR(name_) \
MPIR_T_PVAR_TIMER_ADDR_impl(name_)
/* This macro actually register twins of a timer and a counter to MPIR_T */
#define MPIR_T_PVAR_TIMER_REGISTER_STATIC(MODULE, dtype_, name_, \
......
......@@ -665,6 +665,8 @@ extern void MPIR_T_PVAR_REGISTER_impl(
MPIR_T_PVAR_COUNTER_GET_VAR_impl(&PVAR_COUNTER_##name_)
#define MPIR_T_PVAR_COUNTER_INC_impl(name_, inc_) \
MPIR_T_PVAR_COUNTER_INC_VAR_impl(&PVAR_COUNTER_##name_, inc_)
#define MPIR_T_PVAR_COUNTER_ADDR_impl(name_) \
(&PVAR_COUNTER_##name_)
/* Registration AND initialization to zero for static pvar. */
#define MPIR_T_PVAR_COUNTER_REGISTER_STATIC_impl(dtype_, name_, \
......@@ -875,6 +877,8 @@ extern void MPIR_T_PVAR_REGISTER_impl(
MPIR_T_PVAR_TIMER_START_VAR_impl(&PVAR_TIMER_##name_)
#define MPIR_T_PVAR_TIMER_END_impl(name_) \
MPIR_T_PVAR_TIMER_END_VAR_impl(&PVAR_TIMER_##name_)
#define MPIR_T_PVAR_TIMER_ADDR_impl(name_) \
(&PVAR_TIMER_##name_)
/* Customized get_value() for MPIR_T_pvar_timer_t */
static inline
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment