Skip to content

Commit 679805a

Browse files
authored
Fix location of definition of const (#116)
1 parent 9a9d8f1 commit 679805a

File tree

4 files changed

+14
-5
lines changed

4 files changed

+14
-5
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "ArrayLayouts"
22
uuid = "4c555306-a7a7-4459-81d9-ec55ddd5c99a"
33
authors = ["Sheehan Olver <[email protected]>"]
4-
version = "0.8.16"
4+
version = "0.8.17"
55

66
[deps]
77
FillArrays = "1a297f60-69ca-5386-bcde-b61e274b549b"

src/ldiv.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ macro _layoutldiv(Typ)
135135
LinearAlgebra.ldiv!(A::Factorization, x::$Typ; kwds...) = ArrayLayouts.ldiv!(A,x; kwds...)
136136
LinearAlgebra.ldiv!(A::LU, x::$Typ; kwds...) = ArrayLayouts.ldiv!(A,x; kwds...)
137137
LinearAlgebra.ldiv!(A::Cholesky, x::$Typ; kwds...) = ArrayLayouts.ldiv!(A,x; kwds...)
138+
LinearAlgebra.ldiv!(A::LinearAlgebra.QRCompactWY, x::$Typ; kwds...) = ArrayLayouts.ldiv!(A,x; kwds...)
138139

139140
LinearAlgebra.ldiv!(A::Bidiagonal, B::$Typ; kwds...) = ArrayLayouts.ldiv!(A,B; kwds...)
140141

src/mul.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,6 @@ mul!(dest::AbstractArray, A::AbstractArray, B::AbstractArray, α::Number, β::Nu
118118

119119
broadcastable(M::Mul) = M
120120

121-
const FlexibleLeftQs = Union{LinearAlgebra.HessenbergQ, LinearAlgebra.QRCompactWYQ, LinearAlgebra.QRPackedQ}
122-
123121
macro veclayoutmul(Typ)
124122
ret = quote
125123
(*)(A::AbstractMatrix, B::$Typ) = ArrayLayouts.mul(A,B)
@@ -139,6 +137,7 @@ macro veclayoutmul(Typ)
139137
ret = quote
140138
$ret
141139

140+
const FlexibleLeftQs = Union{LinearAlgebra.HessenbergQ, LinearAlgebra.QRCompactWYQ, LinearAlgebra.QRPackedQ}
142141
# disambiguation for flexible left-mul Qs
143142
(*)(A::FlexibleLeftQs, B::$Typ) = ArrayLayouts.mul(A,B)
144143
# flexible right-mul/adjoint left-mul Qs
@@ -213,6 +212,7 @@ macro layoutmul(Typ)
213212
ret = quote
214213
$ret
215214

215+
const FlexibleLeftQs = Union{LinearAlgebra.HessenbergQ, LinearAlgebra.QRCompactWYQ, LinearAlgebra.QRPackedQ}
216216
# disambiguation for flexible left-mul/adjoint right-mul Qs
217217
(*)(A::FlexibleLeftQs, B::$Typ) = ArrayLayouts.mul(A,B)
218218
(*)(A::$Typ, B::LinearAlgebra.AdjointQ{<:Any,<:FlexibleLeftQs}) = ArrayLayouts.mul(A,B)

test/test_layoutarray.jl

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,16 @@ MemoryLayout(::Type{MyVector}) = DenseColumnMajor()
129129

130130
@testset "ldiv!" begin
131131
c = MyVector(randn(5))
132-
@test_broken ldiv!(lu(A), MyVector(copy(c))) A \ c
133-
@test_throws ErrorException ldiv!(qr(A), MyVector(copy(c)))
132+
if VERSION < v"1.9-"
133+
@test_broken ldiv!(lu(A), MyVector(copy(c))) A \ c
134+
else
135+
@test ldiv!(lu(A), MyVector(copy(c))) A \ c
136+
end
137+
if VERSION < v"1.9-" || VERSION >= v"1.10-"
138+
@test_throws ErrorException ldiv!(qr(A), MyVector(copy(c)))
139+
else
140+
@test_throws MethodError ldiv!(qr(A), MyVector(copy(c)))
141+
end
134142
@test_throws ErrorException ldiv!(eigen(randn(5,5)), c)
135143
@test ArrayLayouts.ldiv!(svd(A.A), copy(c)) ArrayLayouts.ldiv!(similar(c), svd(A.A), c) A \ c
136144
if VERSION v"1.8"

0 commit comments

Comments
 (0)