Skip to content

Commit 0a15619

Browse files
committed
use recursivecopy instead of deepcopy
1 parent f1d92b1 commit 0a15619

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

ext/LinearSolveForwardDiffExt.jl

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,13 @@ function linearsolve_forwarddiff_solve(cache::DualLinearCache, alg, args...; kwa
5454
primal_b = copy(cache.linear_cache.b)
5555
uu = sol.u
5656

57-
primal_sol = deepcopy(sol)
57+
primal_sol = (;
58+
u = recursivecopy(sol.u),
59+
resid = recursivecopy(sol.resid),
60+
retcode = recursivecopy(sol.retcode),
61+
iters = recursivecopy(sol.iters),
62+
stats = recursivecopy(sol.stats)
63+
)
5864

5965
# Solves Dual partials separately
6066
∂_A = cache.partials_A

0 commit comments

Comments
 (0)