Commit a7baf53d authored by Peter W. Draper's avatar Peter W. Draper

Merge branch 'prelpc_merge' into 'master'

libnuma, immintrin.h detection in configure script

Add a check for the numa.h header (not just the libnuma binary) and a more robust check for vector.h's inclusion of immintrin.h (currently false negative). Also enable example/main.c's -o option - handled, but absent from getopt call.

This is the last of the non-vectorisation changes from local_position_cache.

See merge request !84
parents 472bab56 c0d1b04e
......@@ -270,8 +270,16 @@ AC_CHECK_FUNC(pthread_setaffinity_np, AC_DEFINE([HAVE_SETAFFINITY],[true],
[test "$ac_cv_func_pthread_setaffinity_np" = "yes"])
# Check for libnuma.
AC_CHECK_LIB([numa], [numa_available])
if test "$ac_cv_func_pthread_setaffinity_np" = "yes"; then
# Check for libnuma.
if test "$ac_cv_header_numa_h" = "yes"; then
AC_CHECK_LIB([numa], [numa_available])
# Check for Intel intrinsics header optionally used by vector.h.
# Check for timing functions needed by cycle.h.
......@@ -135,7 +135,7 @@ int main(int argc, char *argv[]) {
bzero(&s, sizeof(struct space));
/* Parse the options */
while ((c = getopt(argc, argv, "a:c:d:f:g:m:q:r:s:t:w:y:z:")) != -1)
while ((c = getopt(argc, argv, "a:c:d:f:g:m:oq:r:s:t:w:y:z:")) != -1)
switch (c) {
case 'a':
if (sscanf(optarg, "%lf", &scaling) != 1)
......@@ -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__)
/* Include the header file with the intrinsics for Intel architecture. */
#include <immintrin.h>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment