Commit 26f731b1 authored by James Dinan's avatar James Dinan
Browse files

[svn-r10369] Accumulate, predefined datatypes minor cleanup

True_lb is always zero for predefined types; there's no need to include this in
address calculations when processing predefined types.

Reviewer: goodell
parent 5c799183
......@@ -3051,6 +3051,10 @@ int MPIDI_CH3_PktHandler_Accumulate( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
MPIR_Type_get_true_extent_impl(accum_pkt->datatype, &true_lb, &true_extent);
MPID_Datatype_get_extent_macro(accum_pkt->datatype, extent);
/* Predefined types should always have zero lb */
MPIU_Assert(true_lb == 0);
tmp_buf = MPIU_Malloc(accum_pkt->count *
(MPIR_MAX(extent,true_extent)));
if (!tmp_buf) {
......@@ -3058,11 +3062,6 @@ int MPIDI_CH3_PktHandler_Accumulate( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
accum_pkt->count * MPIR_MAX(extent,true_extent));
}
/* FIXME: This seems unnecessary - predefined datatypes should always
* have true_lb of 0, right? */
/* adjust for potential negative lower bound in datatype */
tmp_buf = (void *)((char*)tmp_buf - true_lb);
req->dev.user_buf = tmp_buf;
MPID_Datatype_get_size_macro(accum_pkt->datatype, type_size);
......
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