jwang11 / golang-avx Goto Github PK
View Code? Open in Web Editor NEWdemo how to use avx/avx2/avx512 in golang
demo how to use avx/avx2/avx512 in golang
$ git clone https://github.com/jwang11/golang-avx.git
$ cd golang-avx
$ go tool cgo avx512.go
./golang-avx/avx512.go:20:26: error: always_inline function '_mm256_maddubs_epi16' requires target feature 'avx2', but would be inlined into function 'avx2_dot_int8' that is compiled without support for 'avx2'
__m256i vresult1 = _mm256_maddubs_epi16(vx[i], vy[i]);
^
./golang-avx/avx512.go:20:26: error: AVX vector argument of type '__m256i' (vector of 4 'long long' values) without 'avx' enabled changes the ABI
./golang-avx/avx512.go:21:26: error: always_inline function '_mm256_madd_epi16' requires target feature 'avx2', but would be inlined into function 'avx2_dot_int8' that is compiled without support for 'avx2'
__m256i vresult2 = _mm256_madd_epi16(vresult1, *(__m256i *)&op4);
^
./golang-avx/avx512.go:21:26: error: AVX vector argument of type '__m256i' (vector of 4 'long long' values) without 'avx' enabled changes the ABI
./golang-avx/avx512.go:23:23: error: always_inline function '_mm256_add_epi32' requires target feature 'avx2', but would be inlined into function 'avx2_dot_int8' that is compiled without support for 'avx2'
*(__m256i *)t = _mm256_add_epi32(vsum, vresult2);
^
./golang-avx/avx512.go:23:23: error: AVX vector argument of type '__m256i' (vector of 4 'long long' values) without 'avx' enabled changes the ABI
6 errors generated.
$ go version
go version go1.16.6 darwin/amd64
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.