diff --git a/lapack/testlapack/dgebak.go b/lapack/testlapack/dgebak.go index 01529274..21875fbd 100644 --- a/lapack/testlapack/dgebak.go +++ b/lapack/testlapack/dgebak.go @@ -73,14 +73,14 @@ func testDgebak(t *testing.T, impl Dgebaker, job lapack.BalanceJob, side lapack. for i := n - 1; i > ihi; i-- { scale[i] = float64(rnd.Intn(i + 1)) blas64.Swap(n, - blas64.Vector{p.Data[i:], p.Stride}, - blas64.Vector{p.Data[int(scale[i]):], p.Stride}) + blas64.Vector{Data: p.Data[i:], Inc: p.Stride}, + blas64.Vector{Data: p.Data[int(scale[i]):], Inc: p.Stride}) } for i := 0; i < ilo; i++ { scale[i] = float64(i + rnd.Intn(ihi-i+1)) blas64.Swap(n, - blas64.Vector{p.Data[i:], p.Stride}, - blas64.Vector{p.Data[int(scale[i]):], p.Stride}) + blas64.Vector{Data: p.Data[i:], Inc: p.Stride}, + blas64.Vector{Data: p.Data[int(scale[i]):], Inc: p.Stride}) } } diff --git a/lapack/testlapack/dgebal.go b/lapack/testlapack/dgebal.go index 93e8a67c..5688a8ff 100644 --- a/lapack/testlapack/dgebal.go +++ b/lapack/testlapack/dgebal.go @@ -92,12 +92,12 @@ func testDgebal(t *testing.T, impl Dgebaler, job lapack.BalanceJob, a blas64.Gen t.Errorf("%v: invalid ordering of ilo=%v and ihi=%v", prefix, ilo, ihi) } - if ilo >= 2 && !isUpperTriangular(blas64.General{ilo - 1, ilo - 1, a.Data, a.Stride}) { + if ilo >= 2 && !isUpperTriangular(blas64.General{Rows: ilo - 1, Cols: ilo - 1, Data: a.Data, Stride: a.Stride}) { t.Errorf("%v: T1 is not upper triangular", prefix) } m := n - ihi - 1 // Order of T2. k := ihi + 1 - if m >= 2 && !isUpperTriangular(blas64.General{m, m, a.Data[k*a.Stride+k:], a.Stride}) { + if m >= 2 && !isUpperTriangular(blas64.General{Rows: m, Cols: m, Data: a.Data[k*a.Stride+k:], Stride: a.Stride}) { t.Errorf("%v: T2 is not upper triangular", prefix) } @@ -145,13 +145,13 @@ func testDgebal(t *testing.T, impl Dgebaler, job lapack.BalanceJob, a blas64.Gen p := eye(n, n) for j := n - 1; j > ihi; j-- { blas64.Swap(n, - blas64.Vector{p.Data[j:], p.Stride}, - blas64.Vector{p.Data[int(scale[j]):], p.Stride}) + blas64.Vector{Data: p.Data[j:], Inc: p.Stride}, + blas64.Vector{Data: p.Data[int(scale[j]):], Inc: p.Stride}) } for j := 0; j < ilo; j++ { blas64.Swap(n, - blas64.Vector{p.Data[j:], p.Stride}, - blas64.Vector{p.Data[int(scale[j]):], p.Stride}) + blas64.Vector{Data: p.Data[j:], Inc: p.Stride}, + blas64.Vector{Data: p.Data[int(scale[j]):], Inc: p.Stride}) } // Compute P^T*A*P and store into want. ap := zeros(n, n, n) diff --git a/lapack/testlapack/dlacn2.go b/lapack/testlapack/dlacn2.go index 57c9e134..00d288c8 100644 --- a/lapack/testlapack/dlacn2.go +++ b/lapack/testlapack/dlacn2.go @@ -55,10 +55,10 @@ func Dlacn2Test(t *testing.T, impl Dlacn2er) { case 0: break loop case 1: - blas64.Gemv(blas.NoTrans, 1, a, blas64.Vector{x, 1}, 0, blas64.Vector{work, 1}) + blas64.Gemv(blas.NoTrans, 1, a, blas64.Vector{Data: x, Inc: 1}, 0, blas64.Vector{Data: work, Inc: 1}) copy(x, work) case 2: - blas64.Gemv(blas.Trans, 1, a, blas64.Vector{x, 1}, 0, blas64.Vector{work, 1}) + blas64.Gemv(blas.Trans, 1, a, blas64.Vector{Data: x, Inc: 1}, 0, blas64.Vector{Data: work, Inc: 1}) copy(x, work) } } diff --git a/lapack/testlapack/dorg2l.go b/lapack/testlapack/dorg2l.go index 4de68273..aae30bf3 100644 --- a/lapack/testlapack/dorg2l.go +++ b/lapack/testlapack/dorg2l.go @@ -48,7 +48,7 @@ func Dorg2lTest(t *testing.T, impl Dorg2ler) { impl.Dgeql2(m, n, a, lda, tau, work) impl.Dorg2l(m, n, k, a, lda, tau[n-k:], work) - if !hasOrthonormalColumns(blas64.General{m, n, a, lda}) { + if !hasOrthonormalColumns(blas64.General{Rows: m, Cols: n, Data: a, Stride: lda}) { t.Errorf("Case m=%v, n=%v, k=%v: columns of Q not orthonormal", m, n, k) } } diff --git a/lapack/testlapack/dorgql.go b/lapack/testlapack/dorgql.go index a56a4fbe..6bf1090f 100644 --- a/lapack/testlapack/dorgql.go +++ b/lapack/testlapack/dorgql.go @@ -71,7 +71,7 @@ func DorgqlTest(t *testing.T, impl Dorgqler) { h := eye(m, m) jj := m - k + l j := n - k + l - v := blas64.Vector{make([]float64, m), 1} + v := blas64.Vector{Data: make([]float64, m), Inc: 1} for i := 0; i < jj; i++ { v.Data[i] = a.Data[i*a.Stride+j] } diff --git a/lapack/testlapack/general.go b/lapack/testlapack/general.go index c22844dd..494eeef3 100644 --- a/lapack/testlapack/general.go +++ b/lapack/testlapack/general.go @@ -1290,7 +1290,7 @@ func isRightEigenvectorOf(a blas64.General, xRe, xIm []float64, lambda complex12 // Compute A real(x) and store the result into xReAns. xReAns := make([]float64, n) - blas64.Gemv(blas.NoTrans, 1, a, blas64.Vector{xRe, 1}, 0, blas64.Vector{xReAns, 1}) + blas64.Gemv(blas.NoTrans, 1, a, blas64.Vector{Data: xRe, Inc: 1}, 0, blas64.Vector{Data: xReAns, Inc: 1}) if imag(lambda) == 0 && xIm == nil { // Real eigenvalue and eigenvector. @@ -1308,7 +1308,7 @@ func isRightEigenvectorOf(a blas64.General, xRe, xIm []float64, lambda complex12 // Compute A imag(x) and store the result into xImAns. xImAns := make([]float64, n) - blas64.Gemv(blas.NoTrans, 1, a, blas64.Vector{xIm, 1}, 0, blas64.Vector{xImAns, 1}) + blas64.Gemv(blas.NoTrans, 1, a, blas64.Vector{Data: xIm, Inc: 1}, 0, blas64.Vector{Data: xImAns, Inc: 1}) // Compute λx and store the result into lambdax. lambdax := make([]complex128, n) @@ -1349,7 +1349,7 @@ func isLeftEigenvectorOf(a blas64.General, yRe, yIm []float64, lambda complex128 // Compute A^T real(y) and store the result into yReAns. yReAns := make([]float64, n) - blas64.Gemv(blas.Trans, 1, a, blas64.Vector{yRe, 1}, 0, blas64.Vector{yReAns, 1}) + blas64.Gemv(blas.Trans, 1, a, blas64.Vector{Data: yRe, Inc: 1}, 0, blas64.Vector{Data: yReAns, Inc: 1}) if imag(lambda) == 0 && yIm == nil { // Real eigenvalue and eigenvector. @@ -1367,7 +1367,7 @@ func isLeftEigenvectorOf(a blas64.General, yRe, yIm []float64, lambda complex128 // Compute A^T imag(y) and store the result into yImAns. yImAns := make([]float64, n) - blas64.Gemv(blas.Trans, 1, a, blas64.Vector{yIm, 1}, 0, blas64.Vector{yImAns, 1}) + blas64.Gemv(blas.Trans, 1, a, blas64.Vector{Data: yIm, Inc: 1}, 0, blas64.Vector{Data: yImAns, Inc: 1}) // Compute conj(λ)y and store the result into lambday. lambda = cmplx.Conj(lambda) diff --git a/lapack/testlapack/matgen.go b/lapack/testlapack/matgen.go index ac0017bc..eca472c9 100644 --- a/lapack/testlapack/matgen.go +++ b/lapack/testlapack/matgen.go @@ -716,7 +716,7 @@ func applyReflector(qh blas64.General, q blas64.General, v []float64) { panic("bad size of q") } qv := make([]float64, n) - blas64.Gemv(blas.NoTrans, 1, q, blas64.Vector{v, 1}, 0, blas64.Vector{qv, 1}) + blas64.Gemv(blas.NoTrans, 1, q, blas64.Vector{Data: v, Inc: 1}, 0, blas64.Vector{Data: qv, Inc: 1}) for i := 0; i < n; i++ { for j := 0; j < n; j++ { qh.Data[i*qh.Stride+j] = q.Data[i*q.Stride+j]