Conversation
|
Are there any other loops of this sort in the maps package that we should parallelize? Might as well include any others in this PR too. |
… multithread-remove-weights
|
The other case is the There are a couple of instances in |
I would probably just parallelize all those loops anyway for consistency. (Apologies for delayed review!) |
e44615d to
2037709
Compare
|
I searched for all cases of While doing this, I was warned that a race condition can occur if the map is not in a dense format (this is why |
Ah, that's a really good point, and probably why this wasn't parallelized in the first place. There is almost certainly a way to make the operation thread-safe for non-dense formats, but would take quite a bit of additional care. I haven't thought about this in any detail, but perhaps there are certain operations that can be marked as As it is, I think using this for |
Use OpenMP for map operations that are thread-safe (i.e. those that do not require resizing sparse backend storage). This includes any math operations on dense maps, populating sky masks, or applying map weights.