@@ -1309,18 +1309,24 @@ function LinearAlgebra.generic_trimatdiv!(C::StridedVecOrMat, uploc, isunitc, ::
13091309 C
13101310end
13111311
1312- function (\ )(A:: Union{UpperTriangular,LowerTriangular} , B:: AbstractSparseMatrixCSC )
1313- require_one_based_indexing (B)
1314- TAB = promote_op (\ , eltype (A), eltype (B))
1315- ldiv! (Matrix {TAB} (undef, size (B)), A, B)
1316- end
1317- function (\ )(A:: Union{UnitUpperTriangular,UnitLowerTriangular} , B:: AbstractSparseMatrixCSC )
1318- require_one_based_indexing (B)
1319- TAB = LinearAlgebra. _inner_type_promotion (\ , eltype (A), eltype (B))
1320- ldiv! (Matrix {TAB} (undef, size (B)), A, B)
1321- end
1322- # (*)(L::DenseTriangular, B::AbstractSparseMatrixCSC) = lmul!(L, Array(B))
1323-
1312+ matop_dest (:: typeof (\ ), A, b:: AbstractSparseVector ) =
1313+ Vector {promote_op(\, eltype(A), eltype(b))} (undef, length (b))
1314+ matop_dest (:: typeof (\ ), A:: UnitUpperOrUnitLowerTriangular , b:: AbstractSparseVector ) =
1315+ Vector {LinearAlgebra._inner_type_promotion(\, eltype(A), eltype(b))} (undef, length (b))
1316+ matop_dest (:: typeof (\ ), A:: Diagonal , b:: AbstractSparseVector ) =
1317+ similar (b , promote_op (\ , eltype (A), eltype (b)))
1318+ matop_dest (:: typeof (\ ), A, B:: QuasiSparseMatrix ) =
1319+ Matrix {promote_op(\, eltype(A), eltype(B))} (undef, size (B))
1320+ matop_dest (:: typeof (\ ), A:: Diagonal , B:: QuasiSparseMatrix ) =
1321+ similar (B , promote_op (\ , eltype (A), eltype (B)), size (B))
1322+ matop_dest (:: typeof (\ ), A:: UnitUpperOrUnitLowerTriangular , B:: QuasiSparseMatrix ) =
1323+ Matrix {LinearAlgebra._inner_type_promotion(\, eltype(A), eltype(B))} (undef, size (B))
1324+ matop_dest (:: typeof (/ ), A:: QuasiSparseMatrix , B) =
1325+ Matrix {promote_op(/, eltype(A), eltype(B))} (undef, size (A))
1326+ matop_dest (:: typeof (/ ), A:: QuasiSparseMatrix , B:: UnitUpperOrUnitLowerTriangular ) =
1327+ Matrix {LinearAlgebra._inner_type_promotion(/, eltype(A), eltype(B))} (undef, size (A))
1328+ matop_dest (:: typeof (/ ), A:: QuasiSparseMatrix , B:: Diagonal ) =
1329+ similar (A , promote_op (/ , eltype (A), eltype (B)), size (A))
13241330# # end of triangular
13251331
13261332# symmetric/Hermitian
@@ -1387,7 +1393,7 @@ function _dot(x::AbstractVector, A::AbstractSparseMatrixCSC, y::AbstractVector,
13871393 @inbounds for col in axes (A,2 )
13881394 ycol = y[col]
13891395 xcol = x[col]
1390- if _isnotzero (ycol) && _isnotzero (xcol)
1396+ if _isnotzero (ycol) || _isnotzero (xcol)
13911397 for k in rangefun (A, col)
13921398 i = rvals[k]
13931399 Aij = nzvals[k]
0 commit comments