2 ms·
> which language has standardized SIMD vector datatypes ? D does: https://dlang.org/spec/simd.html https://dlang.org/spec/simd.html
by WalterBright 6y ago
> which language has standardized SIMD vector datatypes ?
D does:
https://dlang.org/spec/simd.html https://dlang.org/spec/simd.html
- aidenn0 6y agoThat's quite well thought out; without the compile-time checks for operations existing, you end up with code either needing to target a very small subset of the operations that are widely supported or something that is not really cross-platform -- I've seen too much of the following using what is theoretically portable code because software-fallback will typically be an order of magnitude worse than using a different set of datatypes and operators #if defined(__NEON__) "portable" SIMD goes here #elif defined(__ALTIVEC__) different "portable" SIMD goes here ...
- WalterBright 6y agoThere was some discussion about what to do with vector types and operations that weren't supported by the hardware. We decided on compiler error instead of emulation, because the emulation would be terribly slow and the user may be unaware that he's getting emulation. With a compiler error, the user unambiguously knows if the SIMD hardware is being used or not.