gonum.org/v1/gonum@v0.14.0/internal/asm/f32/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 f32 9 10 // AxpyUnitary is 11 // 12 // for i, v := range x { 13 // y[i] += alpha * v 14 // } 15 func AxpyUnitary(alpha float32, x, y []float32) 16 17 // AxpyUnitaryTo is 18 // 19 // for i, v := range x { 20 // dst[i] = alpha*v + y[i] 21 // } 22 func AxpyUnitaryTo(dst []float32, alpha float32, x, y []float32) 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 float32, x, y []float32, 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 []float32, incDst, idst uintptr, alpha float32, x, y []float32, n, incX, incY, ix, iy uintptr) 42 43 // DdotUnitary is 44 // 45 // for i, v := range x { 46 // sum += float64(y[i]) * float64(v) 47 // } 48 // return 49 func DdotUnitary(x, y []float32) (sum float64) 50 51 // DdotInc is 52 // 53 // for i := 0; i < int(n); i++ { 54 // sum += float64(y[iy]) * float64(x[ix]) 55 // ix += incX 56 // iy += incY 57 // } 58 // return 59 func DdotInc(x, y []float32, n, incX, incY, ix, iy uintptr) (sum float64) 60 61 // DotUnitary is 62 // 63 // for i, v := range x { 64 // sum += y[i] * v 65 // } 66 // return sum 67 func DotUnitary(x, y []float32) (sum float32) 68 69 // DotInc is 70 // 71 // for i := 0; i < int(n); i++ { 72 // sum += y[iy] * x[ix] 73 // ix += incX 74 // iy += incY 75 // } 76 // return sum 77 func DotInc(x, y []float32, n, incX, incY, ix, iy uintptr) (sum float32) 78 79 // Sum is 80 // 81 // var sum float32 82 // for _, v := range x { 83 // sum += v 84 // } 85 // return sum 86 func Sum(x []float32) float32