Skip to content

Commit d0e7a16

Browse files
authored
remove rmul diagonal specialization (#319)
1 parent 8238bf7 commit d0e7a16

File tree

1 file changed

+0
-23
lines changed

1 file changed

+0
-23
lines changed

src/generic/broadcast.jl

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -827,29 +827,6 @@ function copy(bc::Broadcasted{BandedStyle, <:Any, <:Any, <:NTuple{2,AbstractMatr
827827
_banded_broadcast(bc.f, bc.args, MemoryLayout.(typeof.(bc.args)))
828828
end
829829

830-
###
831-
# Special cases
832-
###
833-
834-
#=
835-
B::BandedMatrix * D::Diagonal for DenseColumnMajor storage may be evaluated as
836-
B.data .* D.diag', instead of B .* D.diag'
837-
=#
838-
function copy(M::Rmul{BandedColumns{DenseColumnMajor}, DiagonalLayout{DenseColumnMajor}})
839-
B, D = M.A, M.B
840-
d = diagonaldata(D)
841-
Bd = bandeddata(B)
842-
Bdata = if size(Bd, 1) == 1
843-
# performance optimization
844-
# may not be necessary in the future if the other branch
845-
# is equally fast
846-
reshape(vec(Bd) .* d, 1, :)
847-
else
848-
Bd .* d'
849-
end
850-
_BandedMatrix(Bdata, size(B,1), bandwidths(B)...)
851-
end
852-
853830
###
854831
# broadcast bandwidths
855832
###

0 commit comments

Comments
 (0)