Skip to content

Commit

Permalink
type stable
Browse files Browse the repository at this point in the history
  • Loading branch information
wsmoses committed Sep 24, 2023
1 parent c2ad2db commit 54f0722
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions ext/LinearSolveEnzymeExt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ function EnzymeCore.EnzymeRules.augmented_primal(config, func::Const{typeof(Line
dres = if EnzymeRules.width(config) == 1
func.val(prob.dval, alg.val; kwargs...)

Check warning on line 15 in ext/LinearSolveEnzymeExt.jl

View check run for this annotation

Codecov / codecov/patch

ext/LinearSolveEnzymeExt.jl#L12-L15

Added lines #L12 - L15 were not covered by tests
else
(func.val(dval, alg.val; kwargs...) for dval in prob.dval)
ntuple(Val(EnzymeRules.width(config))) do i
Base.@_inline_meta
func.val(prob.dval[i], alg.val; kwargs...)

Check warning on line 19 in ext/LinearSolveEnzymeExt.jl

View check run for this annotation

Codecov / codecov/patch

ext/LinearSolveEnzymeExt.jl#L17-L19

Added lines #L17 - L19 were not covered by tests
end
end
d_A = if EnzymeRules.width(config) == 1
dres.A

Check warning on line 23 in ext/LinearSolveEnzymeExt.jl

View check run for this annotation

Codecov / codecov/patch

ext/LinearSolveEnzymeExt.jl#L22-L23

Added lines #L22 - L23 were not covered by tests
Expand Down Expand Up @@ -66,7 +69,10 @@ function EnzymeCore.EnzymeRules.augmented_primal(config, func::Const{typeof(Line
dres = if EnzymeRules.width(config) == 1
deepcopy(res)

Check warning on line 70 in ext/LinearSolveEnzymeExt.jl

View check run for this annotation

Codecov / codecov/patch

ext/LinearSolveEnzymeExt.jl#L69-L70

Added lines #L69 - L70 were not covered by tests
else
(deepcopy(res) for dval in linsolve.dval)
ntuple(Val(EnzymeRules.width(config))) do i
Base.@_inline_meta
deepcopy(res)

Check warning on line 74 in ext/LinearSolveEnzymeExt.jl

View check run for this annotation

Codecov / codecov/patch

ext/LinearSolveEnzymeExt.jl#L72-L74

Added lines #L72 - L74 were not covered by tests
end
end

if EnzymeRules.width(config) == 1
Expand Down

0 comments on commit 54f0722

Please sign in to comment.