github.com/jingcheng-WU/gonum@v0.9.1-0.20210323123734-f1a2a11a8f7b/internal/asm/c64/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 // +build !noasm,!gccgo,!safe 6 7 package c64 8 9 // AxpyUnitary is 10 // for i, v := range x { 11 // y[i] += alpha * v 12 // } 13 func AxpyUnitary(alpha complex64, x, y []complex64) 14 15 // AxpyUnitaryTo is 16 // for i, v := range x { 17 // dst[i] = alpha*v + y[i] 18 // } 19 func AxpyUnitaryTo(dst []complex64, alpha complex64, x, y []complex64) 20 21 // AxpyInc is 22 // for i := 0; i < int(n); i++ { 23 // y[iy] += alpha * x[ix] 24 // ix += incX 25 // iy += incY 26 // } 27 func AxpyInc(alpha complex64, x, y []complex64, n, incX, incY, ix, iy uintptr) 28 29 // AxpyIncTo is 30 // for i := 0; i < int(n); i++ { 31 // dst[idst] = alpha*x[ix] + y[iy] 32 // ix += incX 33 // iy += incY 34 // idst += incDst 35 // } 36 func AxpyIncTo(dst []complex64, incDst, idst uintptr, alpha complex64, x, y []complex64, n, incX, incY, ix, iy uintptr) 37 38 // DotcUnitary is 39 // for i, v := range x { 40 // sum += y[i] * conj(v) 41 // } 42 // return sum 43 func DotcUnitary(x, y []complex64) (sum complex64) 44 45 // DotcInc is 46 // for i := 0; i < int(n); i++ { 47 // sum += y[iy] * conj(x[ix]) 48 // ix += incX 49 // iy += incY 50 // } 51 // return sum 52 func DotcInc(x, y []complex64, n, incX, incY, ix, iy uintptr) (sum complex64) 53 54 // DotuUnitary is 55 // for i, v := range x { 56 // sum += y[i] * v 57 // } 58 // return sum 59 func DotuUnitary(x, y []complex64) (sum complex64) 60 61 // DotuInc is 62 // for i := 0; i < int(n); i++ { 63 // sum += y[iy] * x[ix] 64 // ix += incX 65 // iy += incY 66 // } 67 // return sum 68 func DotuInc(x, y []complex64, n, incX, incY, ix, iy uintptr) (sum complex64)