Skip to content

Commit

Permalink
Help disambiguation with special matrix types (#134)
Browse files Browse the repository at this point in the history
  • Loading branch information
dkarrasch authored May 8, 2023
1 parent 536d21b commit 35a135b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "ArrayLayouts"
uuid = "4c555306-a7a7-4459-81d9-ec55ddd5c99a"
authors = ["Sheehan Olver <solver@mac.com>"]
version = "1.0.3"
version = "1.0.4"

[deps]
FillArrays = "1a297f60-69ca-5386-bcde-b61e274b549b"
Expand Down
13 changes: 8 additions & 5 deletions src/mul.jl
Original file line number Diff line number Diff line change
Expand Up @@ -203,10 +203,6 @@ macro layoutmul(Typ)
ArrayLayouts.mul!(dest,A,B,α,β)
LinearAlgebra.mul!(dest::AbstractMatrix, A::AbstractMatrix, B::$Typ, α::Number, β::Number) =
ArrayLayouts.mul!(dest,A,B,α,β)
LinearAlgebra.mul!(dest::AbstractMatrix, A::$Typ, B::Diagonal, α::Number, β::Number) =
ArrayLayouts.mul!(dest,A,B,α,β)
LinearAlgebra.mul!(dest::AbstractMatrix, A::Diagonal, B::$Typ, α::Number, β::Number) =
ArrayLayouts.mul!(dest,A,B,α,β)
LinearAlgebra.mul!(dest::AbstractMatrix, A::$Typ, B::$Typ, α::Number, β::Number) =
ArrayLayouts.mul!(dest,A,B,α,β)

Expand Down Expand Up @@ -237,10 +233,17 @@ macro layoutmul(Typ)
(*)(A::LinearAlgebra.AdjointQ{<:Any,<:LinearAlgebra.LQPackedQ}, B::$Typ) = ArrayLayouts.mul(A,B)
end
end
for Struc in (:AbstractTriangular, :Diagonal)
for Struc in (:AbstractTriangular, :Diagonal, :Bidiagonal, :SymTridiagonal, :Tridiagonal)
# starting from Julia v1.10, the last four could be put into a single Union to
# reduce the number of mul! methods; or perhaps addressed as some common supertype
ret = quote
$ret

LinearAlgebra.mul!(dest::AbstractMatrix, A::$Typ, B::LinearAlgebra.$Struc, α::Number, β::Number) =
ArrayLayouts.mul!(dest,A,B,α,β)
LinearAlgebra.mul!(dest::AbstractMatrix, A::LinearAlgebra.$Struc, B::$Typ, α::Number, β::Number) =
ArrayLayouts.mul!(dest,A,B,α,β)

(*)(A::LinearAlgebra.$Struc, B::$Typ) = ArrayLayouts.mul(A,B)
(*)(A::$Typ, B::LinearAlgebra.$Struc) = ArrayLayouts.mul(A,B)
end
Expand Down

2 comments on commit 35a135b

@dlfivefifty
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/83117

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v1.0.4 -m "<description of version>" 35a135b3301ea496b70816ae52580008a92e5f7c
git push origin v1.0.4

Please sign in to comment.