-
-
Notifications
You must be signed in to change notification settings - Fork 30
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
Wrap GSL.jl in extension #213
base: master
Are you sure you want to change the base?
Conversation
GSLIntegration(routine; kws...) | ||
|
||
One-dimensional quadrature of Float64-valued function using `routine` from GSL with | ||
additional arguments. For example `using Integrals, GSL; GSLIntegration(integration_cquad; wssize=100)` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should probably document the available functions. How many are there?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are quite a few, since the GSL includes a rewrite of quadpack. I'll put a full list below and I hope that most of them can be wrapped metaprogramatically
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
integration_cquad
integration_fixed
integration_glfixed
integration_qag
integration_qagi
integration_qagil
integration_qagiu
integration_qagp
integration_qags
integration_qawc
integration_qawf
integration_qawo
integration_qaws
integration_qcheb
integration_qk
integration_qk15
integration_qk21
integration_qk31
integration_qk41
integration_qk51
integration_qk61
integration_qng
integration_romberg
This is looking good. Indeed it'll be interesting to see those robust methods on some example. |
While I wrap the other routines, there might be some upstream changes that facilitate the usage of GSL (see JuliaMath/GSL.jl#130) |
Hi,
I was interested in wrapping some of the GSL integration routines, which are unfortunately limited to 1d integration of scalar, real-valued functions. The main motivation is that the GSL has routines that claim to integrate singular functions and have robust adaptivity, which are helpful to have available for benchmarking algorithms and integrating certain functions. Part of the challenge of writing this extension, for me, is that GSL.jl is a low-level wrapper of the C library and I don't have much experience with memory management. It would be incredibly helpful for the reviewer to inspect the memory management, including the use of finalizers in
init_cacheval
and the call toBase.unsafe_convert
when constructing a runtime closure. Is there anything missing, such as calls toGC.@preserve
(see here)?Below, I mention a few additional todos below and an example of the usage is here
Checklist
contributor guidelines, in particular the SciML Style Guide and
COLPRAC.
wssize
)Additional context
Add any other context about the problem here.