asm

package
v2.0.0-beta.2 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2026 License: MIT, BSD-3-Clause Imports: 1 Imported by: 0

README

Vendored SIMD distance kernels

The asm package in this directory is vendored from Weaviate:

  • Source: https://github.com/weaviate/weaviate
  • Path: adapters/repos/db/vector/hnsw/distancer/asm
  • Commit: 6f5e0bb713661c0e1c8edcd4e13ff01025499ecc
  • License: BSD-3-Clause (see LICENSE; copyright © Weaviate B.V.)

Only the dot-product and L2 kernels are vendored (float32, byte/uint8, and mixed float×byte), for amd64 (AVX2/AVX512) and arm64 (NEON/SVE). The hamming, prefetch, geo and the higher-level distancer Provider abstraction were intentionally left out — any-store only needs the raw kernels.

Runtime CPU dispatch (which kernel to select) and all higher-level vector ops (norm, cosine, normalize, residual, the float×int8 quantized path, and the pure-Go fallback used on wasm / non-AVX2 / non-SIMD CPUs) live in the parent internal/simd package, not here.

The .s files are committed assembly (GoAT/avo generated upstream); we do not regenerate them, so no avo/goat build-time toolchain is required.

Do not edit these files by hand. To update, re-vendor from the upstream commit above and re-run the internal/simd tests.

Documentation

Overview

asm only has amd64 specific implementations at the moment

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Dot

func Dot(x []float32, y []float32) float32

func DotAVX256

func DotAVX256(x []float32, y []float32) float32

func DotAVX512

func DotAVX512(x []float32, y []float32) float32

func DotByteAVX256

func DotByteAVX256(x []uint8, y []uint8) uint32

func DotFloatByteAVX256

func DotFloatByteAVX256(x []float32, y []uint8) float32

func L2

func L2(x []float32, y []float32) float32

func L2AVX256

func L2AVX256(x []float32, y []float32) float32

func L2AVX512

func L2AVX512(x []float32, y []float32) float32

func L2ByteAVX256

func L2ByteAVX256(x []uint8, y []uint8) uint32

func L2FloatByteAVX256

func L2FloatByteAVX256(x []float32, y []uint8) float32

Types

This section is empty.

Jump to

Keyboard shortcuts

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