Skip to content

Commit 559e522

Browse files
committed
Enable avx2
1 parent 515f0b6 commit 559e522

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

configure.ac

+7
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,8 @@ if test x$enable_robots != xno; then
171171
AC_DEFINE(ROBOT, 1, [Enabling Robots])
172172
fi
173173

174+
AC_ARG_ENABLE(avx2, [ --enable-avx2 turn on simd])
175+
174176
# debugging and profiling
175177
AC_ARG_ENABLE(debug, [ --enable-debug turn on debugging])
176178
AC_ARG_ENABLE(profiling, [ --enable-profiling turn on profiling])
@@ -432,6 +434,8 @@ AC_CHECK_HEADERS( \
432434
values.h \
433435
)
434436

437+
AC_DEFINE(GLM_FORCE_AVX2, 1, [ Enable avx2 if available])
438+
435439
if test "x$enable_UPnP" = "xyes"; then
436440
AC_CHECK_HEADERS(
437441
[miniupnpc/miniupnpc.h],
@@ -687,6 +691,9 @@ case $host_os in
687691
pc)
688692
FLAGS=-mtune=native
689693
CONF_CFLAGS="$CONF_CFLAGS $FLAGS";
694+
if test x$enable_avx2 = xyes ; then
695+
CONF_CXXFLAGS="$CONF_CXXFLAGS -mavx2";
696+
fi
690697
CONF_CXXFLAGS="$CONF_CXXFLAGS $FLAGS";
691698
CONF_CXXFLAGS="$CONF_CXXFLAGS -fsigned-char";;
692699
ppc)

0 commit comments

Comments
 (0)