lapack/gonum: use real arguments in workspace query calls
MODIFY
lapack/gonum/dgeev.go
lapack/gonum/dgeev.go
@@ -117,19 +117,19 @@ func (impl Implementation) Dgeev(jobvl lapack.LeftEVJob, jobvr lapack.RightEVJob
if wantvl || wantvr {
maxwrk = max(maxwrk, 2*n+(n-1)*impl.Ilaenv(1, "DORGHR", " ", n, 1, n, -1))
impl.Dhseqr(lapack.EigenvaluesAndSchur, lapack.SchurOrig, n, 0, n-1,
- nil, 1, nil, nil, nil, 1, work, -1)
+ a, lda, wr, wi, vl, ldvl, work, -1)
maxwrk = max(maxwrk, max(n+1, n+int(work[0])))
side := lapack.EVLeft
if wantvr {
side = lapack.EVRight
}
- impl.Dtrevc3(side, lapack.EVAllMulQ, nil, n, nil, 1, nil, 1, nil, 1,
+ impl.Dtrevc3(side, lapack.EVAllMulQ, nil, n, a, lda, vl, ldvl, vr, ldvr,
n, work, -1)
maxwrk = max(maxwrk, n+int(work[0]))
maxwrk = max(maxwrk, 4*n)
} else {
impl.Dhseqr(lapack.EigenvaluesOnly, lapack.SchurNone, n, 0, n-1,
- nil, 1, nil, nil, nil, 1, work, -1)
+ a, lda, wr, wi, vr, ldvr, work, -1)
maxwrk = max(maxwrk, max(n+1, n+int(work[0])))
}
maxwrk = max(maxwrk, minwrk)

MODIFY
lapack/gonum/dhseqr.go
lapack/gonum/dhseqr.go
@@ -181,7 +181,7 @@ func (impl Implementation) Dhseqr(job lapack.SchurJob, compz lapack.SchurComp, n
// Quick return in case of a workspace query.
if lwork == -1 {
- impl.Dlaqr04(wantt, wantz, n, ilo, ihi, nil, 0, nil, nil, ilo, ihi, nil, 0, work, -1, 1)
+ impl.Dlaqr04(wantt, wantz, n, ilo, ihi, h, ldh, wr, wi, ilo, ihi, z, ldz, work, -1, 1)
work[0] = math.Max(float64(n), work[0])
return 0
}

MODIFY
lapack/gonum/dlaqr04.go
lapack/gonum/dlaqr04.go
@@ -217,8 +217,8 @@ func (impl Implementation) Dlaqr04(wantt, wantz bool, n, ilo, ihi int, h []float
nsr = max(2, nsr&^1)
// Workspace query call to Dlaqr23.
- impl.Dlaqr23(wantt, wantz, n, ilo, ihi, nwr+1, nil, 0, iloz, ihiz, nil, 0,
- nil, nil, nil, 0, n, nil, 0, n, nil, 0, work, -1, recur)
+ impl.Dlaqr23(wantt, wantz, n, ilo, ihi, nwr+1, h, ldh, iloz, ihiz, z, ldz,
+ wr, wi, h, ldh, n, h, ldh, n, h, ldh, work, -1, recur)
// Optimal workspace is max(Dlaqr5, Dlaqr23).
lwkopt := max(3*nsr/2, int(work[0]))
// Quick return in case of workspace query.

MODIFY
lapack/gonum/dlaqr23.go
lapack/gonum/dlaqr23.go
@@ -137,14 +137,14 @@ func (impl Implementation) Dlaqr23(wantt, wantz bool, n, ktop, kbot, nw int, h [
lwkopt := max(1, 2*nw)
if jw > 2 {
// Workspace query call to Dgehrd.
- impl.Dgehrd(jw, 0, jw-2, nil, 0, nil, work, -1)
+ impl.Dgehrd(jw, 0, jw-2, t, ldt, work, work, -1)
lwk1 := int(work[0])
// Workspace query call to Dormhr.
- impl.Dormhr(blas.Right, blas.NoTrans, jw, jw, 0, jw-2, nil, 0, nil, nil, 0, work, -1)
+ impl.Dormhr(blas.Right, blas.NoTrans, jw, jw, 0, jw-2, t, ldt, work, v, ldv, work, -1)
lwk2 := int(work[0])
if recur > 0 {
// Workspace query call to Dlaqr04.
- impl.Dlaqr04(true, true, jw, 0, jw-1, nil, 0, nil, nil, 0, jw-1, nil, 0, work, -1, recur-1)
+ impl.Dlaqr04(true, true, jw, 0, jw-1, t, ldt, sr, si, 0, jw-1, v, ldv, work, -1, recur-1)
lwk3 := int(work[0])
// Optimal workspace.
lwkopt = max(jw+max(lwk1, lwk2), lwk3)

lapack/gonum: use real arguments in workspace query calls