lapack/testlapack: use real arguments in workspace query calls
MODIFY
lapack/testlapack/dgeev.go
lapack/testlapack/dgeev.go
@@ -579,7 +579,7 @@ func testDgeev(t *testing.T, impl Dgeever, tc string, test dgeevTest, jobvl lapa
}
case mediumWork:
work := make([]float64, 1)
- impl.Dgeev(jobvl, jobvr, n, nil, 1, nil, nil, nil, 1, nil, 1, work, -1)
+ impl.Dgeev(jobvl, jobvr, n, a.Data, a.Stride, wr, wi, vl.Data, vl.Stride, vr.Data, vr.Stride, work, -1)
if jobvl == lapack.LeftEVCompute || jobvr == lapack.RightEVCompute {
lwork = (int(work[0]) + 4*n) / 2
} else {
@@ -588,7 +588,7 @@ func testDgeev(t *testing.T, impl Dgeever, tc string, test dgeevTest, jobvl lapa
lwork = max(1, lwork)
case optimumWork:
work := make([]float64, 1)
- impl.Dgeev(jobvl, jobvr, n, nil, 1, nil, nil, nil, 1, nil, 1, work, -1)
+ impl.Dgeev(jobvl, jobvr, n, a.Data, a.Stride, wr, wi, vl.Data, vl.Stride, vr.Data, vr.Stride, work, -1)
lwork = int(work[0])
}
work := make([]float64, lwork)

MODIFY
lapack/testlapack/dgeev_bench.go
lapack/testlapack/dgeev_bench.go
@@ -46,7 +46,7 @@ func DgeevBenchmark(b *testing.B, impl Dgeever) {
wr := make([]float64, n)
wi := make([]float64, n)
work := make([]float64, 1)
- impl.Dgeev(lapack.LeftEVCompute, lapack.RightEVCompute, n, nil, n, nil, nil, nil, n, nil, n, work, -1)
+ impl.Dgeev(lapack.LeftEVCompute, lapack.RightEVCompute, n, a.Data, a.Stride, wr, wi, vl.Data, vl.Stride, vr.Data, vr.Stride, work, -1)
work = make([]float64, int(work[0]))
b.Run(bm.name, func(b *testing.B) {
for i := 0; i < b.N; i++ {

MODIFY
lapack/testlapack/dgehrd.go
lapack/testlapack/dgehrd.go
@@ -93,7 +93,7 @@ func testDgehrd(t *testing.T, impl Dgehrder, n, ilo, ihi, extra int, optwork boo
var work []float64
if optwork {
work = nanSlice(1)
- impl.Dgehrd(n, ilo, ihi, nil, a.Stride, nil, work, -1)
+ impl.Dgehrd(n, ilo, ihi, a.Data, a.Stride, tau, work, -1)
work = nanSlice(int(work[0]))
} else {
work = nanSlice(max(1, n))

MODIFY
lapack/testlapack/dhseqr.go
lapack/testlapack/dhseqr.go
@@ -70,7 +70,7 @@ func testDhseqr(t *testing.T, impl Dhseqrer, i int, test dhseqrTest, job lapack.
work := nanSlice(max(1, n))
if optwork {
- impl.Dhseqr(job, lapack.SchurHess, n, ilo, ihi, nil, h.Stride, nil, nil, nil, z.Stride, work, -1)
+ impl.Dhseqr(job, lapack.SchurHess, n, ilo, ihi, h.Data, h.Stride, wr, wi, z.Data, z.Stride, work, -1)
work = nanSlice(int(work[0]))
}

MODIFY
lapack/testlapack/dlaqr04.go
lapack/testlapack/dlaqr04.go
@@ -318,7 +318,7 @@ func testDlaqr04(t *testing.T, impl Dlaqr04er, test dlaqr04Test, optwork bool, r
var work []float64
if optwork {
work = nanSlice(1)
- impl.Dlaqr04(wantt, wantz, n, ilo, ihi, nil, 0, nil, nil, iloz, ihiz, nil, 0, work, -1, recur)
+ impl.Dlaqr04(wantt, wantz, n, ilo, ihi, h.Data, h.Stride, wr, wi, iloz, ihiz, z.Data, z.Stride, work, -1, recur)
work = nanSlice(int(work[0]))
} else {
work = nanSlice(max(1, n))

MODIFY
lapack/testlapack/dlaqr23.go
lapack/testlapack/dlaqr23.go
@@ -280,8 +280,8 @@ func testDlaqr23(t *testing.T, impl Dlaqr23er, test dlaqr23Test, opt bool, recur
if opt {
// Allocate work slice with optimal length.
work = nanSlice(1)
- impl.Dlaqr23(wantt, wantz, n, ktop, kbot, nw, nil, h.Stride, iloz, ihiz, nil, z.Stride,
- nil, nil, nil, v.Stride, tmat.Cols, nil, tmat.Stride, wv.Rows, nil, wv.Stride, work, -1, recur)
+ impl.Dlaqr23(wantt, wantz, n, ktop, kbot, nw, h.Data, h.Stride, iloz, ihiz, z.Data, z.Stride,
+ sr, si, v.Data, v.Stride, tmat.Cols, tmat.Data, tmat.Stride, wv.Rows, wv.Data, wv.Stride, work, -1, recur)
work = nanSlice(int(work[0]))
} else {
// Allocate work slice with minimum length.

MODIFY
lapack/testlapack/dorgql.go
lapack/testlapack/dorgql.go
@@ -94,12 +94,12 @@ func DorgqlTest(t *testing.T, impl Dorgqler) {
lwork = max(1, n)
case mediumWork:
work := make([]float64, 1)
- impl.Dorgql(m, n, k, nil, a.Stride, nil, work, -1)
+ impl.Dorgql(m, n, k, a.Data, a.Stride, tau, work, -1)
lwork = (int(work[0]) + n) / 2
lwork = max(1, lwork)
case optimumWork:
work := make([]float64, 1)
- impl.Dorgql(m, n, k, nil, a.Stride, nil, work, -1)
+ impl.Dorgql(m, n, k, a.Data, a.Stride, tau, work, -1)
lwork = int(work[0])
}
work := make([]float64, lwork)

MODIFY
lapack/testlapack/dormqr.go
lapack/testlapack/dormqr.go
@@ -114,7 +114,7 @@ func DormqrTest(t *testing.T, impl Dormqrer) {
// Try with the optimum amount of work
copy(c, cCopy)
- impl.Dormqr(side, trans, mc, nc, k, nil, lda, nil, nil, ldc, work, -1)
+ impl.Dormqr(side, trans, mc, nc, k, a, lda, tau, c, ldc, work, -1)
work = make([]float64, int(work[0]))
for i := range work {
work[i] = rnd.Float64()

MODIFY
lapack/testlapack/dtrevc3.go
lapack/testlapack/dtrevc3.go
@@ -108,7 +108,8 @@ func testDtrevc3(t *testing.T, impl Dtrevc3er, side lapack.EVSide, howmny lapack
work := make([]float64, max(1, 3*n))
if optwork {
- impl.Dtrevc3(side, howmny, nil, n, nil, 1, nil, 1, nil, 1, mWant, work, -1)
+ impl.Dtrevc3(side, howmny, selected, n, tmat.Data, tmat.Stride,
+ vl.Data, vl.Stride, vr.Data, vr.Stride, mWant, work, -1)
work = make([]float64, int(work[0]))
}

lapack/testlapack: use real arguments in workspace query calls