1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
|
// +build sse avx
package vecf64
// Add performs a̅ + b̅. a̅ will be clobbered
func Add(a, b []float64) {
if len(a) != len(b) {
panic("vectors must be the same length")
}
addAsm(a, b)
}
func addAsm(a, b []float64)
// Sub performs a̅ - b̅. a̅ will be clobbered
func Sub(a, b []float64) {
if len(a) != len(b) {
panic("vectors must be the same length")
}
subAsm(a, b)
}
func subAsm(a, b []float64)
// Mul performs a̅ × b̅. a̅ will be clobbered
func Mul(a, b []float64) {
if len(a) != len(b) {
panic("vectors must be the same length")
}
mulAsm(a, b)
}
func mulAsm(a, b []float64)
// Div performs a̅ ÷ b̅. a̅ will be clobbered
func Div(a, b []float64) {
if len(a) != len(b) {
panic("vectors must be the same length")
}
divAsm(a, b)
}
func divAsm(a, b []float64)
// Sqrt performs √a̅ elementwise. a̅ will be clobbered
func Sqrt(a []float64)
// InvSqrt performs 1/√a̅ elementwise. a̅ will be clobbered
func InvSqrt(a []float64)
/*
func Pow(a, b []float64)
*/
/*
func Scale(s float64, a []float64)
func ScaleFrom(s float64, a []float64)
func Trans(s float64, a []float64)
func TransFrom(s float64, a []float64)
func Power(s float64, a []float64)
func PowerFrom(s float64, a []float64)
*/
|