asm/f64: Added alignment offset and updated randSlice with source.

This commit is contained in:
Chad Kunde
2017-04-27 21:30:40 -07:00
parent 5a20f3cddc
commit 1c707a77a2

View File

@@ -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
}