Skip to content

Commit

Permalink
Add a macro kfill!
Browse files Browse the repository at this point in the history
  • Loading branch information
amontoison committed Oct 16, 2024
1 parent ba7378b commit 8be46c7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/krylov_solvers.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2047,8 +2047,8 @@ for (KS, fun, nsol, nA, nAt, warm_start) in [
S = typeof(solver.x)
allocate_if(true, solver, :Δx, S, n)
allocate_if(true, solver, :Δy, S, m)
@kcopyto!(n, solver.Δx, x0)
@kcopyto!(m, solver.Δy, y0)
copyto!(solver.Δx, x0)
copyto!(solver.Δy, y0)
solver.warm_start = true
return solver
end
Expand All @@ -2058,7 +2058,7 @@ for (KS, fun, nsol, nA, nAt, warm_start) in [
S = typeof(solver.x)
length(x0) == n || error("x0 should have size $n")
allocate_if(true, solver, :Δx, S, n)
@kcopyto!(n, solver.Δx, x0)
copyto!(solver.Δx, x0)
solver.warm_start = true
return solver
end
Expand Down

0 comments on commit 8be46c7

Please sign in to comment.