vec

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: May 4, 2026 License: ISC Imports: 1 Imported by: 0

Documentation

Overview

Package vec provides both vectorized assembly and pure-go implementations for various algorithms. The vectorized implementation using SSE instructions is used if the package is built using the "sse" build tag.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AbsF

func AbsF(r []float64, x []float64)

func AbsI

func AbsI(r []int64, x []int64)

func AddBB

func AddBB(r []int64, x []byte, y []byte)

func AddBi

func AddBi(r []int64, x []byte, y int64)

func AddFF

func AddFF(r []float64, x []float64, y []float64)

func AddFf

func AddFf(r []float64, x []float64, y float64)

func AddIB

func AddIB(r []int64, x []int64, y []byte)

func AddII

func AddII(r []int64, x []int64, y []int64)

func AddIi

func AddIi(r []int64, x []int64, y int64)

func AndBB

func AndBB(r []byte, x []byte, y []byte)

func AndBb

func AndBb(r []byte, x []byte, y uint32)

func AndIb

func AndIb(r []byte, x []int64, y uint32)

func AndIi

func AndIi(r []int64, x []int64, y int64)

func AndO

func AndO(x []byte) int64

func B2I

func B2I(r []int64, x []byte)

func CaseOBB

func CaseOBB(r []byte, x []byte, y []byte)

func CaseOBb

func CaseOBb(r []byte, x []byte, y uint32)

func Ceil

func Ceil(r []float64, x []float64)

func DivFF

func DivFF(r []float64, x []float64, y []float64)

func DivFf

func DivFf(r []float64, x []float64, y float64)

func DivIp2

func DivIp2(r, x []int64, y int64)

DivIp2 divides x by 2^y. TODO: vectorize (no quadword arithmetic shift in SSE?)

func DivfF

func DivfF(r []float64, x float64, y []float64)

func Enum

func Enum(r []int64)

func EqBB

func EqBB(r []byte, x []byte, y []byte)

func EqBb

func EqBb(r []byte, x []byte, y uint32)

func EqFF

func EqFF(r []byte, x []float64, y []float64)

func EqIB

func EqIB(r []byte, x []int64, y []byte)

func EqII

func EqII(r []byte, x []int64, y []int64)

func EqfF

func EqfF(r []byte, x float64, y []float64)

func EqiI

func EqiI(r []byte, x int64, y []int64)

func Floor

func Floor(r []float64, x []float64)

func GtBB

func GtBB(r []byte, x []byte, y []byte)

func GtBI

func GtBI(r []byte, x []byte, y []int64)

func GtBb

func GtBb(r []byte, x []byte, y uint32)

func GtFF

func GtFF(r []byte, x []float64, y []float64)

func GtFf

func GtFf(r []byte, x []float64, y float64)

func GtIB

func GtIB(r []byte, x []int64, y []byte)

func GtII

func GtII(r []byte, x []int64, y []int64)

func GtIi

func GtIi(r []byte, x []int64, y int64)

func GtbB

func GtbB(r []byte, x uint32, y []byte)

func GtfF

func GtfF(r []byte, x float64, y []float64)

func GtiI

func GtiI(r []byte, x int64, y []int64)

func MaxB

func MaxB(x uint32, y []byte) int64

func MaxBB

func MaxBB(r []byte, x []byte, y []byte)

func MaxBb

func MaxBb(r []byte, x []byte, y uint32)

func MaxF

func MaxF(x float64, y []float64) float64

func MaxFF

func MaxFF(r []float64, x []float64, y []float64)

func MaxFf

func MaxFf(r []float64, x []float64, y float64)

func MaxI

func MaxI(x int64, y []int64) int64

func MinB

func MinB(x uint32, y []byte) int64

func MinBB

func MinBB(r []byte, x []byte, y []byte)

func MinBb

func MinBb(r []byte, x []byte, y uint32)

func MinF

func MinF(x float64, y []float64) float64

func MinFF

func MinFF(r []float64, x []float64, y []float64)

func MinFf

func MinFf(r []float64, x []float64, y float64)

func MinI

func MinI(x int64, y []int64) int64

func MinMaxB

func MinMaxB(mi uint32, ma uint32, y []byte) (uint32, uint32)

func MinMaxI

func MinMaxI(mi, ma int64, y []int64) (int64, int64)

MinMaxI folds over y searching for min and max. It doesn't directly translate to any primitive but is used for computing range by some. NOTE: SSE vectorized version was not much of an improvement on my machines.

func MulFF

func MulFF(r []float64, x []float64, y []float64)

func MulFf

func MulFf(r []float64, x []float64, y float64)

func MulIp2

func MulIp2(r, x []int64, y int64)

MulIp2 multiplies x by 2^y. TODO: vectorize (no quadword arithmetic shift in SSE?)

func MulOB

func MulOB(r []byte, x []byte, y []byte)

func MulOI

func MulOI(r []int64, x []byte, y []int64)

func MulOb

func MulOb(r []byte, x []byte, y uint32)

func MulOi

func MulOi(r []int64, x []byte, y int64)

func NaN

func NaN(r []byte, x []float64)

func NotO

func NotO(r []byte, x []byte)

func OrBB

func OrBB(r []byte, x []byte, y []byte)

func OrO

func OrO(x []byte) int64

func RoundToEven

func RoundToEven(r []float64, x []float64)

func ScanMaxF

func ScanMaxF(r []float64, x float64, y []float64)

func ScanMinF

func ScanMinF(r []float64, x float64, y []float64)

func ScanSumF

func ScanSumF(r []float64, x float64, y []float64)

func ScanSumI

func ScanSumI(r []int64, x int64, y []int64)

func SignF

func SignF(r []float64, x []float64)

func SignI

func SignI(r []int64, x []int64)

func Sqrt

func Sqrt(r []float64, x []float64)

func SubBB

func SubBB(r []int64, x []byte, y []byte)

func SubBI

func SubBI(r []int64, x []byte, y []int64)

func SubFF

func SubFF(r []float64, x []float64, y []float64)

func SubIB

func SubIB(r []int64, x []int64, y []byte)

func SubII

func SubII(r []int64, x []int64, y []int64)

func SubfF

func SubfF(r []float64, x float64, y []float64)

func SubiB

func SubiB(r []int64, x int64, y []byte)

func SubiI

func SubiI(r []int64, x int64, y []int64)

func SumB

func SumB(x []byte) int64

func SumF

func SumF(x []float64) float64

func SumI

func SumI(x []int64) int64

func WAddBB

func WAddBB(r []byte, x []byte, y []byte)

func WAddBi

func WAddBi(r []byte, x []byte, y int32)

Types

This section is empty.

Jump to

Keyboard shortcuts

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