Skip to content

Commit 0522179

Browse files
committed
pml/yalla: use opal_datatype_span() to get config type length.
Signed-off-by: Yossi Itigin <[email protected]>
1 parent e94c6b1 commit 0522179

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

ompi/mca/pml/yalla/pml_yalla_datatype.h

+4-6
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,13 @@ OBJ_CLASS_DECLARATION(mca_pml_yalla_convertor_t);
2626

2727
#define PML_YALLA_INIT_MXM_REQ_DATA(_req_base, _buf, _count, _dtype, _stream_type, ...) \
2828
{ \
29-
size_t size; \
30-
ptrdiff_t lb, extent; \
29+
ptrdiff_t span, gap; \
3130
\
3231
if (opal_datatype_is_contiguous_memory_layout(&(_dtype)->super, _count)) { \
33-
ompi_datatype_get_true_extent(_dtype, &lb, &extent); \
34-
ompi_datatype_type_size(_dtype, &size); \
32+
span = opal_datatype_span(&(_dtype)->super, (_count), &gap); \
3533
(_req_base)->data_type = MXM_REQ_DATA_BUFFER; \
36-
(_req_base)->data.buffer.ptr = (char *)_buf + lb; \
37-
(_req_base)->data.buffer.length = size * (_count); \
34+
(_req_base)->data.buffer.ptr = (char *)_buf + gap; \
35+
(_req_base)->data.buffer.length = span; \
3836
} else { \
3937
mca_pml_yalla_set_noncontig_data_ ## _stream_type(_req_base, \
4038
_buf, _count, \

0 commit comments

Comments
 (0)