testlapack: add unused parameter k to Dlagsy for future implementation
MODIFY
testlapack/dpotrf.go
testlapack/dpotrf.go
@@ -61,7 +61,7 @@ func DpotrfTest(t *testing.T, impl Dpotrfer) {
lda = n
}
a := make([]float64, n*lda)
- Dlagsy(n, d, a, lda, rnd, make([]float64, 2*n))
+ Dlagsy(n, 0, d, a, lda, rnd, make([]float64, 2*n))
aCopy := make([]float64, len(a))
copy(aCopy, a)
@@ -125,7 +125,7 @@ func DpotrfTest(t *testing.T, impl Dpotrfer) {
// Make one element of D negative so that A is not
// positive definite, and check that Dpotrf fails.
d[0] *= -1
- Dlagsy(n, d, a, lda, rnd, make([]float64, 2*n))
+ Dlagsy(n, 0, d, a, lda, rnd, make([]float64, 2*n))
ok = impl.Dpotrf(uplo, n, a, lda)
if ok {
t.Errorf("Case %v: unexpected success for not positive definite matrix", tc)

MODIFY
testlapack/matgen.go
testlapack/matgen.go
@@ -125,8 +125,14 @@ func Dlatm1(dst []float64, mode int, cond float64, rsign bool, dist int, rnd *ra
// A = U * D * U^T.
//
// work must have length at least 2*n, otherwise Dlagsy will panic.
-func Dlagsy(n int, d []float64, a []float64, lda int, rnd *rand.Rand, work []float64) {
+//
+// The parameter k is unused but it must satisfy
+// 0 <= k <= n-1.
+func Dlagsy(n, k int, d []float64, a []float64, lda int, rnd *rand.Rand, work []float64) {
checkMatrix(n, n, a, lda)
+ if k < 0 || n-1 < k {
+ panic("testlapack: invalid value of k")
+ }
if len(d) != n {
panic("testlapack: bad length of d")
}

testlapack: add unused parameter k to Dlagsy for future implementation