Commit fd2ac8b5 authored by Junchao Zhang's avatar Junchao Zhang
Browse files

Change prototype of MPIR_T_pvar_get_value_cb etc

The return value of the callbacks is of less value.

Signed-off-by: Junchao Zhang<jczhang@mcs.anl.gov> (Reviewed by Bill Gropp)
parent 4c784c5d
......@@ -142,8 +142,8 @@ void MPIR_T_CVAR_REGISTER_impl(
struct MPIR_T_pvar_handle_s;
struct MPIR_T_pvar_session_s;
typedef int MPIR_T_pvar_get_value_cb(void *addr, void *obj_handle, int count, void *buf);
typedef int MPIR_T_pvar_get_count_cb(void *addr, void *obj_handle, int *count);
typedef void MPIR_T_pvar_get_value_cb(void *addr, void *obj_handle, int count, void *buf);
typedef void MPIR_T_pvar_get_count_cb(void *addr, void *obj_handle, int *count);
/* Basic pvar flags defined by MPI_T standard */
#define MPIR_T_PVAR_FLAG_READONLY 0x01
......@@ -871,15 +871,12 @@ extern void MPIR_T_PVAR_REGISTER_impl(
/* Customized get_value() for MPIR_T_pvar_timer_t */
static inline
int get_timer_in_double(MPIR_T_pvar_timer_t *timer, void *obj_handle,
void get_timer_in_double(MPIR_T_pvar_timer_t *timer, void *obj_handle,
int count, double *buf)
{
int i, mpi_errno = MPI_SUCCESS;
int i;
for (i = 0; i < count; i++)
MPID_Wtime_todouble(&(timer[i].total), &buf[i]);
return mpi_errno;
}
/* Registration for static storage */
......
......@@ -55,8 +55,7 @@ int MPIR_T_pvar_handle_alloc_impl(MPI_T_pvar_session session, int pvar_index,
if (info->get_count == NULL) {
cnt = info->count;
} else {
mpi_errno = info->get_count(info->addr, obj_handle, &cnt);
if (mpi_errno) MPIU_ERR_POP(mpi_errno);
info->get_count(info->addr, obj_handle, &cnt);
}
bytes = MPID_Datatype_get_basic_size(info->datatype);
......
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