Skip to content

Commit 12d8f21

Browse files
authored
Merge pull request #4207 from martin-frbg/issue4174-2
Clarify the comment on the out-of-bounds check in ?GETF2
2 parents 9c4ae4d + 3b6050a commit 12d8f21

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lapack/getf2/getf2_k.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ blasint CNAME(blas_arg_t *args, BLASLONG *range_m, BLASLONG *range_n, FLOAT *sa,
9595
GEMV_N(m - j, j, 0, dm1, a + j, lda, b, 1, b + j, 1, sb);
9696

9797
jp = j + IAMAX_K(m - j, b + j, 1);
98-
if (jp>m) jp = m; //avoid out of boundary
98+
if (jp>m) jp = m; //avoid out of boundary when the iamax kernel does not cope with NaN in input, see gh issue 723
9999
ipiv[j + offset] = jp + offset;
100100
jp--;
101101
temp1 = *(b + jp);

lapack/getf2/zgetf2_k.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ blasint CNAME(blas_arg_t *args, BLASLONG *range_m, BLASLONG *range_n, FLOAT *sa,
9999
GEMV_N(m - j, j, 0, dm1, ZERO, a + j * 2, lda, b, 1, b + j * 2, 1, sb);
100100

101101
jp = j + IAMAX_K(m - j, b + j * 2, 1);
102-
if (jp>m) jp = m; //avoid out of boundary
102+
if (jp>m) jp = m; //avoid out of boundary when the iamax kernel does not cope with NaN in input, see gh issue 723
103103
ipiv[j + offset] = jp + offset;
104104
jp--;
105105

0 commit comments

Comments
 (0)