testlapack: quieten vet for unkeyed composite literals in importable code
MODIFY
lapack/testlapack/dgebak.go
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})
}
}

MODIFY
lapack/testlapack/dgebal.go
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)

MODIFY
lapack/testlapack/dlacn2.go
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)
}
}

MODIFY
lapack/testlapack/dorg2l.go
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)
}
}

MODIFY
lapack/testlapack/dorgql.go
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]
}

MODIFY
lapack/testlapack/matgen.go
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]

testlapack: quieten vet for unkeyed composite literals in importable code