New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move function wrappers into simplified interface #60
Conversation
…argument (replace by closures) to fix tests on git master
Is that statement for v0.4? It should work on v0.5 since anonymous functions are generic in that case. But if closures aren't working with it in v0.5, I'd count that as a non-starter since I can point to a lot of examples where people are using closures to put in parameters. Anyways, this is not actionable unless tests pass. You should relabel this WIP if you plan on continuing this, or close. @alyst was this touched in #67? I don't recall seeing changes to the function wrappers. Is this affected by the changes? |
@ChrisRackauckas It was somewhat touched, in the sense that I'm not sure we need to move the wrapper functions into the bodies of the simplified interface function. Maybe it's worth investigating what is the overhead of the current wrapper implementation and whether there are ways to improve it (e.g. parameterize UserDataAndFunction by the type of user data and make it immutable). I left it out of the #67 scope. CVODE/IDA allows specifying the other user functions, e.g. |
Sounds like this is relevant to the discussion SciML/Roadmap#2 |
I've been following Julia development and using v0.5/master in my work for a while, but haven't touched the Sundials portion for a bit. I believe the issue with ccallable closures was present in v0.4 and has been (at least partially) resolved recently; the change in this PR fixed some issues on the then-current master, but not all. |
See also JuliaLang/julia#1096 |
Was it not resolved by JuliaLang/julia#13412 now that anonymous functions are all generic? |
No: the issue I was trying to work around was caused by that; Ref{Function} no longer made sense. Ptr{Void} does though. |
I see. |
No longer relevant. |
Move function wrappers into simplified interface and remove function argument (replace by closures) to fix tests on git master. Not sure if this is the "correct" way to do this compared to the comment on JuliaLang/julia#13412, but it does work.
Update: It works for simple cases, but not when the RHS is a closure.