|
|
|
|
|
by nemequ1729
2140 days ago
|
|
Apart from the fact that you have to rewrite your code, the big disadvantage to something like this is that it's a bit slower. With SIMDe you're still free to use functions like `_mm_maddubs_epi16` and they'll be really fast on x86, but still work everywhere. With xsimd (and similar libraries) you're generally limited to the lowest common denominator. FWIW, if abstraction layers are your thing you might want to look at std::experimental::simd (https://github.com/VcDevel/std-simd) instead. Google's Highway (https://github.com/google/highway) is also pretty interesting. |
|
If so, that's not necessarily true either. A few patterns exist here. One is what the intel compilers do where you conditionally call variants of a function based on the instruction set. Another is to compile SIMD-accelerated functionality into shared libs that are dynamically loaded at launch based on the instruction set.