Skip to content

Commit

Permalink
Move over more code
Browse files Browse the repository at this point in the history
  • Loading branch information
dlfivefifty committed Apr 15, 2024
1 parent 600096a commit 7b2d350
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ BlockBandedMatricesSparseArraysExt = "SparseArrays"
[compat]
Aqua = "0.8"
ArrayLayouts = "1"
BandedMatrices = "0.17.2, 1"
BlockArrays = "0.16.34"
BandedMatrices = "1"
BlockArrays = "1"
Documenter = "1"
FillArrays = "1"
LinearAlgebra = "1.6"
Expand Down
11 changes: 7 additions & 4 deletions src/interfaceimpl.jl
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@ end
blockbandwidths(::Diagonal) = (0,0)


BroadcastStyle(::Type{<:SubArray{<:Any,2,<:PseudoBlockMatrix{<:Any,<:Diagonal},
<:Tuple{<:BlockSlice1,<:BlockSlice1}}}) = BandedStyle()




Expand All @@ -40,7 +37,6 @@ subblockbandwidths(::Zeros) = (-1,-1)
# DiagonalBlockMatrix
###

sublayout(::DiagonalLayout{L}, inds::Type{<:NTuple{2,BS}}) where {L,BS<:BlockSlice{<:BlockRange1}} = bandedblockbandedcolumns(sublayout(L(),Tuple{BS}))
subblockbandwidths(::Diagonal) = (0,0)
bandedblockbandeddata(D::Diagonal) = permutedims(D.diag)

Expand Down Expand Up @@ -74,3 +70,10 @@ blockbandwidths(K::BlockKron) = bandwidths(first(K.args))
subblockbandwidths(K::BlockKron) = bandwidths(last(K.args))

_blockkron(::Tuple{Vararg{AbstractBandedLayout}}, A) = BandedBlockBandedMatrix(BlockKron(A...))



## WARNING: type piracy
BroadcastStyle(::Type{<:SubArray{<:Any,2,<:PseudoBlockMatrix{<:Any,<:Diagonal}, <:Tuple{<:BlockSlice1,<:BlockSlice1}}}) = BandedStyle()

sublayout(::DiagonalLayout{L}, inds::Type{<:NTuple{2,BS}}) where {L,BS<:BlockSlice{<:BlockRange1}} = bandedblockbandedcolumns(sublayout(L(),Tuple{BS}))

0 comments on commit 7b2d350

Please sign in to comment.