asm/f32:  Adding stubs for dot asm functions.
MODIFY
internal/asm/f32/stubs_amd64.go
internal/asm/f32/stubs_amd64.go
@@ -34,3 +34,35 @@ func AxpyInc(alpha float32, x, y []float32, n, incX, incY, ix, iy uintptr)
// idst += incDst
// }
func AxpyIncTo(dst []float32, incDst, idst uintptr, alpha float32, x, y []float32, n, incX, incY, ix, iy uintptr)
+
+// DdotUnitary is
+// for i, v := range x {
+// sum += float64(y[i]) * float64(v)
+// }
+// return
+func DdotUnitary(x, y []float32) (sum float64)
+
+// DdotInc is
+// for i := 0; i < int(n); i++ {
+// sum += float64(y[iy]) * float64(x[ix])
+// ix += incX
+// iy += incY
+// }
+// return
+func DdotInc(x, y []float32, n, incX, incY, ix, iy uintptr) (sum float64)
+
+// DotUnitary is
+// for i, v := range x {
+// sum += y[i] * v
+// }
+// return sum
+func DotUnitary(x, y []float32) (sum float32)
+
+// DotInc is
+// for i := 0; i < int(n); i++ {
+// sum += y[iy] * x[ix]
+// ix += incX
+// iy += incY
+// }
+// return sum
+func DotInc(x, y []float32, n, incX, incY, ix, iy uintptr) (sum float32)

MODIFY
internal/asm/f32/stubs_noasm.go
internal/asm/f32/stubs_noasm.go
@@ -55,3 +55,59 @@ func AxpyIncTo(dst []float32, incDst, idst uintptr, alpha float32, x, y []float3
idst += incDst
}
}
+
+// DotUnitary is
+// for i, v := range x {
+// sum += y[i] * v
+// }
+// return sum
+func DotUnitary(x, y []float32) (sum float32) {
+ for i, v := range x {
+ sum += y[i] * v
+ }
+ return sum
+}
+
+// DotInc is
+// for i := 0; i < int(n); i++ {
+// sum += y[iy] * x[ix]
+// ix += incX
+// iy += incY
+// }
+// return sum
+func DotInc(x, y []float32, n, incX, incY, ix, iy uintptr) (sum float32) {
+ for i := 0; i < int(n); i++ {
+ sum += y[iy] * x[ix]
+ ix += incX
+ iy += incY
+ }
+ return sum
+}
+
+// DdotUnitary is
+// for i, v := range x {
+// sum += float64(y[i]) * float64(v)
+// }
+// return
+func DdotUnitary(x, y []float32) (sum float64) {
+ for i, v := range x {
+ sum += float64(y[i]) * float64(v)
+ }
+ return
+}
+
+// DdotInc is
+// for i := 0; i < int(n); i++ {
+// sum += float64(y[iy]) * float64(x[ix])
+// ix += incX
+// iy += incY
+// }
+// return
+func DdotInc(x, y []float32, n, incX, incY, ix, iy uintptr) (sum float64) {
+ for i := 0; i < int(n); i++ {
+ sum += float64(y[iy]) * float64(x[ix])
+ ix += incX
+ iy += incY
+ }
+ return
+}

asm/f32:  Adding stubs for dot asm functions.