Skip to content

TF1/2 energy/angular distributions are now shared accross threads #85

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

Merged
merged 7 commits into from
Nov 30, 2022

Conversation

lobis
Copy link
Member

@lobis lobis commented Nov 27, 2022

lobis Medium: 109

Before this PR each thread had a copy of the TF1/2 formula and could be sampled without the need of synchronization. The problem with this approach is that each distribution had to be initialized independently which resulted in too much waiting time. At the end a single distribution is shared between threads and a mutex is added for sync, which does not result in appreciable delay.

@lobis lobis changed the title add sequential initialization of random distributions for multithreading mode TF1/2 energy/angular distributions are now shared accross threads Nov 29, 2022
@lobis lobis requested review from jgalan, juanangp and a team November 29, 2022 08:09
@lobis lobis marked this pull request as ready for review November 29, 2022 08:10
@lobis lobis merged commit 580c84b into master Nov 30, 2022
@lobis lobis deleted the lobis-formula-sampling-mt branch November 30, 2022 08:11
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