Skip to content

Commit c60c1b4

Browse files
committed
Enable avx2
1 parent 95f8222 commit c60c1b4

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])
@@ -436,6 +438,8 @@ AC_CHECK_HEADERS( \
436438
values.h \
437439
)
438440

441+
AC_DEFINE(GLM_FORCE_AVX2, 1, [ Enable avx2 if available])
442+
439443
if test "x$enable_UPnP" = "xyes"; then
440444
AC_CHECK_HEADERS(
441445
[miniupnpc/miniupnpc.h],
@@ -691,6 +695,9 @@ case $host_os in
691695
pc)
692696
FLAGS=-mtune=native
693697
CONF_CFLAGS="$CONF_CFLAGS $FLAGS";
698+
if test x$enable_avx2 = xyes ; then
699+
CONF_CXXFLAGS="$CONF_CXXFLAGS -mavx2";
700+
fi
694701
CONF_CXXFLAGS="$CONF_CXXFLAGS $FLAGS";
695702
CONF_CXXFLAGS="$CONF_CXXFLAGS -fsigned-char";;
696703
ppc)

0 commit comments

Comments
 (0)