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

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

#if defined(_MSC_VER)
#define INTGEMM_AVX2
#else
#define INTGEMM_AVX2 __attribute__ ((target ("avx2")))
#endif

INTGEMM_AVX2 int Test() {
  __m256i value = _mm256_set1_epi32(1);
  value = _mm256_abs_epi8(value);
  return *(int*)&value;
}

int main() {
}