@@ -973,7 +973,7 @@ broadcast(f::Tf, A::SparseMatrixCSC, ::Type{T}) where {Tf,T} = broadcast(x -> f(
973
973
# and rebroadcast. otherwise, divert to generic AbstractArray broadcast code.
974
974
975
975
struct PromoteToSparse <: Broadcast.AbstractArrayStyle{2} end
976
- StructuredMatrix = Union{Diagonal,Bidiagonal,Tridiagonal,SymTridiagonal}
976
+ const StructuredMatrix = Union{Diagonal,Bidiagonal,Tridiagonal,SymTridiagonal}
977
977
Broadcast. BroadcastStyle (:: Type{<:StructuredMatrix} ) = PromoteToSparse ()
978
978
979
979
PromoteToSparse (:: Val{0} ) = PromoteToSparse ()
@@ -988,8 +988,10 @@ Broadcast.BroadcastStyle(::PromoteToSparse, ::Broadcast.Style{Tuple}) = Broadcas
988
988
# Broadcast.BroadcastStyle(::SPVM, ::Broadcast.DefaultArrayStyle{0}) = PromoteToSparse()
989
989
# Broadcast.BroadcastStyle(::SPVM, ::Broadcast.DefaultArrayStyle{1}) = PromoteToSparse()
990
990
# Broadcast.BroadcastStyle(::SPVM, ::Broadcast.DefaultArrayStyle{2}) = PromoteToSparse()
991
- BroadcastStyle (:: Type{<:Adjoint{T,<:Vector}} ) where T = Broadcast. MatrixStyle () # Adjoint not yet defined when broadcast.jl loaded
992
- BroadcastStyle (:: Type{<:Transpose{T,<:Vector}} ) where T = Broadcast. MatrixStyle () # Transpose not yet defined when broadcast.jl loaded
991
+ Broadcast. BroadcastStyle (:: Type{<:Adjoint{T,<:Vector} where T} ) = Broadcast. MatrixStyle () # Adjoint not yet defined when broadcast.jl loaded
992
+ Broadcast. BroadcastStyle (:: Type{<:Transpose{T,<:Vector} where T} ) = Broadcast. MatrixStyle () # Transpose not yet defined when broadcast.jl loaded
993
+ Broadcast. BroadcastStyle (:: Type{<:Adjoint{T,<:Union{SparseVector,SparseMatrixCSC}} where T} ) = PromoteToSparse ()
994
+ Broadcast. BroadcastStyle (:: Type{<:Transpose{T,<:Union{SparseVector,SparseMatrixCSC}} where T} ) = PromoteToSparse ()
993
995
Broadcast. BroadcastStyle (:: SPVM , :: Broadcast.VectorStyle ) = PromoteToSparse ()
994
996
Broadcast. BroadcastStyle (:: SPVM , :: Broadcast.MatrixStyle ) = PromoteToSparse ()
995
997
Broadcast. BroadcastStyle (:: SparseVecStyle , :: Broadcast.DefaultArrayStyle{N} ) where N =
0 commit comments