@@ -118,18 +118,8 @@ function add_bandwidths(A::BlockBandedMatrix,B::BlockBandedMatrix)
118
118
Fill (l,nblocks (B,2 )), Fill (u,nblocks (B,2 ))
119
119
end
120
120
121
- struct BlockBandedMulAddStyle <: AbstractMulAddStyle end
122
- struct BandedBlockBandedMulAddStyle <: AbstractMulAddStyle end
123
-
124
- mulapplystyle (A:: AbstractBlockBandedLayout , B:: AbstractBlockBandedLayout ) = BlockBandedMulAddStyle ()
125
- mulapplystyle (A:: AbstractBlockBandedLayout , B:: DiagonalLayout ) = mulapplystyle (A,A)
126
- mulapplystyle (A:: DiagonalLayout , B:: AbstractBlockBandedLayout ) = mulapplystyle (B,B)
127
- mulapplystyle (A:: BandedBlockBandedColumnMajor , B:: BandedBlockBandedColumnMajor ) = BandedBlockBandedMulAddStyle ()
128
-
129
- function similar (M:: Mul{BlockBandedMulAddStyle} , :: Type{T} ) where T
130
- A,B = M. args
131
- A isa Diagonal && return similar (B,T)
132
- B isa Diagonal && return similar (A,T)
121
+ function similar (M:: MulAdd{<:AbstractBlockBandedLayout,<:AbstractBlockBandedLayout} , :: Type{T} ) where T
122
+ A,B = M. A, M. B
133
123
134
124
Arows, Acols = A. block_sizes. block_sizes. cumul_sizes
135
125
Brows, Bcols = B. block_sizes. block_sizes. cumul_sizes
@@ -149,10 +139,8 @@ function similar(M::Mul{BlockBandedMulAddStyle}, ::Type{T}) where T
149
139
BlockSkylineMatrix {T} (undef, BlockSkylineSizes (BlockSizes ((Arows,Bcols)), l, u))
150
140
end
151
141
152
- function similar (M:: Mul{BandedBlockBandedMulAddStyle} , :: Type{T} ) where T
153
- A,B = M. args
154
- A isa Diagonal && return similar (B,T)
155
- B isa Diagonal && return similar (A,T)
142
+ function similar (M:: MulAdd{BandedBlockBandedColumnMajor,BandedBlockBandedColumnMajor} , :: Type{T} ) where T
143
+ A,B = M. A, M. B
156
144
157
145
Arows, Acols = A. block_sizes. block_sizes. cumul_sizes
158
146
Brows, Bcols = B. block_sizes. block_sizes. cumul_sizes
@@ -174,6 +162,10 @@ function similar(M::Mul{BandedBlockBandedMulAddStyle}, ::Type{T}) where T
174
162
BandedBlockBandedMatrix {T} (undef, bs)
175
163
end
176
164
165
+ similar (M:: MulAdd{<:DiagonalLayout,<:AbstractBlockBandedLayout} , :: Type{T} ) where T = similar (M. B,T)
166
+ similar (M:: MulAdd{<:AbstractBlockBandedLayout,<:DiagonalLayout} , :: Type{T} ) where T = similar (M. A,T)
167
+
168
+
177
169
178
170
179
171
0 commit comments