Re:SIMD Made Easy with Intel Implicit SPMD Program Compiler
by Const-me on Wednesday October 02, 2019 @01:28PM
(#21138825)
> if you want to target multiple ISAs, you need to write multiple algorithms
In my experience, these algorithms are similar to each other.
More often than not don't require too much extra time: a few macros here and there, a few templates, couple version of a small low-level function, etc.
> _mm256_hadd_epi32
That instruction is slow, e.g. on Ryzen it has latency 7. _mm256_slli_si256 and bitwise ops have latency 1, often can do same faster.
> readability is reduced when compared to the original scalar implementation
In my experience, these algorithms are similar to each other. More often than not don't require too much extra time: a few macros here and there, a few templates, couple version of a small low-level function, etc.
> _mm256_hadd_epi32
That instruction is slow, e.g. on Ryzen it has latency 7. _mm256_slli_si256 and bitwise ops have latency 1, often can do same faster.
> readability is reduced when compared to the original scalar implementation
Solvable with a library, example: https://github.com/Const-me/IntelIntrinsics