Re:DreamWorks releases OpenMoonRay source code
by daniel-thompson on Wednesday March 15, 2023 @07:38PM
(#35176205)
OpenMP starts with a serial model, the programmer tags the loop they want to run in parallel with a directive, and the compiler tries to vectorize the loop. This can always fail, since it relies on a computer program reasoning about an arbitrary block of code. So you have to really dig into the SIMD directives and understand their limitations in order to write performant code that actually does get vectorized.
ISPC starts with an SPMD programming model, and exposes only operations that conform to the model. "Vectorization" is performed by the developer - it's up to them to figure out how to map their algorithm or problem to the vector lanes (just like in CUDA or OpenCL). So there's no unexpectedly falling off the vectorization path - you start on it, and you can only do stuff that stays on it, by design.
Re:DreamWorks releases OpenMoonRay source code
by xmcqdpt2 on Thursday March 16, 2023 @06:48AM
(#35180289)
Specifically I meant OMP workshare which parallelizes vector operations in Fortran,
https://www.openmp.org/spec-html/5.0/openmpsu39.html
sorry should have been more specific.
Vectorization is the best part of writing Fortran. This looks like it makes it possible to write fortran-like code in C. I wonder how it compares to ifort / openMP?