mirror of
https://github.com/gonum/gonum.git
synced 2025-10-15 03:30:39 +08:00
asm/f64: Added alignment offset and updated randSlice with source.
This commit is contained in:
@@ -140,6 +140,7 @@ func same(a, b float64) bool {
|
||||
}
|
||||
|
||||
var ( // Offset sets for testing alignment handling in Unitary assembly functions.
|
||||
align1 = []int{0, 1}
|
||||
align2 = newIncSet(0, 1)
|
||||
align3 = newIncToSet(0, 1)
|
||||
)
|
||||
@@ -190,3 +191,14 @@ func randomSlice(n, inc int) []float64 {
|
||||
}
|
||||
return x
|
||||
}
|
||||
|
||||
func randSlice(n, inc int, r *rand.Rand) []float64 {
|
||||
if inc < 0 {
|
||||
inc = -inc
|
||||
}
|
||||
x := make([]float64, (n-1)*inc+1)
|
||||
for i := range x {
|
||||
x[i] = r.Float64()
|
||||
}
|
||||
return x
|
||||
}
|
||||
|
Reference in New Issue
Block a user