gonum.org/v1/gonum@v0.14.0/internal/asm/c128/stubs_amd64.go (about) 1 // Copyright ©2016 The Gonum Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 //go:build !noasm && !gccgo && !safe 6 // +build !noasm,!gccgo,!safe 7 8 package c128 9 10 // AxpyUnitary is 11 // 12 // for i, v := range x { 13 // y[i] += alpha * v 14 // } 15 func AxpyUnitary(alpha complex128, x, y []complex128) 16 17 // AxpyUnitaryTo is 18 // 19 // for i, v := range x { 20 // dst[i] = alpha*v + y[i] 21 // } 22 func AxpyUnitaryTo(dst []complex128, alpha complex128, x, y []complex128) 23 24 // AxpyInc is 25 // 26 // for i := 0; i < int(n); i++ { 27 // y[iy] += alpha * x[ix] 28 // ix += incX 29 // iy += incY 30 // } 31 func AxpyInc(alpha complex128, x, y []complex128, n, incX, incY, ix, iy uintptr) 32 33 // AxpyIncTo is 34 // 35 // for i := 0; i < int(n); i++ { 36 // dst[idst] = alpha*x[ix] + y[iy] 37 // ix += incX 38 // iy += incY 39 // idst += incDst 40 // } 41 func AxpyIncTo(dst []complex128, incDst, idst uintptr, alpha complex128, x, y []complex128, n, incX, incY, ix, iy uintptr) 42 43 // DscalUnitary is 44 // 45 // for i, v := range x { 46 // x[i] = complex(real(v)*alpha, imag(v)*alpha) 47 // } 48 func DscalUnitary(alpha float64, x []complex128) 49 50 // DscalInc is 51 // 52 // var ix uintptr 53 // for i := 0; i < int(n); i++ { 54 // x[ix] = complex(real(x[ix])*alpha, imag(x[ix])*alpha) 55 // ix += inc 56 // } 57 func DscalInc(alpha float64, x []complex128, n, inc uintptr) 58 59 // ScalInc is 60 // 61 // var ix uintptr 62 // for i := 0; i < int(n); i++ { 63 // x[ix] *= alpha 64 // ix += incX 65 // } 66 func ScalInc(alpha complex128, x []complex128, n, inc uintptr) 67 68 // ScalUnitary is 69 // 70 // for i := range x { 71 // x[i] *= alpha 72 // } 73 func ScalUnitary(alpha complex128, x []complex128) 74 75 // DotcUnitary is 76 // 77 // for i, v := range x { 78 // sum += y[i] * cmplx.Conj(v) 79 // } 80 // return sum 81 func DotcUnitary(x, y []complex128) (sum complex128) 82 83 // DotcInc is 84 // 85 // for i := 0; i < int(n); i++ { 86 // sum += y[iy] * cmplx.Conj(x[ix]) 87 // ix += incX 88 // iy += incY 89 // } 90 // return sum 91 func DotcInc(x, y []complex128, n, incX, incY, ix, iy uintptr) (sum complex128) 92 93 // DotuUnitary is 94 // 95 // for i, v := range x { 96 // sum += y[i] * v 97 // } 98 // return sum 99 func DotuUnitary(x, y []complex128) (sum complex128) 100 101 // DotuInc is 102 // 103 // for i := 0; i < int(n); i++ { 104 // sum += y[iy] * x[ix] 105 // ix += incX 106 // iy += incY 107 // } 108 // return sum 109 func DotuInc(x, y []complex128, n, incX, incY, ix, iy uintptr) (sum complex128)