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

Parallelised iradon #208

Merged
merged 2 commits into from
Jan 29, 2024
Merged

Parallelised iradon #208

merged 2 commits into from
Jan 29, 2024

Conversation

jadball
Copy link
Contributor

@jadball jadball commented Jan 26, 2024

I was able to parallelise the iradon function.
This was achieved by distributing the interpolation calls across multiple processes.
I've also added a check to use the (supposedly faster) np.interp method instead of the scipy one if the desired interpolation is linear.
With 7 workers (seems to be the fastest for the shepp-logan phantom) and 3600 projections, this new parallelised version is around 6 times faster than before.

@jadball jadball requested a review from jonwright January 26, 2024 13:55
@jonwright
Copy link
Member

Thanks! I will merge it like this. This code you have added is parallel over projections and it is doing a reduction into the final image (so a lot of summing on a single thread, or threaded by numpy?).
The original idea was to chop the output image into tiles (or rows) and then treat each one in a thread. So then there is no locking.
I think this can still improve this approach if each thread sums several projections and returns only one frame to be summed (e.g. do some of the reduction summation in parallel).

@jonwright jonwright merged commit 74f04c0 into FABLE-3DXRD:master Jan 29, 2024
5 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