Skip to content

Instantly share code, notes, and snippets.

@kaityo256
Created May 16, 2017 10:30
Show Gist options
  • Save kaityo256/d43800424e03305bcb6cef3b1764d30a to your computer and use it in GitHub Desktop.
Save kaityo256/d43800424e03305bcb6cef3b1764d30a to your computer and use it in GitHub Desktop.
AVX-512 sample
#include <immintrin.h>
extern __attribute__((aligned(64))) double z[1000000];
typedef double v8df __attribute__((vector_size(64)));
typedef double v4df __attribute__((vector_size(32)));
void
func(int i, v4df &zl, v4df &zh){
v8df zi = _mm512_load_pd((double*)(z + i));
zl = _mm512_extractf64x4_pd(zi,0);
zh = _mm512_extractf64x4_pd(zi,1);
}
@kaityo256
Copy link
Author

Try following options.

$ icpc -O3 -xHOST -S test.cpp 
$ icpc -O3 -xMIC-AVX512 -S test.cpp 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment