It&#x27;s possible to do automatically this by using a SIMD library such as libsimdpp (<a href="https:&#x2F;&#x2F;github.com&#x2F;p12tic&#x2F;libsimdpp" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;p12tic&#x2F;libsimdpp</a>). Everything is mostly abstracted away and you just write the SIMDified code once and add a CMake rule that builds the same file for several architectures, sets up dynamic dispatch and links everything together.