github.com/egonelbre/exp@v0.0.0-20240430123955-ed1d3aa93911/vector/analyse/example2.go (about) 1 //go:build ignore 2 3 package define 4 5 func Axpy(alpha float32, xs []float32, incx uintptr, ys []float32, incy uintptr, n uintptr) { 6 var xi, yi uintptr 7 for i := uintptr(0); i < n; i++ { 8 ys[yi] += alpha * xs[xi] 9 xi += incx 10 yi += incy 11 } 12 }