Skip to content
Snippets Groups Projects
Commit a7baf53d authored by Peter W. Draper's avatar Peter W. Draper
Browse files

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
No related branches found
No related tags found
1 merge request!136Master
...@@ -270,8 +270,16 @@ AC_CHECK_FUNC(pthread_setaffinity_np, AC_DEFINE([HAVE_SETAFFINITY],[true], ...@@ -270,8 +270,16 @@ AC_CHECK_FUNC(pthread_setaffinity_np, AC_DEFINE([HAVE_SETAFFINITY],[true],
AM_CONDITIONAL(HAVESETAFFINITY, AM_CONDITIONAL(HAVESETAFFINITY,
[test "$ac_cv_func_pthread_setaffinity_np" = "yes"]) [test "$ac_cv_func_pthread_setaffinity_np" = "yes"])
# Check for libnuma. if test "$ac_cv_func_pthread_setaffinity_np" = "yes"; then
AC_CHECK_LIB([numa], [numa_available]) # Check for libnuma.
AC_CHECK_HEADER([numa.h])
if test "$ac_cv_header_numa_h" = "yes"; then
AC_CHECK_LIB([numa], [numa_available])
fi
fi
# Check for Intel intrinsics header optionally used by vector.h.
AC_CHECK_HEADERS([immintrin.h])
# Check for timing functions needed by cycle.h. # Check for timing functions needed by cycle.h.
AC_HEADER_TIME AC_HEADER_TIME
......
...@@ -135,7 +135,7 @@ int main(int argc, char *argv[]) { ...@@ -135,7 +135,7 @@ int main(int argc, char *argv[]) {
bzero(&s, sizeof(struct space)); bzero(&s, sizeof(struct space));
/* Parse the options */ /* 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) { switch (c) {
case 'a': case 'a':
if (sscanf(optarg, "%lf", &scaling) != 1) if (sscanf(optarg, "%lf", &scaling) != 1)
......
...@@ -23,11 +23,12 @@ ...@@ -23,11 +23,12 @@
/* Have I already read this file? */ /* Have I already read this file? */
#ifndef VEC_MACRO #ifndef VEC_MACRO
#include "../config.h"
/* Need to check whether compiler supports this (IBM does not) /* Need to check whether compiler supports this (IBM does not)
This will prevent the macros to be defined and switch off This will prevent the macros to be defined and switch off
explicit vectorization if the compiled does not support it */ 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 the header file with the intrinsics for Intel architecture. */
#include <immintrin.h> #include <immintrin.h>
#endif #endif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment