Skip to content

Commit

Permalink
Update adjoint_common.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
Abhishek-1Bhatt committed Jul 6, 2022
1 parent 2df07ee commit bdde708
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/adjoint_common.jl
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,6 @@ function (f::ReverseLossCallback)(integrator)
copyto!(y, integrator.u[(end - idx + 1):end])
end

# if u isa StaticArrays.SArray
if ArrayInterfaceCore.ismutable(u)
# Warning: alias here! Be careful with λ
gᵤ = isq ? λ : @view(λ[1:idx])
Expand All @@ -427,7 +426,6 @@ function (f::ReverseLossCallback)(integrator)
F !== I && F !== (I, I) && ldiv!(F, Δλd)
end

# if u isa StaticArrays.SArray
if ArrayInterfaceCore.ismutable(u)
u[diffvar_idxs] .+= Δλd
else
Expand Down

0 comments on commit bdde708

Please sign in to comment.