You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think it should be possible to rewrite the loops to include OpenMP pragmas. The final update could be protected with #pragma omp atomic and you can use default(shared) private(tx ty ix iy) firstprivate(dataptr) or something similar. You'll need to redo the loops, however, you'll need for loops instead of the inner while (or maybe the outer do while), and the stride part might need to be precalculated in some way.
The text was updated successfully, but these errors were encountered:
I agree it would be nice to have this, although based on previous experience with OpenMP in other Python packages, I think I'd want this to be opt-in (rather than trying to automatically determining whether OpenMP can be used). Compilers on MacOS X are a bit of a mess in that respect.
I personally don't have enough experience with OpenMP to be comfortable making those changes, but if you or anyone else reading this issue is happy to look in to it, I'd gladly review a PR.
I can do the OpenMP part, but I don't have enough experience in raw Numpy to know how to write the loops with for's instead of whiles.
I automatically try to use OpenMP on macOS in GooFit, and you are right, it is a mess on macOS. Right now I'm just curious to see it added to the code for comparison, even if it's not as easy to turn on.
I think it should be possible to rewrite the loops to include OpenMP pragmas. The final update could be protected with
#pragma omp atomic
and you can usedefault(shared) private(tx ty ix iy) firstprivate(dataptr)
or something similar. You'll need to redo the loops, however, you'll need for loops instead of the inner while (or maybe the outer do while), and the stride part might need to be precalculated in some way.The text was updated successfully, but these errors were encountered: