blas/gonum: Replace Ger code with calls to internal/asm.
Fix single-precision code generation.
MODIFY
blas/gonum/level2single.go
blas/gonum/level2single.go
@@ -155,34 +155,11 @@ func (Implementation) Sger(m, n int, alpha float32, x []float32, incX int, y []f
if m == 0 || n == 0 || alpha == 0 {
return
}
-
- var ky, kx int
- if incY > 0 {
- ky = 0
- } else {
- ky = -(n - 1) * incY
- }
-
- if incX > 0 {
- kx = 0
- } else {
- kx = -(m - 1) * incX
- }
-
- if incX == 1 && incY == 1 {
- x = x[:m]
- y = y[:n]
- for i, xv := range x {
- f32.AxpyUnitary(alpha*xv, y, a[i*lda:i*lda+n])
- }
- return
- }
-
- ix := kx
- for i := 0; i < m; i++ {
- f32.AxpyInc(alpha*x[ix], y, a[i*lda:i*lda+n], uintptr(n), uintptr(incY), 1, uintptr(ky), 0)
- ix += incX
- }
+ f32.Ger(uintptr(m), uintptr(n),
+ alpha,
+ x, uintptr(incX),
+ y, uintptr(incY),
+ a, uintptr(lda))
}
// Sgbmv computes

MODIFY
blas/gonum/single_precision.bash
blas/gonum/single_precision.bash
@@ -93,6 +93,7 @@ cat level2double.go \
| gofmt -r 'f64.AxpyUnitaryTo -> f32.AxpyUnitaryTo' \
| gofmt -r 'f64.DotInc -> f32.DotInc' \
| gofmt -r 'f64.DotUnitary -> f32.DotUnitary' \
+| gofmt -r 'f64.Ger -> f32.Ger' \
\
| sed -e "s_^\(func (Implementation) \)D\(.*\)\$_$WARNING\1S\2_" \
-e 's_^// D_// S_' \

blas/gonum: Replace Ger code with calls to internal/asm.

Fix single-precision code generation.