[Numpy-discussion] Using multiprocessing (shared memory) with numpy array multiplication
Thu Jun 16 09:51:39 CDT 2011
On 06/16/2011 09:30 AM, Sturla Molden wrote:
> Den 16.06.2011 16:16, skrev Bruce Southey:
>> The idea was to calculate:
>> innerProduct =numpy.sum(array1*array2) where array1 and array2 are, in
>> general, multidimensional.
> If you want to do that in parallel, fast an with minimal overhead, it's
> a typical OpenMP problem. If the dimensions are unknown in advance, I'd
> probably prefer a loop in C instead of Fortran and BLAS.
> NumPy-Discussion mailing list
Remember that is what the OP wanted to do, not me. My issue with this
is that this suggestion may be overkill and too complex for the OP
without knowing if there is 'sufficient' performance gain (let alone
gaining back the time spent ensuring that code is correct and
thread-safe as possible).
More information about the NumPy-Discussion