Skip to content

Commit

Permalink
Avoid ambiguities
Browse files Browse the repository at this point in the history
  • Loading branch information
dlfivefifty committed Jul 20, 2023
1 parent fd44183 commit 3b4bc87
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/LazyBandedMatrices.jl
Original file line number Diff line number Diff line change
Expand Up @@ -911,7 +911,6 @@ copy(M::Mul{<:StructuredLazyLayouts}) = simplify(M)
copy(M::Mul{<:Any, <:StructuredLazyLayouts}) = simplify(M)
copy(M::Mul{<:StructuredLazyLayouts, <:AbstractLazyLayout}) = simplify(M)
copy(M::Mul{<:AbstractLazyLayout, <:StructuredLazyLayouts}) = simplify(M)
copy(M::Mul{ApplyLayout{typeof(*)},<:StructuredLazyLayouts}) = simplify(M)
copy(M::Mul{<:StructuredLazyLayouts, <:DiagonalLayout}) = simplify(M)
copy(M::Mul{<:DiagonalLayout, <:StructuredLazyLayouts}) = simplify(M)

Expand All @@ -937,6 +936,7 @@ copy(M::Mul{<:StructuredLazyLayouts,ApplyLayout{typeof(*)}}) = simplify(M)
copy(M::Mul{ApplyLayout{typeof(*)},<:BroadcastLayouts}) = simplify(M)
copy(M::Mul{<:BroadcastLayouts,ApplyLayout{typeof(*)}}) = simplify(M)
copy(M::Mul{<:AbstractInvLayout{<:BandedLazyLayouts},<:StructuredLazyLayouts}) = ArrayLayouts.ldiv(pinv(M.A), M.B)
copy(M::Mul{<:StructuredApplyLayouts{typeof(*)},<:AbstractInvLayout{<:BandedLazyLayouts}}) = simplify(M)
copy(M::Mul{ApplyLayout{typeof(*)},<:AbstractInvLayout{<:BandedLazyLayouts}}) = simplify(M)

Check warning on line 940 in src/LazyBandedMatrices.jl

View check run for this annotation

Codecov / codecov/patch

src/LazyBandedMatrices.jl#L939-L940

Added lines #L939 - L940 were not covered by tests

copy(L::Ldiv{<:StructuredLazyLayouts, <:StructuredLazyLayouts}) = lazymaterialize(\, L.A, L.B)
Expand Down Expand Up @@ -972,6 +972,7 @@ mulreduce(M::Mul{<:StructuredLazyLayouts, <:PaddedLayout}) = MulAdd(M)
mulreduce(M::Mul{<:StructuredApplyLayouts{F}, D}) where {F,D<:PaddedLayout} = Mul{ApplyLayout{F},D}(M.A, M.B)
# need to overload copy due to above
copy(M::Mul{<:StructuredLazyLayouts, <:PaddedLayout}) = copy(mulreduce(M))
copy(M::Mul{<:AbstractInvLayout{<:BandedLazyLayouts}, <:PaddedLayout}) = ArrayLayouts.ldiv(pinv(M.A), M.B)

Check warning on line 975 in src/LazyBandedMatrices.jl

View check run for this annotation

Codecov / codecov/patch

src/LazyBandedMatrices.jl#L975

Added line #L975 was not covered by tests
copy(M::Mul{<:BandedLazyLayouts, <:PaddedLayout}) = copy(mulreduce(M))
simplifiable(::Mul{<:StructuredLazyLayouts, <:PaddedLayout}) = Val(true)

Expand Down

0 comments on commit 3b4bc87

Please sign in to comment.