[Numpy-discussion] NumPy re-factoring project

Pauli Virtanen pav at iki.fi
Thu Jun 10 16:28:28 EDT 2010


Thu, 10 Jun 2010 18:48:04 +0200, Sturla Molden wrote:
[clip]
> 5. Allow OpenMP pragmas in the core. If arrays are above a certain size,
> it should switch to multi-threading.

Some places where Openmp could probably help are in the inner ufunc 
loops. However, improving the memory efficiency of the data access 
pattern is another low-hanging fruit for multidimensional arrays.

I'm not sure how Openmp plays together with thread-safety; especially if 
used in outer constructs. Whether this is possible to do easily is not so 
clear, as Numpy uses e.g. iterator and loop objects, which cannot 
probably be shared between different openmp threads. So one would have to 
do some extra work to parallelize these parts manually.

But probably if multithreading is desired, openmp sounds like the way to 
go...

-- 
Pauli Virtanen




More information about the NumPy-Discussion mailing list