Adopt SIMD abstraction library for Android support
robinhundt opened this issue · 0 comments
robinhundt commented
Related: #9
Motion currently uses x86 simd instructions in three places:
src/motioncore/primitives/aes/aesni_primitives.cpp
27:#include <immintrin.h>
src/test/test_bitmatrix.cpp
33:#include <emmintrin.h> // this seems unused
src/motioncore/utility/bit_matrix.cpp
38:#include <immintrin.h>
the bit_matrix implementation seems to use sse2 instructions (code using AVX is unconditionally disabled and labeled as buggy). The AES implementation seems to use sse2 and AES-NI instructions.
During the last meeting, we discussed using simde as an abstraction library. The problem however is, that it doesn't support AES. There is however a library which supports this use case: sse2neon. While it's not as broad as simde, it supports exactly what we need to enable Android support.