diff --git a/src/AbstractBlockBandedMatrix.jl b/src/AbstractBlockBandedMatrix.jl index ea5405e..4d247b0 100644 --- a/src/AbstractBlockBandedMatrix.jl +++ b/src/AbstractBlockBandedMatrix.jl @@ -29,6 +29,8 @@ const BandedBlockBandedRowMajor = BandedBlockBandedRows{ColumnMajor} const BlockBandedColumnMajor = BlockBandedColumns{ColumnMajor} const BlockBandedRowMajor = BlockBandedRows{ColumnMajor} +blockbandedcolumns(lay) = BlockBandedColumns{typeof(lay)}() + transposelayout(::BandedBlockBandedColumns{Lay}) where Lay = BandedBlockBandedRows{Lay}() transposelayout(::BandedBlockBandedRows{Lay}) where Lay = BandedBlockBandedColumns{Lay}() transposelayout(::BlockBandedColumns{Lay}) where Lay = BlockBandedRows{Lay}() diff --git a/src/BlockSkylineMatrix.jl b/src/BlockSkylineMatrix.jl index 3df710c..a31a9df 100644 --- a/src/BlockSkylineMatrix.jl +++ b/src/BlockSkylineMatrix.jl @@ -366,7 +366,12 @@ axes(A::BlockSkylineMatrix) = A.block_sizes.axes # BlockSkylineMatrix Interface # ################################ -MemoryLayout(::Type{<:BlockSkylineMatrix}) = BlockBandedColumnMajor() +struct BlockSkylineColumns{Lay} <: AbstractBlockLayout end + +blockskylinelayout(lay, ::Type{<:BlockBandedSizes}) = blockbandedcolumns(lay) +blockskylinelayout(lay, _) = BlockSkylineColumns{typeof(lay)}() + +MemoryLayout(::Type{<:BlockSkylineMatrix{T,DATA,BS}}) where {T,DATA,BS} = blockskylinelayout(MemoryLayout(DATA), BS) colblockbandwidths(A::BlockSkylineMatrix) = (A.block_sizes.l, A.block_sizes.u) blockbandwidths(A::BlockSkylineMatrix) = maximum.(colblockbandwidths(A)) BroadcastStyle(::Type{<:BlockSkylineMatrix}) = BlockSkylineStyle()