On Friday, 6 July 2018 at 23:08:27 UTC, Random D user wrote:
[SPMD] works by running multiple iterations/instances of your
loop at once on SIMD and the compiler could do that
automatically for you and your normal loop & array code.
It occurred to me that SPMD on SIMD would be really nice
addition to D's arsenal.
Especially, since D doesn't even attempt any auto-vectorization
(poor results and difficult to implement) and manual loops are
quite tedious to write (even std.simd failed to materialize),
so SPMD would be nice alternative.
I think you are mistaken, D code is autovectorized often when
using LDC.
Sometimes it's not and it's hard to know why.
A pragma we could have is the one in the Intel C++ Compiler that
says "hey this loop is safe to autovectorize".
What do you think?
I think that ispc is like OpenCL on the CPU, but can't work on
the GPU, FPGA or other OpenCL implementation. OpenCL is so fast
because caching is explicit (several levels of memory are
exposed).