new handling of vector capabilities
This commit is contained in:
parent
84547d9536
commit
4a05bef5d0
2 changed files with 2 additions and 24 deletions
22
configure.ac
22
configure.ac
|
@ -40,20 +40,6 @@ AC_ARG_ENABLE(debug,
|
||||||
ENABLE_DEBUG=yes
|
ENABLE_DEBUG=yes
|
||||||
fi])
|
fi])
|
||||||
|
|
||||||
ENABLE_SSE2=yes
|
|
||||||
AC_ARG_ENABLE(sse2,
|
|
||||||
[ --disable-sse2 disable generation of SSE2 instructions],
|
|
||||||
[if test "$enableval" = no; then
|
|
||||||
ENABLE_SSE2=no
|
|
||||||
fi])
|
|
||||||
|
|
||||||
ENABLE_AVX=yes
|
|
||||||
AC_ARG_ENABLE(avx,
|
|
||||||
[ --disable-avx disable generation of AVX instructions],
|
|
||||||
[if test "$enableval" = no; then
|
|
||||||
ENABLE_AVX=no
|
|
||||||
fi])
|
|
||||||
|
|
||||||
case $CCTYPE in
|
case $CCTYPE in
|
||||||
gcc)
|
gcc)
|
||||||
CCFLAGS="-O3 -fno-tree-vectorize -ffast-math -fomit-frame-pointer -std=c99 -pedantic -Wextra -Wall -Wno-unknown-pragmas -Wshadow -Wmissing-prototypes -Wfatal-errors"
|
CCFLAGS="-O3 -fno-tree-vectorize -ffast-math -fomit-frame-pointer -std=c99 -pedantic -Wextra -Wall -Wno-unknown-pragmas -Wshadow -Wmissing-prototypes -Wfatal-errors"
|
||||||
|
@ -102,14 +88,6 @@ if test $ENABLE_MPI = yes; then
|
||||||
CCFLAGS="$CCFLAGS -DUSE_MPI"
|
CCFLAGS="$CCFLAGS -DUSE_MPI"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test $ENABLE_SSE2 = no; then
|
|
||||||
CCFLAGS="$CCFLAGS -DDISABLE_SSE2"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test $ENABLE_AVX = no; then
|
|
||||||
CCFLAGS="$CCFLAGS -DDISABLE_AVX"
|
|
||||||
fi
|
|
||||||
|
|
||||||
CCFLAGS_NO_C="$CCFLAGS $CPPFLAGS"
|
CCFLAGS_NO_C="$CCFLAGS $CPPFLAGS"
|
||||||
|
|
||||||
LDCCFLAGS="$LDFLAGS $CCFLAGS"
|
LDCCFLAGS="$LDFLAGS $CCFLAGS"
|
||||||
|
|
|
@ -32,9 +32,9 @@
|
||||||
#ifndef SHARP_VECUTIL_H
|
#ifndef SHARP_VECUTIL_H
|
||||||
#define SHARP_VECUTIL_H
|
#define SHARP_VECUTIL_H
|
||||||
|
|
||||||
#if (defined (__AVX__) && (!defined (DISABLE_AVX)) && (!defined (DISABLE_SSE2)))
|
#if (defined (__AVX__))
|
||||||
#define VLEN 4
|
#define VLEN 4
|
||||||
#elif (defined (__SSE2__) && (!defined (DISABLE_SSE2)))
|
#elif (defined (__SSE2__))
|
||||||
#define VLEN 2
|
#define VLEN 2
|
||||||
#else
|
#else
|
||||||
#define VLEN 1
|
#define VLEN 1
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue