DifferentiationInterface.jl icon indicating copy to clipboard operation
DifferentiationInterface.jl copied to clipboard

copy method for prep objects

Open tpapp opened this issue 3 months ago • 1 comments

Please add copy method for prep objects if that is feasible.

Rationale: no need to invoke prepare_... methods again, which require (at least the type of) the original x which would then need to be kept, for no other reason.

Specifically, I want to use it in LogDensityProblemsAD.jl, our current implementation is not thread-safe since copy falls back to a no-op.

tpapp avatar Oct 01 '25 08:10 tpapp

That's a very good idea!

gdalle avatar Oct 01 '25 10:10 gdalle