lh3 / fermi-lite

Standalone C library for assembling Illumina short reads in small regions
MIT License
72 stars 23 forks source link

Remove need for SSE2 support #4

Open satta opened 8 years ago

satta commented 8 years ago

Currently the code in ksw.c seems to need SSE2 to compile. It would be nice to have some kind of -- probably slower -- fallback implementation to improve support on architectures without these instructions.

lh3 commented 8 years ago

I need to revamp ksw.c at some point. It is in fact buggy in rare conner cases. Will add non-SSE implementation when that day comes.

satta commented 8 years ago

Thanks!

clausecker commented 1 week ago

As a stop-gap solution, you can use SSE2NEON to make it work on ARM by adding the header to the project and then applying this patch:

--- ksw.c.orig  2024-10-15 14:34:34 UTC
+++ ksw.c
@@ -25,7 +25,11 @@

 #include <stdlib.h>
 #include <stdint.h>
+#if defined(__arm__) || defined(__aarch64__)
+#include "sse2neon.h"
+#else
 #include <emmintrin.h>
+#endif
 #include "ksw.h"

 #ifdef __GNUC__