Skip to content

Commit

Permalink
Fix ambiguity in mul! for Diagonal (#92)
Browse files Browse the repository at this point in the history
* Fix ambiguity in mul! for Diagonal

* Update test_layoutarray.jl
  • Loading branch information
dlfivefifty authored Mar 22, 2022
1 parent 0dc9413 commit ff50b2c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
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 = "0.8.2"
version = "0.8.3"

[deps]
FillArrays = "1a297f60-69ca-5386-bcde-b61e274b549b"
Expand Down
4 changes: 4 additions & 0 deletions src/mul.jl
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,10 @@ 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
3 changes: 3 additions & 0 deletions test/test_layoutarray.jl
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,9 @@ MemoryLayout(::Type{MyVector}) = DenseColumnMajor()
@test mul!(copy(B), A, Bin, 2, 3) 2A*Bin + 3B
@test mul!(copy(B), A, Bin', 2, 3) 2A*Bin' + 3B
@test mul!(copy(B), Bin', A, 2, 3) 2Bin'*A + 3B

@test mul!(copy(B), A, Diagonal(Bin), 2, 3) 2A*Diagonal(Bin) + 3B
@test mul!(copy(B), Diagonal(Bin), A, 2, 3) 2Diagonal(Bin)*A + 3B
end

@testset "generic_blasmul!" begin
Expand Down

2 comments on commit ff50b2c

@dlfivefifty
Copy link
Member Author

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/57063

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 v0.8.3 -m "<description of version>" ff50b2c46d95e3c50b63fdcc95ccc2dada8b3224
git push origin v0.8.3

Please sign in to comment.