Welcome to mirror list, hosted at ThFree Co, Russian Federation.

avx512bw.cc « compile_test - github.com/marian-nmt/intgemm.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 2cd4c6aac6595f3655c98b6230941993af2c19d4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// Some compilers don't have AVX512BW support.  Test for them.
#include <immintrin.h>

#if defined(_MSC_VER)
#define INTGEMM_AVX512BW
#elif defined(__INTEL_COMPILER)
#define INTGEMM_AVX512BW __attribute__ ((target ("avx512f")))
#else
#define INTGEMM_AVX512BW __attribute__ ((target ("avx512bw")))
#endif

INTGEMM_AVX512BW int Test() {
  // AVX512BW
  __m512i value = _mm512_set1_epi32(1);
  value = _mm512_maddubs_epi16(value, value);
  return *(int*)&value;
}

int main() {
}