Skip to content
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

Add set_offset so that curandSetGeneratorOffset() can be called. #185

Merged
merged 1 commit into from
Oct 25, 2023

Conversation

mneilly
Copy link
Contributor

@mneilly mneilly commented Oct 14, 2023

Setting the seed with curandSetPseudoRandomGeneratorSeed() initializes the state of the PRNG but does not restart the sequence.

Per the docs curandSetGeneratorOffset() can be used to skip ahead in the random sequence such that "multiple runs of the same program to continue generating results from the same sequence without overlap". It may also be desirable to reset the offset back to zero (or another index) to reproduce a prior result.

The change simply adds set_offset to expose access to curandSetGeneratorOffset().

@coreylowman coreylowman merged commit 13e308d into coreylowman:main Oct 25, 2023
1 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants