@@ -47,7 +47,7 @@ function similar(M::MulAdd{<:AbstractBlockBandedLayout,<:AbstractBlockBandedLayo
47
47
BlockSkylineMatrix {T} (undef, (axes (A,1 ),axes (B,2 )), (l,u))
48
48
end
49
49
50
- function similar (M:: MulAdd{BandedBlockBandedColumnMajor,BandedBlockBandedColumnMajor } , :: Type{T} ) where T
50
+ function similar (M:: MulAdd{<:AbstractBandedBlockBandedLayout,<:AbstractBandedBlockBandedLayout } , :: Type{T} ) where T
51
51
A,B = M. A, M. B
52
52
53
53
if ! blockisequal (axes (A,2 ), axes (B,1 ))
@@ -62,8 +62,12 @@ function similar(M::MulAdd{BandedBlockBandedColumnMajor,BandedBlockBandedColumnM
62
62
end
63
63
end
64
64
n,m = size (A,1 ), size (B,2 )
65
+ Al,Au = blockbandwidths (A)
66
+ Bl,Bu = blockbandwidths (B)
67
+ Aλ,Aμ = subblockbandwidths (A)
68
+ Bλ,Bμ = subblockbandwidths (B)
65
69
66
- BandedBlockBandedMatrix {T} (undef, (axes (A,1 ),axes (B,2 )), (A . l + B . l, A . u + B . u ), (A . λ + B . λ, A . μ + B . μ ))
70
+ BandedBlockBandedMatrix {T} (undef, (axes (A,1 ),axes (B,2 )), (Al + Bl, Au + Bu ), (Aλ + Bλ, Aμ + Bμ ))
67
71
end
68
72
69
73
similar (M:: MulAdd{<:DiagonalLayout,<:AbstractBlockBandedLayout} , :: Type{T} ) where T = similar (M. B,T)
0 commit comments