Skip to content

Commit

Permalink
remove superfluous lines
Browse files Browse the repository at this point in the history
  • Loading branch information
dkarrasch committed Nov 10, 2020
1 parent 912db24 commit 1c7953b
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions stdlib/SparseArrays/src/sparsevector.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1818,15 +1818,13 @@ for isunittri in (true, false), islowertri in (true, false)
# build out-of-place left-division operations
# broad method where elements are Numbers
@eval function \(A::$tritype{<:TA,<:AbstractMatrix}, b::SparseVector{Tb}) where {TA<:Number,Tb<:Number}
# A = $(applyxform ? :(xformA.data) : :(xformA) )
TAb = $(isunittri ?
:(typeof(zero(TA)*zero(Tb) + zero(TA)*zero(Tb))) :
:(typeof((zero(TA)*zero(Tb) + zero(TA)*zero(Tb))/one(TA))) )
LinearAlgebra.ldiv!(convert(AbstractArray{TAb}, A), convert(Array{TAb}, b))
end
# fallback where elements are not Numbers
@eval function \(A::$tritype, b::SparseVector)
# A = $(applyxform ? :(xformA.parent) : :(xformA) )
LinearAlgebra.ldiv!(A, copy(b))
end

Expand Down Expand Up @@ -1865,7 +1863,7 @@ for isunittri in (true, false), islowertri in (true, false)

# the generic in-place left-division methods handle these cases, but
# we can achieve greater efficiency where the triangular matrix provides
# good view support. hence the StridedMatrix restriction.
# good view support, hence the StridedMatrix restriction.
@eval function ldiv!(xA::$xformtritype, b::SparseVector)
A = $( applyxform ? :(parent(parent(xA))) : :(parent(xA)) )
# If b has no nonzero entries, the result is necessarily zero and this call
Expand Down

0 comments on commit 1c7953b

Please sign in to comment.