Skip to content

Commit f9d8629

Browse files
authored
[SYCLomatic] Fix array access violation in matrix_mem_copy_test (#381)
Signed-off-by: Ni, Wenhui <[email protected]>
1 parent 5fd2f81 commit f9d8629

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

help_function/src/util_matrix_mem_copy_test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ void matrix_mem_copy_test_2() {
7777
dpct::matrix_mem_copy(host_d, devPtrA, M - 1 /*to_ld*/, M /*from_ld*/,
7878
M - 1 /*rows*/, N /*cols*/);
7979

80-
for (int i = 0; i < M*N; i++) {
80+
for (int i = 0; i < (M-1)*N; i++) {
8181
if (fabs(host_d[i] - host_e[i]) > 1e-5) {
8282
printf("matrix_mem_copy_test_2.2 failed\n");
8383
exit(-1);

0 commit comments

Comments
 (0)