Do not use AVX on OSX since we can't detect it reliably at runtime and some CI machines do not seem to have it.

This commit is contained in:
Jussi Pakkanen 2017-02-21 21:53:19 +02:00
parent a27b4c4640
commit fe86c9c399
1 changed files with 6 additions and 1 deletions

View File

@ -12,7 +12,12 @@ int avx_available() {
#include<cpuid.h>
#ifdef __APPLE__
int avx_available() { return 1; }
/*
* Apple ships a broken __builtin_cpu_supports and
* some machines in the CI farm seem to be too
* old to have AVX so just always return 0 here.
*/
int avx_available() { return 0; }
#else
int avx_available() {