asm/c128: Adding asm stubs for Dot functions.
MODIFY
internal/asm/c128/stubs_amd64.go
internal/asm/c128/stubs_amd64.go
@@ -62,3 +62,35 @@ func ScalInc(alpha complex128, x []complex128, n, inc uintptr)
// x[i] *= alpha
// }
func ScalUnitary(alpha complex128, x []complex128)
+
+// DotcUnitary is
+// for i, v := range x {
+// sum += y[i] * cmplx.Conj(v)
+// }
+// return sum
+func DotcUnitary(x, y []complex128) (sum complex128)
+
+// DotcInc is
+// for i := 0; i < int(n); i++ {
+// sum += y[iy] * cmplx.Conj(x[ix])
+// ix += incX
+// iy += incY
+// }
+// return sum
+func DotcInc(x, y []complex128, n, incX, incY, ix, iy uintptr) (sum complex128)
+
+// DotuUnitary is
+// for i, v := range x {
+// sum += y[i] * v
+// }
+// return sum
+func DotuUnitary(x, y []complex128) (sum complex128)
+
+// DotuInc is
+// for i := 0; i < int(n); i++ {
+// sum += y[iy] * x[ix]
+// ix += incX
+// iy += incY
+// }
+// return sum
+func DotuInc(x, y []complex128, n, incX, incY, ix, iy uintptr) (sum complex128)

MODIFY
internal/asm/c128/stubs_noasm.go
internal/asm/c128/stubs_noasm.go
package c128
+import "math/cmplx"
+
// AxpyUnitary is
// for i, v := range x {
// y[i] += alpha * v
@@ -103,3 +105,59 @@ func ScalUnitary(alpha complex128, x []complex128) {
x[i] *= alpha
}
}
+
+// DotcUnitary is
+// for i, v := range x {
+// sum += y[i] * cmplx.Conj(v)
+// }
+// return sum
+func DotcUnitary(x, y []complex128) (sum complex128) {
+ for i, v := range x {
+ sum += y[i] * cmplx.Conj(v)
+ }
+ return sum
+}
+
+// DotcInc is
+// for i := 0; i < int(n); i++ {
+// sum += y[iy] * cmplx.Conj(x[ix])
+// ix += incX
+// iy += incY
+// }
+// return sum
+func DotcInc(x, y []complex128, n, incX, incY, ix, iy uintptr) (sum complex128) {
+ for i := 0; i < int(n); i++ {
+ sum += y[iy] * cmplx.Conj(x[ix])
+ ix += incX
+ iy += incY
+ }
+ return sum
+}
+
+// DotuUnitary is
+// for i, v := range x {
+// sum += y[i] * v
+// }
+// return sum
+func DotuUnitary(x, y []complex128) (sum complex128) {
+ for i, v := range x {
+ sum += y[i] * v
+ }
+ return sum
+}
+
+// DotuInc is
+// for i := 0; i < int(n); i++ {
+// sum += y[iy] * x[ix]
+// ix += incX
+// iy += incY
+// }
+// return sum
+func DotuInc(x, y []complex128, n, incX, incY, ix, iy uintptr) (sum complex128) {
+ for i := 0; i < int(n); i++ {
+ sum += y[iy] * x[ix]
+ ix += incX
+ iy += incY
+ }
+ return sum
+}

asm/c128: Adding asm stubs for Dot functions.