floats

package
v0.1.5-0...-4262119 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2021 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package floats provides functions for numeric computations.

There are two implementations:

  • gonum version: implemented by gonum. It is the default implementation.
  • AVX2 version: implemented by AVX2 instructions. This implementation should be built with `avx2` tag.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Add

func Add(dst, s []float64)

Add two vectors: dst = dst + s

func AddTo

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

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

func Div

func Div(dst, s []float64)

Div one vectors by another: dst = dst / s

func Dot

func Dot(a, b []float64) float64

Dot two vectors.

func Mul

func Mul(dst, s []float64)

Mul two vectors: dst = dst * s

func MulConst

func MulConst(dst []float64, c float64)

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

func MulConstAddTo

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

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

func MulConstTo

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

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

func Sub

func Sub(dst, s []float64)

Sub one vector by another: dst = dst - s

func SubTo

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

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

Types

This section is empty.

Jump to

Keyboard shortcuts

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