News for hackers. Stuff that matters.
Re:DreamWorks releases OpenMoonRay source code by daniel-thompson on Wednesday March 15, 2023 @05:22PM (#35174907)
Surprised nobody has mentioned this, but it looks like it implements the render kernels in ISPC^, which is a tool that exposes a CUDA-like SPMD model that runs over the vector lanes in the CPU.

ISPC is also used by Disney's Hyperion renderer, see https://www.researchgate.net/publication/326662420_The_Desig...

Neat!

^ https://ispc.github.io/

Re:DreamWorks releases OpenMoonRay source code by xmcqdpt2 on Wednesday March 15, 2023 @05:42PM (#35175128)
Neat!

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?

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.

Re:DreamWorks releases OpenMoonRay source code by ykl on Wednesday March 15, 2023 @08:01PM (#35176383)
Hyperion does not use ISPC. Source: I am one of the Hyperion developers.
Re:DreamWorks releases OpenMoonRay source code by daniel-thompson on Wednesday March 15, 2023 @08:39PM (#35176687)
I thought I saw somewhere it did; I must have misread. Thanks for the clarification!
Re:DreamWorks releases OpenMoonRay source code by Tunabrain on Thursday March 16, 2023 @04:36AM (#35179579)
Oh wow, I bump into you everywhere!