Skip to content

Commit

Permalink
Refs #723. Avoid out of boundary for getf2.
Browse files Browse the repository at this point in the history
  • Loading branch information
xianyi committed Jan 26, 2016
1 parent f5df444 commit 13f0f8c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions lapack/getf2/getf2_k.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ blasint CNAME(blas_arg_t *args, BLASLONG *range_m, BLASLONG *range_n, FLOAT *sa,
GEMV_N(m - j, j, 0, dm1, a + j, lda, b, 1, b + j, 1, sb);

jp = j + IAMAX_K(m - j, b + j, 1);
if (jp>m) jp = m; //avoid out of boundary
ipiv[j + offset] = jp + offset;
jp--;
temp1 = *(b + jp);
Expand Down
1 change: 1 addition & 0 deletions lapack/getf2/zgetf2_k.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ blasint CNAME(blas_arg_t *args, BLASLONG *range_m, BLASLONG *range_n, FLOAT *sa,
GEMV_N(m - j, j, 0, dm1, ZERO, a + j * 2, lda, b, 1, b + j * 2, 1, sb);

jp = j + IAMAX_K(m - j, b + j * 2, 1);
if (jp>m) jp = m; //avoid out of boundary
ipiv[j + offset] = jp + offset;
jp--;

Expand Down

0 comments on commit 13f0f8c

Please sign in to comment.