package f32
import "gonum.org/v1/gonum/internal/asm/f32"
Package f32 provides float32 vector primitives.
Index ¶
- func AxpyInc(alpha float32, x, y []float32, n, incX, incY, ix, iy uintptr)
- func AxpyIncTo(dst []float32, incDst, idst uintptr, alpha float32, x, y []float32, n, incX, incY, ix, iy uintptr)
- func AxpyUnitary(alpha float32, x, y []float32)
- func AxpyUnitaryTo(dst []float32, alpha float32, x, y []float32)
- func DdotInc(x, y []float32, n, incX, incY, ix, iy uintptr) (sum float64)
- func DdotUnitary(x, y []float32) (sum float64)
- func DotInc(x, y []float32, n, incX, incY, ix, iy uintptr) (sum float32)
- func DotUnitary(x, y []float32) (sum float32)
- func GemvN(m, n uintptr, alpha float32, a []float32, lda uintptr, x []float32, incX uintptr, beta float32, y []float32, incY uintptr)
- func GemvT(m, n uintptr, alpha float32, a []float32, lda uintptr, x []float32, incX uintptr, beta float32, y []float32, incY uintptr)
- func Ger(m, n uintptr, alpha float32, x []float32, incX uintptr, y []float32, incY uintptr, a []float32, lda uintptr)
- func L2DistanceUnitary(x, y []float32) (sum float32)
- func L2NormInc(x []float32, n, incX uintptr) (sum float32)
- func L2NormUnitary(x []float32) (sum float32)
- func ScalInc(alpha float32, x []float32, n, incX uintptr)
- func ScalIncTo(dst []float32, incDst uintptr, alpha float32, x []float32, n, incX uintptr)
- func ScalUnitary(alpha float32, x []float32)
- func ScalUnitaryTo(dst []float32, alpha float32, x []float32)
- func Sum(x []float32) float32
Functions ¶
func AxpyInc ¶
AxpyInc is
for i := 0; i < int(n); i++ {
y[iy] += alpha * x[ix]
ix += incX
iy += incY
}
func AxpyIncTo ¶
func AxpyIncTo(dst []float32, incDst, idst uintptr, alpha float32, x, y []float32, n, incX, incY, ix, iy uintptr)
AxpyIncTo is
for i := 0; i < int(n); i++ {
dst[idst] = alpha*x[ix] + y[iy]
ix += incX
iy += incY
idst += incDst
}
func AxpyUnitary ¶
AxpyUnitary is
for i, v := range x {
y[i] += alpha * v
}
func AxpyUnitaryTo ¶
AxpyUnitaryTo is
for i, v := range x {
dst[i] = alpha*v + y[i]
}
func DdotInc ¶
DdotInc is
for i := 0; i < int(n); i++ {
sum += float64(y[iy]) * float64(x[ix])
ix += incX
iy += incY
}
return
func DdotUnitary ¶
DdotUnitary is
for i, v := range x {
sum += float64(y[i]) * float64(v)
}
return
func DotInc ¶
DotInc is
for i := 0; i < int(n); i++ {
sum += y[iy] * x[ix]
ix += incX
iy += incY
}
return sum
func DotUnitary ¶
DotUnitary is
for i, v := range x {
sum += y[i] * v
}
return sum
func GemvN ¶
func GemvN(m, n uintptr, alpha float32, a []float32, lda uintptr, x []float32, incX uintptr, beta float32, y []float32, incY uintptr)
GemvN computes
y = alpha * A * x + beta * y
where A is an m×n dense matrix, x and y are vectors, and alpha and beta are scalars.
func GemvT ¶
func GemvT(m, n uintptr, alpha float32, a []float32, lda uintptr, x []float32, incX uintptr, beta float32, y []float32, incY uintptr)
GemvT computes
y = alpha * Aᵀ * x + beta * y
where A is an m×n dense matrix, x and y are vectors, and alpha and beta are scalars.
func Ger ¶
func Ger(m, n uintptr, alpha float32, x []float32, incX uintptr, y []float32, incY uintptr, a []float32, lda uintptr)
Ger performs the rank-one operation
A += alpha * x * yᵀ
where A is an m×n dense matrix, x and y are vectors, and alpha is a scalar.
func L2DistanceUnitary ¶
L2DistanceUnitary is the L2 norm of x-y.
func L2NormInc ¶
L2NormInc is the level 2 norm of x.
func L2NormUnitary ¶
L2NormUnitary is the level 2 norm of x.
func ScalInc ¶
ScalInc is
var ix uintptr
for i := 0; i < int(n); i++ {
x[ix] *= alpha
ix += incX
}
func ScalIncTo ¶
ScalIncTo is
var idst, ix uintptr
for i := 0; i < int(n); i++ {
dst[idst] = alpha * x[ix]
ix += incX
idst += incDst
}
func ScalUnitary ¶
ScalUnitary is
for i := range x {
x[i] *= alpha
}
func ScalUnitaryTo ¶
ScalUnitaryTo is
for i, v := range x {
dst[i] = alpha * v
}
func Sum ¶
Sum is
var sum float32
for _, v := range x {
sum += v
}
return sum
Source Files ¶
doc.go ge_amd64.go gemv.go l2norm.go scal.go stubs_amd64.go
- Version
- v0.16.0 (latest)
- Published
- Mar 21, 2025
- Platform
- linux/amd64
- Imports
- 1 packages
- Last checked
- 1 month ago –
Tools for package owners.