3 ms·
I didn't know that. So let's say I have 4 regular Python threads calling the same function, and in this function, let's say I call numpy.add on the same array (
by ZuLuuuuuu 6y ago
I didn't know that. So let's say I have 4 regular Python threads calling the same function, and in this function, let's say I call numpy.add on the same array (but different parts of the array), then will it actually use different cores for these 4 different threads? I will try it out, if it works, then that's actually great and would be super easy.
- pletnes 6y agoGreat, then my comment was worth it! Not sure there’s anything to prevent you from foot-shooting if you’re operating on the same array. I’d expect that this is only safe to do if, as you say, arrays are not overlapping. Let me know what you find.
- captain_price7 6y agoThe answer is No, isn't it?
- ZuLuuuuuu 5y agoI wrote a small code to test it. Unfortunately it didn't work, but I don't know if the problem is me, maybe I made a mistake...