Open
Description
Great package, thanks, have been doing something similar recently. One thing which would be great to have here is to allow using existing non-Dual plans on Dual arrays. Sometimes you have a calculation with precomputed plans, then you later want to compute derivatives, e.g.
plan = plan_fft(Array{Float64}(undef, 10))
x = rand(10)
foo = A -> norm(plan * (A * x))
ForwardDiff.derivative(foo, 1) # ArgumentError: FFTW plan applied to wrong-size array
Should be possible to use the existing plan and manually loop over slices of the dual2array
array (may need a copy, not sure if memory needs to be contiguous there, probably yes). This is probably less efficient than the single "batched" plan approach you have here when planning with Duals, but will allow this to work at least.
Metadata
Metadata
Assignees
Labels
No labels