Help us shape the future of Go! Take the 2026 Go Developer Survey

simd

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2024 License: MIT Imports: 7 Imported by: 3

README

SIMD (Single Instruction, Multiple Data)

Simd support via Plan9 assemble code for arithmetic and bitwise operations. Allowing for parallel element-wise computations. Resulting in 200 - 470% speedup. Currently only 64-bit x86 is supported. Future 64-bit ARM support is planned.

Function Documentation

AMD64 Simd Performance:

Large Vectors Medium Vectors Large Vectors

AMD64 Simd Support

SSE SSE2 SSE4.1 AVX AVX2
AddFloat32 SUPPORTED SUPPORTED
AddFloat64 SUPPORTED SUPPORTED
AddInt32 SUPPORTED SUPPORTED
AddInt64 SUPPORTED SUPPORTED
AndInt32 SUPPORTED SUPPORTED
AndInt64 SUPPORTED SUPPORTED
DivFloat32 SUPPORTED SUPPORTED
DivFloat64 SUPPORTED SUPPORTED
DivInt32
DivInt64
MulFloat32 SUPPORTED SUPPORTED
MulFloat64 SUPPORTED SUPPORTED
MulInt32 SUPPORTED SUPPORTED
MulInt64
OrInt32 SUPPORTED SUPPORTED
OrInt64 SUPPORTED SUPPORTED
SubFloat32 SUPPORTED SUPPORTED
SubFloat64 SUPPORTED SUPPORTED
SubInt32 SUPPORTED SUPPORTED
SubInt64 SUPPORTED SUPPORTED
XorInt32 SUPPORTED SUPPORTED
XorInt64 SUPPORTED SUPPORTED

Documentation

Overview

Simd support for arithmetic operations. Allowing for parallel element-wise computations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddFloat32

func AddFloat32(left, right, result []float32) int

AddFloat32 performs element-wise addition on left and right, storing the sums in result. The operation is performed up to the shortest length of left, right, and result. Returns the number of operations performed.

func AddFloat64

func AddFloat64(left, right, result []float64) int

AddFloat64 performs element-wise addition on left and right, storing the sums in result. The operation is performed up to the shortest length of left, right, and result. Returns the number of operations performed.

func AddInt32

func AddInt32(left, right, result []int32) int

AddInt32 performs element-wise addition on left and right, storing the sums in result. The operation is performed up to the shortest length of left, right, and result. Returns the number of operations performed.

func AddInt64

func AddInt64(left, right, result []int64) int

AddInt64 performs element-wise addition on left and right, storing the sums in result. The operation is performed up to the shortest length of left, right, and result. Returns the number of operations performed.

func AndInt32

func AndInt32(left, right, result []int32) int

AndInt32 performs element-wise AND on left and right, storing the results in result. The operation is performed up to the shortest length of left, right, and result. Returns the number of operations performed.

func AndInt64

func AndInt64(left, right, result []int64) int

AndInt64 performs element-wise AND on left and right, storing the results in result. The operation is performed up to the shortest length of left, right, and result. Returns the number of operations performed.

func DivFloat32

func DivFloat32(left, right, result []float32) int

DivFloat32 performs element-wise division on left and right, storing the quotients in result. The operation is performed up to the shortest length of left, right, and result. Returns the number of operations performed.

func DivFloat64

func DivFloat64(left, right, result []float64) int

DivFloat64 performs element-wise division on left and right, storing the quotients in result. The operation is performed up to the shortest length of left, right, and result. Returns the number of operations performed.

func DivInt32

func DivInt32(left, right, result []int32) int

DivInt32 performs element-wise division on left and right, storing the quotients in result. The operation is performed up to the shortest length of left, right, and result. Returns the number of operations performed.

func DivInt64

func DivInt64(left, right, result []int64) int

DivInt64 performs element-wise division on left and right, storing the quotients in result. The operation is performed up to the shortest length of left, right, and result. Returns the number of operations performed.

func MulFloat32

func MulFloat32(left, right, result []float32) int

MulFloat32 performs element-wise multiplication on left and right, storing the products in result. The operation is performed up to the shortest length of left, right, and result. Returns the number of operations performed.

func MulFloat64

func MulFloat64(left, right, result []float64) int

MulFloat64 performs element-wise multiplication on left and right, storing the products in result. The operation is performed up to the shortest length of left, right, and result. Returns the number of operations performed.

func MulInt32

func MulInt32(left, right, result []int32) int

MulInt32 performs element-wise multiplication on left and right, storing the products in result. The operation is performed up to the shortest length of left, right, and result. Returns the number of operations performed.

func MulInt64

func MulInt64(left, right, result []int64) int

MulInt64 performs element-wise multiplication on left and right, storing the products in result. The operation is performed up to the shortest length of left, right, and result. Returns the number of operations performed.

func OrInt32

func OrInt32(left, right, result []int32) int

OrInt32 performs element-wise OR on left and right, storing the results in result. The operation is performed up to the shortest length of left, right, and result. Returns the number of operations performed.

func OrInt64

func OrInt64(left, right, result []int64) int

OrInt64 performs element-wise OR on left and right, storing the results in result. The operation is performed up to the shortest length of left, right, and result. Returns the number of operations performed.

func SubFloat32

func SubFloat32(left, right, result []float32) int

SubFloat32 performs element-wise subtraction on left and right, storing the differences in result. The operation is performed up to the shortest length of left, right, and result. Returns the number of operations performed.

func SubFloat64

func SubFloat64(left, right, result []float64) int

SubFloat64 performs element-wise subtraction on left and right, storing the differences in result. The operation is performed up to the shortest length of left, right, and result. Returns the number of operations performed.

func SubInt32

func SubInt32(left, right, result []int32) int

SubInt32 performs element-wise subtraction on left and right, storing the differences in result. The operation is performed up to the shortest length of left, right, and result. Returns the number of operations performed.

func SubInt64

func SubInt64(left, right, result []int64) int

SubInt64 performs element-wise subtraction on left and right, storing the differences in result. The operation is performed up to the shortest length of left, right, and result. Returns the number of operations performed.

func XorInt32

func XorInt32(left, right, result []int32) int

XorInt32 performs element-wise XOR on left and right, storing the results in result. The operation is performed up to the shortest length of left, right, and result. Returns the number of operations performed.

func XorInt64

func XorInt64(left, right, result []int64) int

XorInt64 performs element-wise XOR on left and right, storing the results in result. The operation is performed up to the shortest length of left, right, and result. Returns the number of operations performed.

Types

This section is empty.

Directories

Path Synopsis
internal
avx
sse

Jump to

Keyboard shortcuts

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