diff options
author | Mateusz Chudyk <mateuszchudyk@gmail.com> | 2019-05-31 15:03:53 +0300 |
---|---|---|
committer | Mateusz Chudyk <mateuszchudyk@gmail.com> | 2019-06-14 14:21:17 +0300 |
commit | 18ca85b30d1af7e9fdd91570098b78c823424df1 (patch) | |
tree | daa6150250547caaa0b9b53c6cebebcc10bb0f42 /interleave.h | |
parent | 7424a95c7ce7e5cf495b0e14806a90e780e5dd71 (diff) |
Move setzero_si from interleave.h to intrinsics.h
Diffstat (limited to 'interleave.h')
-rw-r--r-- | interleave.h | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/interleave.h b/interleave.h index 76e8a5a..0b51a63 100644 --- a/interleave.h +++ b/interleave.h @@ -1,12 +1,8 @@ #pragma once +#include "intrinsics.h" #include "types.h" -#include <emmintrin.h> -#include <immintrin.h> -#include <tmmintrin.h> -#include <xmmintrin.h> - #include <cassert> #include <stdint.h> @@ -46,26 +42,11 @@ target static inline void Interleave64(type &first, type &second) { \ first = temp; \ } - -template <class Register> static inline Register setzero_si() __attribute__((always_inline));; - INTGEMM_INTERLEAVE(INTGEMM_SSE2, __m128i, ) -template <> INTGEMM_SSE2 inline __m128i setzero_si<__m128i>() { - return _mm_setzero_si128(); -} - INTGEMM_INTERLEAVE(INTGEMM_AVX2, __m256i, 256) -template <> INTGEMM_AVX2 inline __m256i setzero_si<__m256i>() { - return _mm256_setzero_si256(); -} #ifndef INTGEMM_NO_AVX512 INTGEMM_INTERLEAVE(INTGEMM_AVX512BW, __m512i, 512) -/* Only INTGEMM_AVX512F is necessary but due to GCC 5.4 bug we have to set INTGEMM_AVX512BW */ -template <> INTGEMM_AVX512BW inline __m512i setzero_si<__m512i>() { - return _mm512_setzero_si512(); -} #endif - #define INTGEMM_SWAP(target, Register) \ target static inline void Swap(Register &a, Register &b) { \ Register tmp = a; \ |