TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Show HN: Computesim, learn compute shaders and control flow

5 点作者 planetis4 个月前
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&#x27;ve leveraged Nim&#x27;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<p>I&#x27;ve documented some technical aspects here: <a href="https:&#x2F;&#x2F;x.com&#x2F;planetis_m&#x2F;status&#x2F;1873857578931011614" rel="nofollow">https:&#x2F;&#x2F;x.com&#x2F;planetis_m&#x2F;status&#x2F;1873857578931011614</a> Demo&#x2F;Repo: <a href="https:&#x2F;&#x2F;github.com&#x2F;planetis-m&#x2F;compute-sim">https:&#x2F;&#x2F;github.com&#x2F;planetis-m&#x2F;compute-sim</a>

暂无评论

暂无评论