News for hackers. Stuff that matters.
Re:Zig 0.3.0 Released by keldaris on Friday September 28, 2018 @04:09PM (#18096637)
Thank you for the detailed responses. One, possibly silly, followup question, since you mentioned using AVX. If I understand correctly, Zig deliberately avoids macros, metaprogramming and doesn't have operator overloading. Given those limitations, how do you deal with vector math over different SIMD widths without insane verbosity? I feel like I'd be tempted to write a simple code generator before starting on something like that.
Re:Zig 0.3.0 Released by unique_id on Friday September 28, 2018 @05:07PM (#18097074)
Zig has extensive metaprogramming support.

For SIMD I'm using ispc which is a shader-like language/compiler from Intel. You write your code from the point of view of a single SIMD lane and the compiler takes care of the rest. Intel kind of screwed the project over with their stupid naming and terrible website but it's a very cool project. I take the resulting object file and link it with the rest of the project. This is very different from trusting a compiler to vectorize your code, with a shading language you know it's going to vectorize. What's absolutely brilliant is when you start to use divergent control flow and see how well it handles it.

https://pharr.org/matt/blog/2018/04/18/ispc-origins.html