Skip to content

Commit 47a1150

Browse files
committed
remove *(A::Matrix, B::HermOrSym) = A*full(B)
- this dispatches to BLAS instead - seems a tiny bit faster - allocates half of the memory - main reason is to be consistent with the opposite method e.g. *(A::HermOrSym, B::Matrix) which does no longer have this fallback method with a full call, but dispatches to BLAS.symv!/BLAS.hemv! directly only call full on second argument for *(A::HermOrSym, B::HermOrSym)
1 parent 9fdc6d1 commit 47a1150

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

base/linalg/symmetric.jl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -299,8 +299,7 @@ A_mul_B!(C::StridedMatrix{T}, A::Hermitian{T,<:StridedMatrix}, B::StridedMatrix{
299299
A_mul_B!(C::StridedMatrix{T}, A::StridedMatrix{T}, B::Hermitian{T,<:StridedMatrix}) where {T<:BlasComplex} =
300300
BLAS.hemm!('R', B.uplo, one(T), B.data, A, zero(T), C)
301301

302-
*(A::HermOrSym, B::HermOrSym) = full(A)*full(B)
303-
*(A::StridedMatrix, B::HermOrSym) = A*full(B)
302+
*(A::HermOrSym, B::HermOrSym) = A*full(B)
304303

305304
for T in (:Symmetric, :Hermitian), op in (:+, :-, :*, :/)
306305
# Deal with an ambiguous case

0 commit comments

Comments
 (0)