Skip to content

Commit 508a328

Browse files
committed
fix AbstractQ ambiguituies
1 parent baac056 commit 508a328

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

src/ArrayLayouts.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,8 @@ abstract type LayoutArray{T,N} <: AbstractArray{T,N} end
8282
const LayoutMatrix{T} = LayoutArray{T,2}
8383
const LayoutVector{T} = LayoutArray{T,1}
8484
const LayoutVecOrMat{T} = Union{LayoutVector{T},LayoutMatrix{T}}
85-
const LayoutVecOrMats{T} = Union{LayoutVecOrMat{T},SubArray{T,1,<:LayoutVecOrMat},SubArray{T,2,<:LayoutVecOrMat}}
85+
const LayoutMatrices{T} = Union{LayoutMatrix{T}, SubArray{T,2,<:LayoutVecOrMat}}
86+
const LayoutVecOrMats{T} = Union{LayoutVecOrMat{T}, SubArray{T,1,<:LayoutVecOrMat}, SubArray{T,2,<:LayoutVecOrMat}}
8687

8788

8889
## TODO: Following are type piracy which may be removed in Julia v1.5

src/factorizations.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,8 @@ mulreduce(M::Mul{<:AbstractQLayout}) = Lmul(M)
134134
mulreduce(M::Mul{<:Any,<:AbstractQLayout}) = Rmul(M)
135135
mulreduce(M::Mul{<:TriangularLayout,<:AbstractQLayout}) = Rmul(M)
136136
mulreduce(M::Mul{<:AbstractQLayout,<:TriangularLayout}) = Lmul(M)
137+
mulreduce(M::Mul{<:DiagonalLayout, <:AbstractQLayout}) = Lmul(M)
138+
mulreduce(M::Mul{<:AbstractQLayout, <:DiagonalLayout}) = Rmul(M)
137139

138140
function copyto!(dest::AbstractArray{T}, M::Lmul{<:AbstractQLayout}) where T
139141
A,B = M.A,M.B

src/lmul.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,8 @@ macro layoutrmul(Typ)
155155
end
156156

157157

158-
LinearAlgebra.lmul!(Q::AbstractQ, v::LayoutVecOrMat) = lmul!(Q, v)
159-
LinearAlgebra.lmul!(Q::Adjoint{<:Any,<:AbstractQ}, v::LayoutVecOrMat) = lmul!(Q, v)
158+
LinearAlgebra.lmul!(Q::AbstractQ, v::LayoutVecOrMats) = lmul!(Q, v)
159+
LinearAlgebra.lmul!(Q::Adjoint{<:Any,<:AbstractQ}, v::LayoutVecOrMats) = lmul!(Q, v)
160160

161-
LinearAlgebra.rmul!(A::LayoutMatrix, Q::AbstractQ) = rmul!(A, Q)
162-
LinearAlgebra.rmul!(A::LayoutMatrix, Q::Adjoint{<:Any,<:AbstractQ}) = rmul!(A, Q)
161+
LinearAlgebra.rmul!(A::LayoutMatrices, Q::AbstractQ) = rmul!(A, Q)
162+
LinearAlgebra.rmul!(A::LayoutMatrices, Q::Adjoint{<:Any,<:AbstractQ}) = rmul!(A, Q)

0 commit comments

Comments
 (0)