Skip to content

Commit

Permalink
Merge pull request #85 from marktwtn/avx-support
Browse files Browse the repository at this point in the history
Support AVX implementation on the non-AVX2 hardware
  • Loading branch information
jserv committed Nov 20, 2018
2 parents 1998f04 + 796f4f2 commit 707448e
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,18 @@ endif
ifeq ("$(BUILD_DEBUG)","1")
CFLAGS += -Og -g3
else
# Enable all the optimizations in release build
CFLAGS += -Ofast
# Enable all the valid optimizations for standard programs in release build
CFLAGS += -O3
endif

# Check specific CPU features available on build host
include mk/cpu-features.mk

ifeq ("$(BUILD_AVX)","1")
CFLAGS += -mavx -mavx2 -DENABLE_AVX
CFLAGS += -mavx -DENABLE_AVX
ifeq ("$(call cpu_feature,AVX2)","1")
CFLAGS += -mavx2
endif
else
BUILD_SSE := $(call cpu_feature,SSE)
ifeq ("$(BUILD_SSE)","1")
Expand Down

0 comments on commit 707448e

Please sign in to comment.