-
-
Notifications
You must be signed in to change notification settings - Fork 22
docs: Add LCG generator to example #1680
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: docs/generator-slot
Are you sure you want to change the base?
Conversation
pkg.pr.new packages
benchmark commit |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, looks good! 🐀
c.distributions | ||
.map((dist) => | ||
tgpu.resolve({ | ||
externals: { | ||
f: executor.cachedPipeline(getPRNG(dist).prng), | ||
}, | ||
}) | ||
.flatMap((dist) => | ||
c.generators.map((gen) => | ||
tgpu.resolve({ | ||
externals: { | ||
p: executor.pipelineCacheGet( | ||
getPRNG(dist).prng, | ||
getGenerator(gen), | ||
), | ||
}, | ||
}) | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be cleaner as a nested for...of. Right now the result of the map is not used, so it would be more fitting for forEach anyway.
Also, if we do not get rid of the default, this test has duplicate resolves for the default generator.
Changes: