Skip to content

Commit

Permalink
Update QuadGKEnzymeExt.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
wsmoses authored Sep 17, 2024
1 parent e87bd84 commit ab12c5b
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions ext/QuadGKEnzymeExt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -90,18 +90,21 @@ end

function Base.:+(a::CV, b::CV) where {CV <: MixedClosureVector}
res = deepcopy(a)::CV
Enzyme.Compiler.recursive_accumulate(res, b, identity)::CV
Enzyme.Compiler.recursive_accumulate(res, b, identity)
res

Check warning on line 94 in ext/QuadGKEnzymeExt.jl

View check run for this annotation

Codecov / codecov/patch

ext/QuadGKEnzymeExt.jl#L91-L94

Added lines #L91 - L94 were not covered by tests
end

function Base.:-(a::CV, b::CV) where {CV <: MixedClosureVector}
res = deepcopy(a)::CV
Enzyme.Compiler.recursive_accumulate(res, b, x->-x)::CV
Enzyme.Compiler.recursive_accumulate(res, b, x->-x)
res

Check warning on line 100 in ext/QuadGKEnzymeExt.jl

View check run for this annotation

Codecov / codecov/patch

ext/QuadGKEnzymeExt.jl#L97-L100

Added lines #L97 - L100 were not covered by tests
end

function Base.:*(a::Number, b::CV) where {CV <: MixedClosureVector}

Check warning on line 103 in ext/QuadGKEnzymeExt.jl

View check run for this annotation

Codecov / codecov/patch

ext/QuadGKEnzymeExt.jl#L103

Added line #L103 was not covered by tests
# b + (a-1) * b = a * b
res = deepcopy(b)::CV
Enzyme.Compiler.recursive_accumulate(res, b, x->(a-1)*x)::CV
Enzyme.Compiler.recursive_accumulate(res, b, x->(a-1)*x)
res

Check warning on line 107 in ext/QuadGKEnzymeExt.jl

View check run for this annotation

Codecov / codecov/patch

ext/QuadGKEnzymeExt.jl#L105-L107

Added lines #L105 - L107 were not covered by tests
end

function Base.:*(a::MixedClosureVector, b::Number)
Expand Down

0 comments on commit ab12c5b

Please sign in to comment.