←back to thread

138 points shipp02 | 4 comments | | HN request time: 3.289s | source
1. HALtheWise ◴[] No.40649046[source]
For a SIMD architecture that supports scatter/gather and instruction masking (like Arm SVE), could a compiler or language allow you to write "Scalar-style code" that compiles to SIMD instructions? I guess this is just auto-vectorization, but I'd be interested in explicit tagging of code regions, possibly in combination with restrictions on what operations are allowed.
replies(2): >>40649285 #>>40649472 #
2. yosefk ◴[] No.40649285[source]
Check out ispc/spmd by Matt Pharr, a very interesting take on this subject
3. doophus ◴[] No.40649472[source]
Yes, have a look at ISPC - it's amazing. I especially like that it can generate code for multiple architectures and then select the best implementation at runtime for the CPU it's running on.
replies(1): >>40651445 #
4. xoranth ◴[] No.40651445[source]
Do you know any good tutorial for ISPC? Documentation is a bit sparse.