Skip to content

Commit 5a52d61

Browse files
authored
Another mul! overload (#64)
* Another mul! overload * Update ci.yml * Update test_layoutarray.jl
1 parent 47de258 commit 5a52d61

File tree

4 files changed

+12
-4
lines changed

4 files changed

+12
-4
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
matrix:
1212
version:
1313
- '1.5'
14-
- '^1.6.0-0'
14+
- '1'
1515
os:
1616
- ubuntu-latest
1717
- macOS-latest

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.7"
4+
version = "0.7.1"
55

66

77
[deps]

src/mul.jl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,10 @@ macro layoutmul(Typ)
163163

164164
LinearAlgebra.mul!(dest::AbstractMatrix, A::$Typ, b::AbstractMatrix) =
165165
ArrayLayouts.mul!(dest,A,b)
166-
LinearAlgebra.mul!(dest::AbstractMatrix, A::$Typ, b::$Typ) =
167-
ArrayLayouts.mul!(dest,A,b)
166+
LinearAlgebra.mul!(dest::AbstractMatrix, A::AbstractMatrix, B::$Typ) =
167+
ArrayLayouts.mul!(dest,A,B)
168+
LinearAlgebra.mul!(dest::AbstractMatrix, A::$Typ, B::$Typ) =
169+
ArrayLayouts.mul!(dest,A,B)
168170

169171
Base.:*(A::$Typ, B::$Typ) = ArrayLayouts.mul(A,B)
170172
Base.:*(A::$Typ, B::AbstractMatrix) = ArrayLayouts.mul(A,B)

test/test_layoutarray.jl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,12 @@ MemoryLayout(::Type{MyVector}) = DenseColumnMajor()
106106
muladd!(1.0, Ones(5,5), A, 2.0, B)
107107
end
108108

109+
@testset "mul!" begin
110+
@test mul!(B, A, A) A*A
111+
@test mul!(B, A', A) A'*A
112+
@test mul!(B, A, A') A*A'
113+
end
114+
109115
@testset "generic_blasmul!" begin
110116
A = BigFloat.(randn(5,5))
111117
Bin = BigFloat.(randn(5,5))

0 commit comments

Comments
 (0)