mirror of
https://github.com/TECHNOFAB11/zfs-localpv.git
synced 2026-02-03 16:15:11 +01:00
feat(modules): migrate to go modules and bump go version 1.14.4
- migrate to go module - bump go version 1.14.4 Signed-off-by: prateekpandey14 <prateek.pandey@mayadata.io>
This commit is contained in:
parent
f5ae3ff476
commit
fa76b346a0
837 changed files with 104140 additions and 158314 deletions
89
vendor/gonum.org/v1/gonum/lapack/gonum/dlapmt.go
generated
vendored
Normal file
89
vendor/gonum.org/v1/gonum/lapack/gonum/dlapmt.go
generated
vendored
Normal file
|
|
@ -0,0 +1,89 @@
|
|||
// Copyright ©2017 The Gonum Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package gonum
|
||||
|
||||
import "gonum.org/v1/gonum/blas/blas64"
|
||||
|
||||
// Dlapmt rearranges the columns of the m×n matrix X as specified by the
|
||||
// permutation k_0, k_1, ..., k_n-1 of the integers 0, ..., n-1.
|
||||
//
|
||||
// If forward is true a forward permutation is performed:
|
||||
//
|
||||
// X[0:m, k[j]] is moved to X[0:m, j] for j = 0, 1, ..., n-1.
|
||||
//
|
||||
// otherwise a backward permutation is performed:
|
||||
//
|
||||
// X[0:m, j] is moved to X[0:m, k[j]] for j = 0, 1, ..., n-1.
|
||||
//
|
||||
// k must have length n, otherwise Dlapmt will panic. k is zero-indexed.
|
||||
func (impl Implementation) Dlapmt(forward bool, m, n int, x []float64, ldx int, k []int) {
|
||||
switch {
|
||||
case m < 0:
|
||||
panic(mLT0)
|
||||
case n < 0:
|
||||
panic(nLT0)
|
||||
case ldx < max(1, n):
|
||||
panic(badLdX)
|
||||
}
|
||||
|
||||
// Quick return if possible.
|
||||
if m == 0 || n == 0 {
|
||||
return
|
||||
}
|
||||
|
||||
switch {
|
||||
case len(x) < (m-1)*ldx+n:
|
||||
panic(shortX)
|
||||
case len(k) != n:
|
||||
panic(badLenK)
|
||||
}
|
||||
|
||||
// Quick return if possible.
|
||||
if n == 1 {
|
||||
return
|
||||
}
|
||||
|
||||
for i, v := range k {
|
||||
v++
|
||||
k[i] = -v
|
||||
}
|
||||
|
||||
bi := blas64.Implementation()
|
||||
|
||||
if forward {
|
||||
for j, v := range k {
|
||||
if v >= 0 {
|
||||
continue
|
||||
}
|
||||
k[j] = -v
|
||||
i := -v - 1
|
||||
for k[i] < 0 {
|
||||
bi.Dswap(m, x[j:], ldx, x[i:], ldx)
|
||||
|
||||
k[i] = -k[i]
|
||||
j = i
|
||||
i = k[i] - 1
|
||||
}
|
||||
}
|
||||
} else {
|
||||
for i, v := range k {
|
||||
if v >= 0 {
|
||||
continue
|
||||
}
|
||||
k[i] = -v
|
||||
j := -v - 1
|
||||
for j != i {
|
||||
bi.Dswap(m, x[j:], ldx, x[i:], ldx)
|
||||
|
||||
k[j] = -k[j]
|
||||
j = k[j] - 1
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for i := range k {
|
||||
k[i]--
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue