f32

package
v0.0.0-...-2c859fb Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 8, 2023 License: GPL-3.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Add

func Add(dst, s []float32)

Add is

for i, v := range s {
	dst[i] += v
}

func AddConst

func AddConst(alpha float32, x []float32)

AddConst is

for i := range x {
	x[i] += alpha
}

func AxpyUnitary

func AxpyUnitary(alpha float32, x, y []float32)

AxpyUnitary is

for i, v := range x {
	y[i] += alpha * v
}

func Div

func Div(dst, s []float32)

Div is

for i, v := range s {
	dst[i] /= v
}

func DivTo

func DivTo(dst, s, t []float32) []float32

DivTo is

for i, v := range s {
	dst[i] = v / t[i]
}
return dst

func DotUnitary

func DotUnitary(x, y []float32) (sum float32)

DotUnitary is

for i, v := range x {
	sum += y[i] * v
}
return sum

func ScalUnitary

func ScalUnitary(alpha float32, x []float32)

ScalUnitary is

for i := range x {
	x[i] *= alpha
}

func ScalUnitaryTo

func ScalUnitaryTo(dst []float32, alpha float32, x []float32)

ScalUnitaryTo is

for i, v := range x {
	dst[i] = alpha * v
}

func Sum

func Sum(x []float32) float32

Sum is

var sum float32
for i := range x {
    sum += x[i]
}

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL