4 ms·
This is an example of doing manual SIMD. In some cases, it's still needed. Manual SIMD tend to be faster than what even the most modern compiler can provide. B
by maeln 7y ago
This is an example of doing manual SIMD. In some cases, it's still needed. Manual SIMD tend to be faster than what even the most modern compiler can provide.
Because it is low level, it won't be fancy, but you can find several library that wrap those low-level ops in more fancy APIs.
Comparing it with CUDA is hardly a good comparison. Even if the GPU is basically a bunch of SIMD unit, GPGPU programming is still very different than adding SIMD capability to an x86 program.
- dragontamer 7y agoYou really should check out ipsc, which is a CPU-SIMD compiler similar to CUDA. With that being said, there's good reason to use raw intrinsics in modern code. But ipsc / CUDA model is superior for most uses in my experience. Its just easier to think about. The main issue with IPSC is that you're innately SOA, and the data-layout is just different compared to how people normally organize their data. Data-layout issues (AOS vs SOA) are probably one of the most tedious issues to deal with when using SIMD. For the "interface", where you're converting AOS to SOA, manual intrinsics can help.