Closed moorepants closed 7 years ago
Looking into cephes it looked a bit tricky to compile on Windows (didn't actually try though). I will look into using this: https://github.com/romeric/fastapprox/blob/master/fastapprox/src/fastexp.h#L64
Where would we plan to put this. We currently don't have a explicit location for it in the outline anymore. Would this example be appropriate for @ixjlyons's section since his is the only one that is compiling code explicitly?
Sure, why not?
So we are going to try to get these into 1.1:
https://github.com/sympy/sympy/pull/9001 https://github.com/sympy/sympy/pull/12833
This will allow us to subclass the C printer with the fastexp function.
Once the fastexp
example using autowrap is in (and notebooks/55-C-calling-3rd-party-lib.ipynb
hidden) this can be closed.
Kenny's working on incorporating this into the third section of his notebook. So I think we are good. Nice that we got that working. Really makes autowrap quite a bit more useful.
Yeah I've got it just about there but I haven't committed yet so CI isn't broken. Now we're on the release candidate I'll push up my progress later today or tomorrow morning.
Currently the Sundials examples have a large amount of overhead (C templates, etc) which is hidden to the student. The notebook is mostly a demonstration of the speed gains one can get from integrating the equations without any Python callbacks and using a third party C lib.
I mentioned to Bjorn my original intention when adding this objective to the tutorial proposal on gitter, which was:
Bjorn then mentions cephes:
My suggestion would be that we show how to use a cephes function for this learning objective. It could be as simple as using
powi
from cephes instead ofpow
from the C math.We could then leave Bjorn's sundials code as a demo for the end of the tutorial, i.e. to show off what is possible.