-
Notifications
You must be signed in to change notification settings - Fork 408
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
sse2neon -> SIMDe and added non-SIMD version #597
Conversation
Makefile
Outdated
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 |
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.
This could be -Ilib/simde
rather than -Ilib/simde/simde
, modifying the loaded header paths. Because for example #include <simde/x86/sse2.h>
is the right call by the simde system library (such as libsimde-dev
in Debian) or simde-devel
in Fedora and EPEL (CentOS).
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 changed to this in the following commit.
I really appreciate this PR. Maybe we can try to run the code later on Travis ppc64le and s390x. |
Makefile
Outdated
@@ -1,26 +1,30 @@ | |||
CFLAGS= -g -Wall -O2 -Wc++-compat #-Wextra | |||
CFLAGS= -g -Wall -O2 -Wc++-compat #-Wextra |
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.
Thanks. Could you make SIMDe an option, not the default? For example: make simde=1 |
All the comments so far have been implemented. |
#include <emmintrin.h> | ||
#else | ||
#include <simde/x86/sse2.h> | ||
#endif |
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.
Thanks for the update!
I think this part could like like this. And other parts are as well.
Because it's natural for me such as "if simde is used, include the simde header, otherwise include the default header.".
But let's wait @lh3 's response.
#ifdef USE_SIMDE
#include <simde/x86/sse2.h>
#else
#include <emmintrin.h>
#endif
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.
As there was no other response, I have changed C preprocessor conditionals to the above stated form.
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.
Thanks. It looks good to me.
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.
FYI, I personally always use #define SIMDE_ENABLE_NATIVE_ALIASES
+ #include <simde/x86/sse2.h>
as the SIMDe library has fallback that get compiled away to the plain intrinsic calls when on x86 with the regular compilation flag (-msse4.1
, etc).
I tested your PR on my forked repository adding new use cases tests in
Perhaps it might be good to add the tests in `.travis.yml in this PR, to guarantee the modification. |
The failed test used SIMDe, but pushed compiling with sse2 flag even though code contains no SSE2 code. arm64 compilers have no such flag. |
Another option is to put just activation of |
Okay. In my humble opinion, I would prefer that By the way, here is simde's .travis.yml. We can see some compiler flags tested on non-x86_64 environments. |
Hi @junaruga , I've just made a PR with the requested changes. |
Substituted sse2neon by SIMDe library to convert SSE2 to ARM Neon.
Added option to build non-SIMD version of minimap2 using SIMDe.
SIMDe is added as a git submodule.