From 9e6fdd376b5e6abb4ca7f4540f79eec7b8271a78 Mon Sep 17 00:00:00 2001 From: mbrcic Date: Mon, 20 Apr 2020 18:28:06 +0200 Subject: [PATCH 1/6] Changed sse2neon with SIMDe. Added building non-SIMD version. --- .gitmodules | 3 +++ Makefile | 31 ++++++++++++++++++++++++------- ksw2_extd2_sse.c | 6 ++++-- ksw2_exts2_sse.c | 7 ++++--- ksw2_extz2_sse.c | 6 ++++-- ksw2_ll_sse.c | 3 ++- lib/simde | 1 + 7 files changed, 42 insertions(+), 15 deletions(-) create mode 100644 .gitmodules create mode 160000 lib/simde diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 00000000..a80f848d --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "lib/simde"] + path = lib/simde + url = https://github.com/nemequ/simde.git diff --git a/Makefile b/Makefile index 18622f51..61c40972 100644 --- a/Makefile +++ b/Makefile @@ -1,11 +1,13 @@ CFLAGS= -g -Wall -O2 -Wc++-compat #-Wextra CPPFLAGS= -DHAVE_KALLOC -INCLUDES= -OBJS= kthread.o kalloc.o misc.o bseq.o sketch.o sdust.o options.o index.o chain.o align.o hit.o map.o format.o pe.o esterr.o splitidx.o ksw2_ll_sse.o +INCLUDES= -Ilib/simde/simde +OBJS= kthread.o kalloc.o misc.o bseq.o sketch.o sdust.o options.o index.o chain.o align.o hit.o map.o format.o pe.o esterr.o splitidx.o PROG= minimap2 PROG_EXTRA= sdust minimap2-lite LIBS= -lm -lz -lpthread +ifeq ($(no_simd),) # if no_simd is not defined + OBJS+=ksw2_ll_sse.o ifeq ($(arm_neon),) # if arm_neon is not defined ifeq ($(sse2only),) # if sse2only is not defined OBJS+=ksw2_extz2_sse41.o ksw2_extd2_sse41.o ksw2_exts2_sse41.o ksw2_extz2_sse2.o ksw2_extd2_sse2.o ksw2_exts2_sse2.o ksw2_dispatch.o @@ -14,13 +16,15 @@ else # if sse2only is defined endif else # if arm_neon is defined OBJS+=ksw2_extz2_neon.o ksw2_extd2_neon.o ksw2_exts2_neon.o - INCLUDES+=-Isse2neon ifeq ($(aarch64),) #if aarch64 is not defined CFLAGS+=-D_FILE_OFFSET_BITS=64 -mfpu=neon -fsigned-char else #if aarch64 is defined CFLAGS+=-D_FILE_OFFSET_BITS=64 -fsigned-char endif endif +else + OBJS+=ksw2_ll_nosimd.o ksw2_extz2_nosimd.o ksw2_extd2_nosimd.o ksw2_exts2_nosimd.o +endif ifneq ($(asan),) CFLAGS+=-fsanitize=address @@ -83,15 +87,28 @@ ksw2_dispatch.o:ksw2_dispatch.c ksw2.h $(CC) -c $(CFLAGS) -msse4.1 $(CPPFLAGS) -DKSW_CPU_DISPATCH $(INCLUDES) $< -o $@ # NEON-specific targets on ARM - ksw2_extz2_neon.o:ksw2_extz2_sse.c ksw2.h kalloc.h - $(CC) -c $(CFLAGS) $(CPPFLAGS) -DKSW_SSE2_ONLY -D__SSE2__ $(INCLUDES) $< -o $@ + $(CC) -c $(CFLAGS) $(CPPFLAGS) -DKSW_SSE2_ONLY -D__SSE2__ -DSIMDE_ENABLE_NATIVE_ALIASES $(INCLUDES) $< -o $@ ksw2_extd2_neon.o:ksw2_extd2_sse.c ksw2.h kalloc.h - $(CC) -c $(CFLAGS) $(CPPFLAGS) -DKSW_SSE2_ONLY -D__SSE2__ $(INCLUDES) $< -o $@ + $(CC) -c $(CFLAGS) $(CPPFLAGS) -DKSW_SSE2_ONLY -D__SSE2__ -DSIMDE_ENABLE_NATIVE_ALIASES $(INCLUDES) $< -o $@ ksw2_exts2_neon.o:ksw2_exts2_sse.c ksw2.h kalloc.h - $(CC) -c $(CFLAGS) $(CPPFLAGS) -DKSW_SSE2_ONLY -D__SSE2__ $(INCLUDES) $< -o $@ + $(CC) -c $(CFLAGS) $(CPPFLAGS) -DKSW_SSE2_ONLY -D__SSE2__ -DSIMDE_ENABLE_NATIVE_ALIASES $(INCLUDES) $< -o $@ + +# no-SIMD version + +ksw2_ll_nosimd.o:ksw2_ll_sse.c ksw2.h kalloc.h + $(CC) -c $(CFLAGS) $(CPPFLAGS) -DSIMDE_ENABLE_NATIVE_ALIASES -DSIMDE_NO_NATIVE $(INCLUDES) $< -o $@ + +ksw2_extz2_nosimd.o:ksw2_extz2_sse.c ksw2.h kalloc.h + $(CC) -c $(CFLAGS) $(CPPFLAGS) -DKSW_SSE2_ONLY -D__SSE2__ -DSIMDE_ENABLE_NATIVE_ALIASES -DSIMDE_NO_NATIVE $(INCLUDES) $< -o $@ + +ksw2_extd2_nosimd.o:ksw2_extd2_sse.c ksw2.h kalloc.h + $(CC) -c $(CFLAGS) $(CPPFLAGS) -DKSW_SSE2_ONLY -D__SSE2__ -DSIMDE_ENABLE_NATIVE_ALIASES -DSIMDE_NO_NATIVE $(INCLUDES) $< -o $@ + +ksw2_exts2_nosimd.o:ksw2_exts2_sse.c ksw2.h kalloc.h + $(CC) -c $(CFLAGS) $(CPPFLAGS) -DKSW_SSE2_ONLY -D__SSE2__ -DSIMDE_ENABLE_NATIVE_ALIASES -DSIMDE_NO_NATIVE $(INCLUDES) $< -o $@ # other non-file targets diff --git a/ksw2_extd2_sse.c b/ksw2_extd2_sse.c index b578274a..10c42fd3 100644 --- a/ksw2_extd2_sse.c +++ b/ksw2_extd2_sse.c @@ -4,14 +4,16 @@ #include "ksw2.h" #ifdef __SSE2__ -#include +//#include +#include #ifdef KSW_SSE2_ONLY #undef __SSE4_1__ #endif #ifdef __SSE4_1__ -#include +//#include +#include #endif #ifdef KSW_CPU_DISPATCH diff --git a/ksw2_exts2_sse.c b/ksw2_exts2_sse.c index e7984c66..93efeb41 100644 --- a/ksw2_exts2_sse.c +++ b/ksw2_exts2_sse.c @@ -4,14 +4,15 @@ #include "ksw2.h" #ifdef __SSE2__ -#include - +//#include +#include #ifdef KSW_SSE2_ONLY #undef __SSE4_1__ #endif #ifdef __SSE4_1__ -#include +//#include +#include #endif #ifdef KSW_CPU_DISPATCH diff --git a/ksw2_extz2_sse.c b/ksw2_extz2_sse.c index 02bb4c2a..c13fcb9f 100644 --- a/ksw2_extz2_sse.c +++ b/ksw2_extz2_sse.c @@ -3,14 +3,16 @@ #include "ksw2.h" #ifdef __SSE2__ -#include +//#include +#include #ifdef KSW_SSE2_ONLY #undef __SSE4_1__ #endif #ifdef __SSE4_1__ -#include +//#include +#include #endif #ifdef KSW_CPU_DISPATCH diff --git a/ksw2_ll_sse.c b/ksw2_ll_sse.c index 469de520..0359f001 100644 --- a/ksw2_ll_sse.c +++ b/ksw2_ll_sse.c @@ -1,7 +1,8 @@ #include #include #include -#include +//#include +#include #include "ksw2.h" #ifdef __GNUC__ diff --git a/lib/simde b/lib/simde new file mode 160000 index 00000000..b30129b3 --- /dev/null +++ b/lib/simde @@ -0,0 +1 @@ +Subproject commit b30129b3b48a6823013da2b309c50a081177b6b8 From c172df7d2d9315329965226b6c09355b11285a0c Mon Sep 17 00:00:00 2001 From: mbrcic Date: Mon, 20 Apr 2020 21:14:15 +0200 Subject: [PATCH 2/6] fix for Neon --- Makefile | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 61c40972..6aa1760a 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -CFLAGS= -g -Wall -O2 -Wc++-compat #-Wextra +CFLAGS= -g -Wall -O2 -Wc++-compat #-Wextra CPPFLAGS= -DHAVE_KALLOC INCLUDES= -Ilib/simde/simde OBJS= kthread.o kalloc.o misc.o bseq.o sketch.o sdust.o options.o index.o chain.o align.o hit.o map.o format.o pe.o esterr.o splitidx.o @@ -7,15 +7,15 @@ PROG_EXTRA= sdust minimap2-lite LIBS= -lm -lz -lpthread ifeq ($(no_simd),) # if no_simd is not defined - OBJS+=ksw2_ll_sse.o ifeq ($(arm_neon),) # if arm_neon is not defined + OBJS+=ksw2_ll_sse.o ifeq ($(sse2only),) # if sse2only is not defined OBJS+=ksw2_extz2_sse41.o ksw2_extd2_sse41.o ksw2_exts2_sse41.o ksw2_extz2_sse2.o ksw2_extd2_sse2.o ksw2_exts2_sse2.o ksw2_dispatch.o else # if sse2only is defined OBJS+=ksw2_extz2_sse.o ksw2_extd2_sse.o ksw2_exts2_sse.o endif else # if arm_neon is defined - OBJS+=ksw2_extz2_neon.o ksw2_extd2_neon.o ksw2_exts2_neon.o + OBJS+=ksw2_ll_sse.o ksw2_extz2_neon.o ksw2_extd2_neon.o ksw2_exts2_neon.o ifeq ($(aarch64),) #if aarch64 is not defined CFLAGS+=-D_FILE_OFFSET_BITS=64 -mfpu=neon -fsigned-char else #if aarch64 is defined @@ -60,10 +60,8 @@ sdust:sdust.c kalloc.o kalloc.h kdq.h kvec.h kseq.h ketopt.h sdust.h # SSE-specific targets on x86/x86_64 -ifeq ($(arm_neon),) # if arm_neon is defined, compile this target with the default setting (i.e. no -msse2) ksw2_ll_sse.o:ksw2_ll_sse.c ksw2.h kalloc.h $(CC) -c $(CFLAGS) -msse2 $(CPPFLAGS) $(INCLUDES) $< -o $@ -endif ksw2_extz2_sse41.o:ksw2_extz2_sse.c ksw2.h kalloc.h $(CC) -c $(CFLAGS) -msse4.1 $(CPPFLAGS) -DKSW_CPU_DISPATCH $(INCLUDES) $< -o $@ @@ -87,6 +85,9 @@ ksw2_dispatch.o:ksw2_dispatch.c ksw2.h $(CC) -c $(CFLAGS) -msse4.1 $(CPPFLAGS) -DKSW_CPU_DISPATCH $(INCLUDES) $< -o $@ # NEON-specific targets on ARM +ksw2_ll_neon.o:ksw2_ll_sse.c ksw2.h kalloc.h + $(CC) -c $(CFLAGS) -DSIMDE_ENABLE_NATIVE_ALIASES $(CPPFLAGS) $(INCLUDES) $< -o $@ + ksw2_extz2_neon.o:ksw2_extz2_sse.c ksw2.h kalloc.h $(CC) -c $(CFLAGS) $(CPPFLAGS) -DKSW_SSE2_ONLY -D__SSE2__ -DSIMDE_ENABLE_NATIVE_ALIASES $(INCLUDES) $< -o $@ From f47e8a525ec8740c47fda26d0fff11b9d52ef2ff Mon Sep 17 00:00:00 2001 From: mbrcic Date: Tue, 21 Apr 2020 01:08:32 +0200 Subject: [PATCH 3/6] SIMDe made optional. Include paths changes for SIMDe. --- Makefile | 31 +++++++++++++++++++++---------- ksw2_extd2_sse.c | 14 ++++++++++---- ksw2_exts2_sse.c | 14 ++++++++++---- ksw2_extz2_sse.c | 14 ++++++++++---- ksw2_ll_sse.c | 8 ++++++-- 5 files changed, 57 insertions(+), 24 deletions(-) diff --git a/Makefile b/Makefile index 6aa1760a..06f74273 100644 --- a/Makefile +++ b/Makefile @@ -1,11 +1,12 @@ -CFLAGS= -g -Wall -O2 -Wc++-compat #-Wextra +CFLAGS= -g -Wall -O2 -Wc++-compat #-Wextra CPPFLAGS= -DHAVE_KALLOC -INCLUDES= -Ilib/simde/simde +INCLUDES= OBJS= kthread.o kalloc.o misc.o bseq.o sketch.o sdust.o options.o index.o chain.o align.o hit.o map.o format.o pe.o esterr.o splitidx.o PROG= minimap2 PROG_EXTRA= sdust minimap2-lite LIBS= -lm -lz -lpthread + ifeq ($(no_simd),) # if no_simd is not defined ifeq ($(arm_neon),) # if arm_neon is not defined OBJS+=ksw2_ll_sse.o @@ -16,6 +17,9 @@ else # if sse2only is defined endif else # if arm_neon is defined OBJS+=ksw2_ll_sse.o ksw2_extz2_neon.o ksw2_extd2_neon.o ksw2_exts2_neon.o +ifeq ($(simde),) # arm_neon without SIMDe -> use sse2neon + INCLUDES+=-Isse2neon +endif ifeq ($(aarch64),) #if aarch64 is not defined CFLAGS+=-D_FILE_OFFSET_BITS=64 -mfpu=neon -fsigned-char else #if aarch64 is defined @@ -24,6 +28,12 @@ endif endif else OBJS+=ksw2_ll_nosimd.o ksw2_extz2_nosimd.o ksw2_extd2_nosimd.o ksw2_exts2_nosimd.o + simde=1 # no_simd can be used only with SIMDe +endif + +ifneq ($(simde),) # if simde is defined + CFLAGS+=-DSIMDE_ENABLE_NATIVE_ALIASES -DUSE_SIMDE + INCLUDES+=-Ilib/simde endif ifneq ($(asan),) @@ -85,31 +95,32 @@ ksw2_dispatch.o:ksw2_dispatch.c ksw2.h $(CC) -c $(CFLAGS) -msse4.1 $(CPPFLAGS) -DKSW_CPU_DISPATCH $(INCLUDES) $< -o $@ # NEON-specific targets on ARM + ksw2_ll_neon.o:ksw2_ll_sse.c ksw2.h kalloc.h - $(CC) -c $(CFLAGS) -DSIMDE_ENABLE_NATIVE_ALIASES $(CPPFLAGS) $(INCLUDES) $< -o $@ + $(CC) -c $(CFLAGS) $(CPPFLAGS) $(INCLUDES) $< -o $@ ksw2_extz2_neon.o:ksw2_extz2_sse.c ksw2.h kalloc.h - $(CC) -c $(CFLAGS) $(CPPFLAGS) -DKSW_SSE2_ONLY -D__SSE2__ -DSIMDE_ENABLE_NATIVE_ALIASES $(INCLUDES) $< -o $@ + $(CC) -c $(CFLAGS) $(CPPFLAGS) -DKSW_SSE2_ONLY -D__SSE2__ $(INCLUDES) $< -o $@ ksw2_extd2_neon.o:ksw2_extd2_sse.c ksw2.h kalloc.h - $(CC) -c $(CFLAGS) $(CPPFLAGS) -DKSW_SSE2_ONLY -D__SSE2__ -DSIMDE_ENABLE_NATIVE_ALIASES $(INCLUDES) $< -o $@ + $(CC) -c $(CFLAGS) $(CPPFLAGS) -DKSW_SSE2_ONLY -D__SSE2__ $(INCLUDES) $< -o $@ ksw2_exts2_neon.o:ksw2_exts2_sse.c ksw2.h kalloc.h - $(CC) -c $(CFLAGS) $(CPPFLAGS) -DKSW_SSE2_ONLY -D__SSE2__ -DSIMDE_ENABLE_NATIVE_ALIASES $(INCLUDES) $< -o $@ + $(CC) -c $(CFLAGS) $(CPPFLAGS) -DKSW_SSE2_ONLY -D__SSE2__ $(INCLUDES) $< -o $@ # no-SIMD version ksw2_ll_nosimd.o:ksw2_ll_sse.c ksw2.h kalloc.h - $(CC) -c $(CFLAGS) $(CPPFLAGS) -DSIMDE_ENABLE_NATIVE_ALIASES -DSIMDE_NO_NATIVE $(INCLUDES) $< -o $@ + $(CC) -c $(CFLAGS) $(CPPFLAGS) -DSIMDE_NO_NATIVE $(INCLUDES) $< -o $@ ksw2_extz2_nosimd.o:ksw2_extz2_sse.c ksw2.h kalloc.h - $(CC) -c $(CFLAGS) $(CPPFLAGS) -DKSW_SSE2_ONLY -D__SSE2__ -DSIMDE_ENABLE_NATIVE_ALIASES -DSIMDE_NO_NATIVE $(INCLUDES) $< -o $@ + $(CC) -c $(CFLAGS) $(CPPFLAGS) -DKSW_SSE2_ONLY -D__SSE2__ -DSIMDE_NO_NATIVE $(INCLUDES) $< -o $@ ksw2_extd2_nosimd.o:ksw2_extd2_sse.c ksw2.h kalloc.h - $(CC) -c $(CFLAGS) $(CPPFLAGS) -DKSW_SSE2_ONLY -D__SSE2__ -DSIMDE_ENABLE_NATIVE_ALIASES -DSIMDE_NO_NATIVE $(INCLUDES) $< -o $@ + $(CC) -c $(CFLAGS) $(CPPFLAGS) -DKSW_SSE2_ONLY -D__SSE2__ -DSIMDE_NO_NATIVE $(INCLUDES) $< -o $@ ksw2_exts2_nosimd.o:ksw2_exts2_sse.c ksw2.h kalloc.h - $(CC) -c $(CFLAGS) $(CPPFLAGS) -DKSW_SSE2_ONLY -D__SSE2__ -DSIMDE_ENABLE_NATIVE_ALIASES -DSIMDE_NO_NATIVE $(INCLUDES) $< -o $@ + $(CC) -c $(CFLAGS) $(CPPFLAGS) -DKSW_SSE2_ONLY -D__SSE2__ -DSIMDE_NO_NATIVE $(INCLUDES) $< -o $@ # other non-file targets diff --git a/ksw2_extd2_sse.c b/ksw2_extd2_sse.c index 10c42fd3..e8bee8ea 100644 --- a/ksw2_extd2_sse.c +++ b/ksw2_extd2_sse.c @@ -4,16 +4,22 @@ #include "ksw2.h" #ifdef __SSE2__ -//#include -#include +#ifndef USE_SIMDE +#include +#else +#include +#endif #ifdef KSW_SSE2_ONLY #undef __SSE4_1__ #endif #ifdef __SSE4_1__ -//#include -#include +#ifndef USE_SIMDE +#include +#else +#include +#endif #endif #ifdef KSW_CPU_DISPATCH diff --git a/ksw2_exts2_sse.c b/ksw2_exts2_sse.c index 93efeb41..1eb95029 100644 --- a/ksw2_exts2_sse.c +++ b/ksw2_exts2_sse.c @@ -4,15 +4,21 @@ #include "ksw2.h" #ifdef __SSE2__ -//#include -#include +#ifndef USE_SIMDE +#include +#else +#include +#endif #ifdef KSW_SSE2_ONLY #undef __SSE4_1__ #endif #ifdef __SSE4_1__ -//#include -#include +#ifndef USE_SIMDE +#include +#else +#include +#endif #endif #ifdef KSW_CPU_DISPATCH diff --git a/ksw2_extz2_sse.c b/ksw2_extz2_sse.c index c13fcb9f..bcdf32fa 100644 --- a/ksw2_extz2_sse.c +++ b/ksw2_extz2_sse.c @@ -3,16 +3,22 @@ #include "ksw2.h" #ifdef __SSE2__ -//#include -#include +#ifndef USE_SIMDE +#include +#else +#include +#endif #ifdef KSW_SSE2_ONLY #undef __SSE4_1__ #endif #ifdef __SSE4_1__ -//#include -#include +#ifndef USE_SIMDE +#include +#else +#include +#endif #endif #ifdef KSW_CPU_DISPATCH diff --git a/ksw2_ll_sse.c b/ksw2_ll_sse.c index 0359f001..8cef46c5 100644 --- a/ksw2_ll_sse.c +++ b/ksw2_ll_sse.c @@ -1,10 +1,14 @@ #include #include #include -//#include -#include #include "ksw2.h" +#ifndef USE_SIMDE +#include +#else +#include +#endif + #ifdef __GNUC__ #define LIKELY(x) __builtin_expect((x),1) #define UNLIKELY(x) __builtin_expect((x),0) From 3e16e4e39d24b8d9db89233df0ac093932a07386 Mon Sep 17 00:00:00 2001 From: mbrcic Date: Tue, 21 Apr 2020 01:36:19 +0200 Subject: [PATCH 4/6] Added documentation entry for added functionality, simde and no_simd. --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index addeb2c1..a62d189b 100644 --- a/README.md +++ b/README.md @@ -82,6 +82,10 @@ to disable SSE4 code, which will make minimap2 slightly slower. Minimap2 also works with ARM CPUs supporting the NEON instruction sets. To compile for 32 bit ARM architectures (such as ARMv7), use `make arm_neon=1`. To compile for for 64 bit ARM architectures (such as ARMv8), use `make arm_neon=1 aarch64=1`. +Minimap2 can use [SIMD Everywhere (SIMDe)](https://github.com/nemequ/simde) library for porting implementation +to the different SIMD instruction sets. To compile using SIMDe, use `make simde=1`. To compile for ARM CPUs, add `simde=1` to the commands given above. +SIMDe also enables non-SIMD implementation using `make no_simd=1`. + ### General usage Without any options, minimap2 takes a reference database and a query sequence From 2b3403f09430e3e486b25b88e7617b6140dbe5e0 Mon Sep 17 00:00:00 2001 From: mbrcic Date: Tue, 21 Apr 2020 02:08:21 +0200 Subject: [PATCH 5/6] fix for Neon after test. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 06f74273..7d2afc99 100644 --- a/Makefile +++ b/Makefile @@ -16,7 +16,7 @@ else # if sse2only is defined OBJS+=ksw2_extz2_sse.o ksw2_extd2_sse.o ksw2_exts2_sse.o endif else # if arm_neon is defined - OBJS+=ksw2_ll_sse.o ksw2_extz2_neon.o ksw2_extd2_neon.o ksw2_exts2_neon.o + OBJS+=ksw2_ll_neon.o ksw2_extz2_neon.o ksw2_extd2_neon.o ksw2_exts2_neon.o ifeq ($(simde),) # arm_neon without SIMDe -> use sse2neon INCLUDES+=-Isse2neon endif From 66db9da7d8a4500aa210512914bedc0d7c7d817b Mon Sep 17 00:00:00 2001 From: mbrcic Date: Wed, 22 Apr 2020 19:50:59 +0200 Subject: [PATCH 6/6] changed preprocessor conditionals for SIMDe --- ksw2_extd2_sse.c | 12 ++++++------ ksw2_exts2_sse.c | 12 ++++++------ ksw2_extz2_sse.c | 12 ++++++------ ksw2_ll_sse.c | 6 +++--- 4 files changed, 21 insertions(+), 21 deletions(-) diff --git a/ksw2_extd2_sse.c b/ksw2_extd2_sse.c index e8bee8ea..162e9e26 100644 --- a/ksw2_extd2_sse.c +++ b/ksw2_extd2_sse.c @@ -4,10 +4,10 @@ #include "ksw2.h" #ifdef __SSE2__ -#ifndef USE_SIMDE -#include -#else +#ifdef USE_SIMDE #include +#else +#include #endif #ifdef KSW_SSE2_ONLY @@ -15,10 +15,10 @@ #endif #ifdef __SSE4_1__ -#ifndef USE_SIMDE -#include -#else +#ifdef USE_SIMDE #include +#else +#include #endif #endif diff --git a/ksw2_exts2_sse.c b/ksw2_exts2_sse.c index 1eb95029..4157e382 100644 --- a/ksw2_exts2_sse.c +++ b/ksw2_exts2_sse.c @@ -4,20 +4,20 @@ #include "ksw2.h" #ifdef __SSE2__ -#ifndef USE_SIMDE -#include -#else +#ifdef USE_SIMDE #include +#else +#include #endif #ifdef KSW_SSE2_ONLY #undef __SSE4_1__ #endif #ifdef __SSE4_1__ -#ifndef USE_SIMDE -#include -#else +#ifdef USE_SIMDE #include +#else +#include #endif #endif diff --git a/ksw2_extz2_sse.c b/ksw2_extz2_sse.c index bcdf32fa..ad191314 100644 --- a/ksw2_extz2_sse.c +++ b/ksw2_extz2_sse.c @@ -3,10 +3,10 @@ #include "ksw2.h" #ifdef __SSE2__ -#ifndef USE_SIMDE -#include -#else +#ifdef USE_SIMDE #include +#else +#include #endif #ifdef KSW_SSE2_ONLY @@ -14,10 +14,10 @@ #endif #ifdef __SSE4_1__ -#ifndef USE_SIMDE -#include -#else +#ifdef USE_SIMDE #include +#else +#include #endif #endif diff --git a/ksw2_ll_sse.c b/ksw2_ll_sse.c index 8cef46c5..14b9b50a 100644 --- a/ksw2_ll_sse.c +++ b/ksw2_ll_sse.c @@ -3,10 +3,10 @@ #include #include "ksw2.h" -#ifndef USE_SIMDE -#include -#else +#ifdef USE_SIMDE #include +#else +#include #endif #ifdef __GNUC__