Skip to content
AVX(Advanced Vector Extensions) binding for golang.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.travis.yml
LICENSE
README.md
avx.go
avx_test.go

README.md

go-avx Build Status

AVX(Advanced Vector Extensions) binding for golang.

Golang code example

package main

import (
	"fmt"

	avx "github.com/monochromegane/go-avx"
)

func main() {
	dim := 8
	x := avx.MmMalloc(dim)
	y := avx.MmMalloc(dim)
	z := avx.MmMalloc(dim)
	defer avx.MmFree(x)
	defer avx.MmFree(y)
	defer avx.MmFree(z)

	for i := 0; i < dim; i++ {
		x[i] = float32(i)
		y[i] = float32(i + 1)
	}

	avx.Add(dim, x, y, z)

	fmt.Printf("%v\n", z) // [1 3 5 7 9 11 13 15]
}

Features

  • Add
  • Sub
  • Mul
  • Dot
  • EuclideanDistance

See also avx_test.go.

License

MIT

Author

monochromegane

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.