Wed, 21 Oct 2009 14:47:02 +0200, Francesc Alted wrote:
[clip]
>> Do you have any interest in adding SIMD to some core numpyOptimized transcendental functions could be interesting. For example for
>> (transcendental functions). If so, I would try to go back to the
>> problem of runtime SSE detection and loading of optimized shared
>> library in a cross-platform way - that's something which should be done
>> at some point in numpy, and people requiring it would be a good
>> incentive.
>
> I don't personally have a lot of interest implementing this for numpy.
> But in case anyone does, I find the next library:
>
> http://gruntthepeon.free.fr/ssemath/
>
> very interesting. Perhaps there could be other (free)
> implementations...
tanh, call overhead is overcome already for ~30-element arrays.
Since these are ufuncs, I suppose the SSE implementations could just be
put in a separate module, which is always compiled. Before importing the
module, we could simply check from Python side that the CPU supports the
necessary instructions. If everything is OK, the accelerated
implementations would then just replace the Numpy routines.
This type of project could probably also be started outside Numpy, and
just monkey-patch the Numpy routines on import.
--
Pauli Virtanen
_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion