-
Notifications
You must be signed in to change notification settings - Fork 22
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
Q: What if a computation is slower than the sample rate? #151
Comments
This is one of the ramifications that I unfortunately couldn't go into in the article, but it's an important question. It depends a bit on whether the computation can be run concurrently. If yes, you can use So maybe you can specify a particular use case, and then I can tell you more precisely what would be the right approach? In the meanwhile I'm going to throw some ideas around how to achieve roughly what you proposed, maybe it's what you're looking for.
|
Awesome, that doesn't seem too bad! My usecase was initially just to digest the paper properly, but now knowing this isn't too tough, I may use it in robotics simulation and audio generation! Thank you, I feel lucky to have this documentation to now refer back to :D |
Great :) feel free to come back for any questions. If your use case is open source, feel free to ping me on a PR if you run into trouble, and I can fix it there. I'll close now. Reopen for further questions. |
Ex: a sample rate of 10 Hz, but the intervening computation takes say 3s?
Maybe I missed it in the paper, but I could see 2 solutions:
Realtime solution : a resampling strategy that allows to "ignore clock ticks" if a separate thread is still computing a result from a previous tick. It could interpolate a result for a computation that we didn't have time to actually calculate.
Simulation-time-accurate : A slow computation blocks the entire clock tree. So if you want to simulate 10 x 10Hz samples and each computation takes 3s, the Rhine will take 30s to run, but the result will in-spirit represent 1s of simulation.
The text was updated successfully, but these errors were encountered: