Commit 1af545aa authored by Angus Lepper's avatar Angus Lepper
Browse files

configure script detects immintrin.h availability

parent fb21976f
......@@ -273,6 +273,9 @@ AM_CONDITIONAL(HAVESETAFFINITY,
# Check for libnuma.
AC_CHECK_LIB([numa], [numa_available])
# Check for Intel intrinsics header optionally used by vector.h.
AC_CHECK_HEADERS([immintrin.h])
# Check for timing functions needed by cycle.h.
AC_HEADER_TIME
AC_CHECK_HEADERS([sys/time.h c_asm.h intrinsics.h mach/mach_time.h])
......
......@@ -23,11 +23,12 @@
/* Have I already read this file? */
#ifndef VEC_MACRO
#include "../config.h"
/* Need to check whether compiler supports this (IBM does not)
This will prevent the macros to be defined and switch off
explicit vectorization if the compiled does not support it */
#if defined(__GNUC__) && defined(__i386__)
#ifdef HAVE_IMMINTRIN_H
/* Include the header file with the intrinsics for Intel architecture. */
#include <immintrin.h>
#endif
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment