@@ -51,13 +51,18 @@ const DenseViewWrappers{T,S} = Union{AdjOrTrans{T,S}, HermOrSym{T,S}, UpperOrLow
5151const QuasiSparseMatrix = Union{SparseMatrixCSCUnion2, DenseViewWrappers{<: Any ,<: SparseMatrixCSCUnion2 }}
5252const QuasiStridedMatrix = Union{StridedMatrix, DenseViewWrappers{<: Any ,<: StridedMatrix }}
5353
54- matop_dest (:: typeof (* ), A:: QuasiStridedMatrix , b:: AbstractSparseVector ) = Vector {TS} (undef, size (A, 1 ))
55- matop_dest (:: typeof (* ), A, B:: QuasiSparseMatrix ) = similar (A, TS, (size (A, 1 ), size (B, 2 )))
54+ matop_dest (:: typeof (* ), A:: QuasiStridedMatrix , b:: AbstractSparseVector ) =
55+ Vector {promote_op(matprod, eltype(A), eltype(b))} (undef, size (A, 1 ))
56+ matop_dest (:: typeof (* ), A, B:: QuasiSparseMatrix ) =
57+ similar (A, promote_op (matprod, eltype (A), eltype (B)), (size (A, 1 ), size (B, 2 )))
5658# sparse products with banded matrices should return sparse arrays (Diagonal is handled by fallback)
57- matop_dest (:: typeof (* ), :: BiTriSym , B:: QuasiSparseMatrix ) = similar (B, TS, size (B))
58- matop_dest (:: typeof (* ), :: Diagonal , B:: QuasiSparseMatrix ) = similar (B, TS, size (B)) # disambiguation with LinearAlgebra
59+ matop_dest (:: typeof (* ), A:: BiTriSym , B:: QuasiSparseMatrix ) =
60+ similar (B, promote_op (matprod, eltype (A), eltype (B)), size (B))
61+ # needed for disambiguation with LinearAlgebra
62+ matop_dest (:: typeof (* ), A:: Diagonal , B:: QuasiSparseMatrix ) =
63+ similar (B, promote_op (matprod, eltype (A), eltype (B)), size (B))
5964matop_dest (:: typeof (* ), A:: QuasiSparseMatrix , B:: BiTriSym ) =
60- similar (A, TS , (size (A, 1 ), size (B, 2 )))
65+ similar (A, promote_op (matprod, eltype (A), eltype (B)) , (size (A, 1 ), size (B, 2 )))
6166
6267for op ∈ (:+ , :- ), Wrapper ∈ (:Hermitian , :Symmetric )
6368 @eval begin
0 commit comments