compileTestAvx2.cpp 642 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37

#include <x86intrin.h>
#include <xmmintrin.h> // SSE
#include <emmintrin.h> // SSE2
#include <pmmintrin.h> // SSE3
#include <tmmintrin.h> // SSSE3
#include <smmintrin.h> // SSE4

#include <immintrin.h> // AVX

int main(){
	{
	#ifdef __MIC__
		__m512d res0d, res1d;
		res0d = _mm512_hadd_pd(res0d, res1d);

		__m512 res0, res1;
		res0 = _mm512_hadd_ps(res0, res1);
	#endif
	}
	{
		__m256d res0d, res1d;
		res0d = _mm256_hadd_pd(res0d, res1d);

		__m256 res0, res1;
		res0 = _mm256_hadd_ps(res0, res1);
	}
	{
		__m128d res0d, res1d;
		res0d = _mm_hadd_pd(res0d, res1d);

		__m128 res0, res1;
		res0 = _mm_hadd_ps(res0, res1);
	}
	return 0;
}