Skip to content

Commit 52b76f0

Browse files
committed
Specialize Diagonal * Adjoint
1 parent ff5648a commit 52b76f0

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/diagonal.jl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,13 @@ function (*)(D::Diagonal, V::AbstractVector)
332332
return D.diag .* V
333333
end
334334

335+
function (*)(A::AdjOrTransAbsMat, D::Diagonal)
336+
copy((D' * A')')
337+
end
338+
function (*)(D::Diagonal, A::AdjOrTransAbsMat)
339+
copy((A' * D')')
340+
end
341+
335342
function rmul!(A::AbstractMatrix, D::Diagonal)
336343
matmul_size_check(size(A), size(D))
337344
for I in CartesianIndices(A)

0 commit comments

Comments
 (0)