Settings

Theme

Show HN: Computesim, learn compute shaders and control flow

github.com

5 points by planetis a year ago · 0 comments · 1 min read

Reader

Hey HN, I wrote a compute shader emulator that started as a 50-line script to help me understand reduction shaders. What makes this implementation interesting is its technical approach; I've leveraged Nim's macros and closure iterators to simulate lockstep execution of logical threads. The emulator runs GPU compute shaders on CPU, simulating workgroups and subgroups with proper synchronization. It supports GLSL subgroup operations and provides nice debugging messages. The emulator works with Nim code that follows compute shader patterns

I've documented some technical aspects here: https://x.com/planetis_m/status/1873857578931011614 Demo/Repo: https://github.com/planetis-m/compute-sim

No comments yet.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection