floats

package
v0.4.6 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Add

func Add(dst, s []float32)

Add two vectors: dst = dst + s

func AddTo

func AddTo(a, b, dst []float32)

AddTo adds two vectors and saves the result in dst: dst = a + b

func Div

func Div(dst, s []float32)

Div one vectors by another: dst = dst / s

func Dot

func Dot(a, b []float32) (ret float32)

Dot two vectors.

func MatZero

func MatZero(x [][]float32)

MatZero fills zeros in a matrix of 32-bit floats.

func MulAddTo

func MulAddTo(a, b, c []float32)

MulAddTo multiplies a vector and a vector, then adds to a vector: c += a * b

func MulConst

func MulConst(dst []float32, c float32)

MulConst multiplies a vector with a const: dst = dst * c

func MulConstAddTo

func MulConstAddTo(a []float32, c float32, dst []float32)

MulConstAddTo multiplies a vector and a const, then adds to dst: dst = dst + a * c

func MulConstTo

func MulConstTo(a []float32, c float32, dst []float32)

MulConstTo multiplies a vector and a const, then saves the result in dst: dst = a * c

func MulTo

func MulTo(a, b, c []float32)

func Sub

func Sub(dst, s []float32)

Sub one vector by another: dst = dst - s

func SubTo

func SubTo(a, b, dst []float32)

SubTo subtracts one vector by another and saves the result in dst: dst = a - b

func Zero

func Zero(a []float32)

Zero fills zeros in a slice of 32-bit floats.

Types

This section is empty.

Jump to

Keyboard shortcuts

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