yangao07 / abPOA

abPOA: an SIMD-based C library for fast partial order alignment using adaptive band
MIT License
111 stars 18 forks source link

Use avx2 interface when compiling on ARM #31

Closed glennhickey closed 2 years ago

glennhickey commented 2 years ago

As discussed in #18, most of the code in simd_check.c is intel specific. Furthermore, it seems like the interface used in simd_instruction.h, which defaults to sse4.1 (for met at least) doesn't work with clang, making it difficult for users of arm Macs.

This PR addresses both these issues with hacks that use AVX2 for everything when on arm. But since this is the AVX2 interface into simde, it should still be portable (on arm it will call the appropriate neon calls).

This builds and runs simple examples on