Skip to content

Commit 4db83f0

Browse files
author
neok-m4700
committed
issue 493
1 parent 01e5ff0 commit 4db83f0

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/mpi/mpi_caf.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4627,8 +4627,9 @@ PREFIX (get_by_ref) (caf_token_t token, int image_index,
46274627
}
46284628
}
46294629

4630-
/* Only increase the dim counter, when in an array ref. */
4631-
if (in_array_ref && dst_cur_dim < dst_rank)
4630+
/* Only increase the dim counter, when in an array ref, and
4631+
MODE != CAF_ARR_REF_SINGLE (delta == 1) see caf_array_ref_t. */
4632+
if (in_array_ref && dst_cur_dim < dst_rank && delta != 1)
46324633
++dst_cur_dim;
46334634
}
46344635
size *= (ptrdiff_t)delta;
@@ -4775,8 +4776,9 @@ PREFIX (get_by_ref) (caf_token_t token, int image_index,
47754776
dst->dim[dst_cur_dim]._stride = size;
47764777
}
47774778
}
4778-
/* Only increase the dim counter, when in an array ref. */
4779-
if (in_array_ref && dst_cur_dim < dst_rank)
4779+
/* Only increase the dim counter, when in an array ref, and
4780+
MODE != CAF_ARR_REF_SINGLE (delta == 1) see caf_array_ref_t. */
4781+
if (in_array_ref && dst_cur_dim < dst_rank && delta != 1)
47804782
++dst_cur_dim;
47814783
}
47824784
size *= (ptrdiff_t)delta;

0 commit comments

Comments
 (0)