Commit 7801d26
committed
Fix off-by-one in superb allocation for svd
valgrind reports errors in SVD. There is very little documentation on
the 'superb' argument of *gesvd. Intel MKL documentation states that its
size should be min(m, n) - 2. However, in the MKL examples min(m, n)
- 1 is used:
https://software.intel.com/sites/products/documentation/doclib/mkl_sa/11/mkl_lapack_examples/lapacke_dgesvd_row.c.htm
Changing the size of superb to min(m, n) -1 resolved the memory error in
valgrind.1 parent 4614d0e commit 7801d26
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
| 53 | + | |
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| |||
0 commit comments