-
Notifications
You must be signed in to change notification settings - Fork 445
sse2neon -> SIMDe and added non-SIMD version #597
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
9e6fdd3
c172df7
f47e8a5
3e16e4e
2b3403f
66db9da
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| [submodule "lib/simde"] | ||
| path = lib/simde | ||
| url = https://github.com/nemequ/simde.git |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,26 +1,30 @@ | ||
| CFLAGS= -g -Wall -O2 -Wc++-compat #-Wextra | ||
| 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 | ||
| 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 | ||
| INCLUDES+=-Isse2neon | ||
| 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 | ||
| 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 | ||
|
|
@@ -56,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 $@ | ||
|
|
@@ -83,15 +85,31 @@ 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__ $(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 | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unnecessary difference. 1 space here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've removed the space in the following commit.