//go:build amd64 package cpu // hasAVX2Kernel signals whether the AVX2 assembly implementation is available. const hasAVX2Kernel = true //go:noescape func dotAVX2(a *float32, b *float32, n int) float32 //go:noescape func axpyAVX2(alpha float32, x *float32, y *float32, n int) func dotFloat32AVX2(a, b []float32) float32 { if len(a) == 0 { return 0 } return dotAVX2(&a[0], &b[0], len(a)) } func axpyFloat32AVX2(alpha float32, x, y []float32) { if len(x) == 0 { return } axpyAVX2(alpha, &x[0], &y[0], len(x)) }