-
-
Notifications
You must be signed in to change notification settings - Fork 34
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
In-place quadgk #12
Comments
Sounds good to me. I'm not entirely sure of the API for passing Some tricky refactoring might be required to keep the current generality (since not all types support things like One approach would be to internally wrap |
I think it would be I would also like to have options to pass in the work vectors, much like it's done in the differentiation libraries, so I can avoid it allocating those each time. Or some kind of config/plan type that is made once and re-use. |
Yes, but it would be good to refactor so that they can share as much code as possible. I'd hate to see the entire current implementation copy-pasted and then modified. |
Has there been any progress on this? Came over this issue when using quadgk in multithreaded loops on Intel KNL cpus, as the allocation made by the integrand severly limits proper scaling. |
No, no one has worked on this yet. |
Note that for integrating small vector integrands, you can use |
I just pushed a PR to address this issue. Note that it still cannot operate entirely in-place, because the QuadGK algorithm must dynamically allocate a heap data structure containing integration results on subintervals determined from error estimation. |
While this package allows evaluation of integrands which return arrays, it's not efficient for the integrand to be an allocating
f(t)
. Instead,quadgk
should support a non-allocating formf!(out,t)
for this case, for this version of the function do minimal internal allocation by caching necessary arrays and doing everything in-place.The text was updated successfully, but these errors were encountered: