mirror of
https://github.com/gonum/gonum.git
synced 2025-10-25 00:00:24 +08:00
native,cgo: replace string literal in Dlasrt with string const
This commit is contained in:
@@ -37,6 +37,7 @@ const (
|
|||||||
badShifts = "lapack: bad shifts"
|
badShifts = "lapack: bad shifts"
|
||||||
badSide = "lapack: bad side"
|
badSide = "lapack: bad side"
|
||||||
badSlice = "lapack: bad input slice length"
|
badSlice = "lapack: bad input slice length"
|
||||||
|
badSort = "lapack: bad Sort"
|
||||||
badStore = "lapack: bad store"
|
badStore = "lapack: bad store"
|
||||||
badTau = "lapack: tau has insufficient length"
|
badTau = "lapack: tau has insufficient length"
|
||||||
badTauQ = "lapack: tauQ has insufficient length"
|
badTauQ = "lapack: tauQ has insufficient length"
|
||||||
@@ -462,7 +463,7 @@ func (impl Implementation) Dlasrt(s lapack.Sort, n int, d []float64) {
|
|||||||
checkVector(n, d, 1)
|
checkVector(n, d, 1)
|
||||||
switch s {
|
switch s {
|
||||||
default:
|
default:
|
||||||
panic("lapack: bad sort")
|
panic(badSort)
|
||||||
case lapack.SortIncreasing, lapack.SortDecreasing:
|
case lapack.SortIncreasing, lapack.SortDecreasing:
|
||||||
}
|
}
|
||||||
lapacke.Dlasrt(byte(s), n, d[:n])
|
lapacke.Dlasrt(byte(s), n, d[:n])
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ func (impl Implementation) Dlasrt(s lapack.Sort, n int, d []float64) {
|
|||||||
d = d[:n]
|
d = d[:n]
|
||||||
switch s {
|
switch s {
|
||||||
default:
|
default:
|
||||||
panic("lapack: bad sort")
|
panic(badSort)
|
||||||
case lapack.SortIncreasing:
|
case lapack.SortIncreasing:
|
||||||
sort.Float64s(d)
|
sort.Float64s(d)
|
||||||
case lapack.SortDecreasing:
|
case lapack.SortDecreasing:
|
||||||
|
|||||||
@@ -41,6 +41,7 @@ const (
|
|||||||
badShifts = "lapack: bad shifts"
|
badShifts = "lapack: bad shifts"
|
||||||
badSide = "lapack: bad side"
|
badSide = "lapack: bad side"
|
||||||
badSlice = "lapack: bad input slice length"
|
badSlice = "lapack: bad input slice length"
|
||||||
|
badSort = "lapack: bad Sort"
|
||||||
badStore = "lapack: bad store"
|
badStore = "lapack: bad store"
|
||||||
badTau = "lapack: tau has insufficient length"
|
badTau = "lapack: tau has insufficient length"
|
||||||
badTauQ = "lapack: tauQ has insufficient length"
|
badTauQ = "lapack: tauQ has insufficient length"
|
||||||
|
|||||||
Reference in New Issue
Block a user