Skip to content

Commit 95fb340

Browse files
dlfivefiftyjishnubdependabot[bot]
authored
Release 0.13 (#206)
* Don't export names not owned by the package (#203) * Move BandedMatrices+BlockArrays to BlockArray extension (#195) * Move some banded matrix stuff to BlockArrays extension * Update interfaceimpl.jl * Move over more code * tests pass * Update Project.toml * v0.13 * Update BlockBandedMatrices.jl * Update BlockBandedMatrices.jl * updates * Bump julia-actions/cache from 1 to 2 (#204) Bumps [julia-actions/cache](https://github.com/julia-actions/cache) from 1 to 2. - [Release notes](https://github.com/julia-actions/cache/releases) - [Commits](julia-actions/cache@v1...v2) --- updated-dependencies: - dependency-name: julia-actions/cache dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * PseudoBlockMatrix -> BlockedMatrix * Update BlockSkylineMatrix.jl * Update BandedBlockBandedMatrix.jl * Move out banded code --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: Jishnu Bhattacharya <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
1 parent 80aa721 commit 95fb340

20 files changed

+105
-255
lines changed

Project.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "BlockBandedMatrices"
22
uuid = "ffab5731-97b5-5995-9138-79e8c1846df0"
3-
version = "0.12.11"
3+
version = "0.13"
44

55
[deps]
66
ArrayLayouts = "4c555306-a7a7-4459-81d9-ec55ddd5c99a"
@@ -20,12 +20,12 @@ BlockBandedMatricesSparseArraysExt = "SparseArrays"
2020
[compat]
2121
Aqua = "0.8"
2222
ArrayLayouts = "1"
23-
BandedMatrices = "0.17.2, 1"
24-
BlockArrays = "0.16.34"
23+
BandedMatrices = "1"
24+
BlockArrays = "1"
2525
Documenter = "1"
2626
FillArrays = "1"
2727
LinearAlgebra = "1.6"
28-
MatrixFactorizations = "1, 2"
28+
MatrixFactorizations = "1, 2, 3"
2929
Random = "1.6"
3030
SparseArrays = "1.6"
3131
Test = "1.6"

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ storing the entries in the non-zero bands.
2222
A `BlockBandedMatrix` is a subtype of `BlockMatrix` of [BlockArrays.jl](https://github.com/JuliaArrays/BlockArrays.jl)
2323
whose layout of non-zero blocks is banded. We can construct a `BlockBandedMatrix` as follows:
2424
```julia
25+
using FillArrays, LinearAlgebra
2526
l,u = 2,1 # block bandwidths
2627
N = M = 4 # number of row/column blocks
2728
cols = rows = 1:N # block sizes
@@ -35,10 +36,12 @@ A `BandedBlockBandedMatrix` has the added structure that the blocks themselves a
3536
banded, and conform to the banded matrix interface of [BandedMatrices.jl](https://github.com/JuliaLinearAlgebra/BandedMatrices.jl).
3637
We can construct a `BandedBlockBandedMatrix` as follows:
3738
```julia
39+
using FillArrays, LinearAlgebra
3840
l,u = 2,1 # block bandwidths
3941
λ,μ = 1,2 # sub-block bandwidths: the bandwidths of each block
4042
N = M = 4 # number of row/column blocks
4143
cols = rows = 1:N # block sizes
44+
4245
BandedBlockBandedMatrix(Zeros(sum(rows),sum(cols)), rows,cols, (l,u), (λ,μ)) # creates a banded-block-banded matrix of zeros
4346
BandedBlockBandedMatrix(Ones(sum(rows),sum(cols)), rows,cols, (l,u), (λ,μ)) # creates a banded-block-banded matrix with ones in the non-zero entries
4447
BandedBlockBandedMatrix(I, rows,cols, (l,u), (λ,μ)) # creates a banded-block-banded identity matrix

docs/Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ FillArrays = "1a297f60-69ca-5386-bcde-b61e274b549b"
66
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
77

88
[compat]
9-
BlockArrays = "0.16"
9+
BlockArrays = "1"
1010
Documenter = "1"
1111
FillArrays = "1"

docs/src/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ the strided matrix interface, but we can also use BLAS and LAPACK to, for exampl
5050
upper-triangularize a block column all at once.
5151

5252

53-
A `BandedBlockBandedMatrix` stores the entries as a `PseudoBlockMatrix`,
53+
A `BandedBlockBandedMatrix` stores the entries as a `BlockedMatrix`,
5454
with the number of row blocks equal to `A.l + A.u + 1`, and the row
5555
block sizes are all `A.μ + A.λ + 1`. The column block sizes of the storage is
5656
the same as the the column block sizes of the `BandedBlockBandedMatrix`. This
@@ -69,7 +69,7 @@ of row and column blocks, then `A` has zero structure
6969
│ a_53
7070
│ a_63 a_64 ]
7171
```
72-
and is stored in memory via `A.data` as a `PseudoBlockMatrix`, which has block sizes
72+
and is stored in memory via `A.data` as a `BlockedMatrix`, which has block sizes
7373
2 x 2, containing entries:
7474
```julia
7575
[a_11 a_22 │ a_33 a_44

examples/blockarray_backend.jl

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ using CuArrays
44
using CuArrays.CUBLAS: libcublas_handle, cublasSetStream_v2, CuDefaultStream
55
using CUDAnative.CUDAdrv: CuStream
66
using GPUArrays
7-
using BlockArrays: _BlockArray, PseudoBlockArray, BlockArray, BlockMatrix, BlockVector,
7+
using BlockArrays: _BlockArray, BlockedArray, BlockArray, BlockMatrix, BlockVector,
88
nblocks, Block, cumulsizes, AbstractBlockVector
99
using BlockBandedMatrices: BandedBlockBandedMatrix, _BandedBlockBandedMatrix,
1010
blockbandwidths, subblockbandwidths, blockbandwidth,
@@ -22,13 +22,13 @@ import LinearAlgebra
2222
# BlockArrays
2323
adapt(T::Type{<:AbstractArray}, b::BlockArray) =
2424
_BlockArray(T.(b.blocks), b.block_sizes)
25-
adapt(T::Type{<:AbstractArray}, b::PseudoBlockArray) =
26-
PseudoBlockArray(T(b.blocks), b.block_sizes)
27-
adapt(T::Type{<:PseudoBlockArray}, b::BlockArray) = T(b.blocks, b.block_sizes)
28-
adapt(T::Type{<:BlockArray}, b::PseudoBlockArray) = T(b.blocks, b.block_sizes)
25+
adapt(T::Type{<:AbstractArray}, b::BlockedArray) =
26+
BlockedArray(T(b.blocks), b.block_sizes)
27+
adapt(T::Type{<:BlockedArray}, b::BlockArray) = T(b.blocks, b.block_sizes)
28+
adapt(T::Type{<:BlockArray}, b::BlockedArray) = T(b.blocks, b.block_sizes)
2929
# CuArrays and BlockArrays
3030
if @isdefined CuArray
31-
adapt(T::Type{<:CuArray}, b::PseudoBlockArray) = adapt(T, BlockArray(b))
31+
adapt(T::Type{<:CuArray}, b::BlockedArray) = adapt(T, BlockArray(b))
3232
end
3333
###############
3434

@@ -138,22 +138,22 @@ function testme()
138138
end
139139
end
140140

141-
@testset "PseudoBlockArray Adapters" begin
142-
bmat = PseudoBlockArray{Float64}(undef, [1, 1], [2, 2])
141+
@testset "BlockedArray Adapters" begin
142+
bmat = BlockedArray{Float64}(undef, [1, 1], [2, 2])
143143
@test eltype(adapt(JLArray, bmat)) === Float64
144-
@test adapt(JLArray, bmat) isa PseudoBlockArray
144+
@test adapt(JLArray, bmat) isa BlockedArray
145145
if @isdefined CuArray
146-
@test !(adapt(CuArray, bmat) isa PseudoBlockArray)
146+
@test !(adapt(CuArray, bmat) isa BlockedArray)
147147
@test adapt(CuArray, bmat) isa BlockArray{T, 2, CuArray{T, 2}} where T
148148
@test cu(bmat) isa BlockArray{T, 2, CuArray{T, 2}} where T
149149
@test eltype(cu(bmat)) === Float32
150150
end
151151
end
152152

153-
@testset "PseudoBlockArray Adapters" begin
153+
@testset "BlockedArray Adapters" begin
154154
bmat = BandedBlockBandedMatrix{Float64}(undef, ([1, 1], [2, 2]), (1, 2), (1, 1))
155155
@test adapt(JLArray, bmat) isa BandedBlockBandedMatrix
156-
@test adapt(JLArray, bmat).data isa PseudoBlockArray{T, 2, JLArray{T, 2}} where T
156+
@test adapt(JLArray, bmat).data isa BlockedArray{T, 2, JLArray{T, 2}} where T
157157
@test eltype(adapt(JLArray, bmat)) === Float64
158158
if @isdefined CuArray
159159
@test adapt(CuArray, bmat).data isa BlockArray{T, 2, CuArray{T, 2}} where T
@@ -172,7 +172,7 @@ function testme()
172172
Ablock = adapt(BlockArray, A)
173173
cblock = BlockArray(Array{Float64, 1}(undef, size(A, 1)), n)
174174
cblock .= rand.()
175-
x = PseudoBlockArray(Array{Float64, 1}(undef, size(A, 2)), m)
175+
x = BlockedArray(Array{Float64, 1}(undef, size(A, 2)), m)
176176
x .= rand.()
177177
xblock = adapt(BlockArray, x)
178178

@@ -192,7 +192,7 @@ using Statistics
192192
function benchmarks()
193193
suite = BenchmarkGroup()
194194
# suite["viabm"] = BenchmarkGroup()
195-
suite["pseudo"] = BenchmarkGroup()
195+
suite["blocked"] = BenchmarkGroup()
196196
suite["block"] = BenchmarkGroup()
197197
if @isdefined CuArrays
198198
suite["gpu"] = BenchmarkGroup()
@@ -205,12 +205,12 @@ function benchmarks()
205205
A = BandedBlockBandedMatrix{Float64}(
206206
undef, (repeat([n], N), repeat([m], M)), (l, u), (λ, μ))
207207
A.data .= rand.()
208-
c = PseudoBlockArray(Array{Float64, 1}(undef, size(A, 1)), repeat([n], N))
208+
c = BlockedArray(Array{Float64, 1}(undef, size(A, 1)), repeat([n], N))
209209
c .= rand.()
210-
x = PseudoBlockArray(Array{Float64, 1}(undef, size(A, 2)), repeat([m], M))
210+
x = BlockedArray(Array{Float64, 1}(undef, size(A, 2)), repeat([m], M))
211211
x .= rand.()
212212

213-
suite["pseudo"]["N=$N n=$n"] = @benchmarkable begin
213+
suite["blocked"]["N=$N n=$n"] = @benchmarkable begin
214214
$c .= Mul($A, $x)
215215
end
216216
suite["block"]["N=$N n=$n"] = @benchmarkable begin
@@ -234,6 +234,6 @@ function benchmarks()
234234
end
235235

236236
block_ratio(result, name; method=median) =
237-
ratio(method(result["block"][name]), method(result["pseudo"][name]))
237+
ratio(method(result["block"][name]), method(result["blocked"][name]))
238238
viabm_ratio(result, name; method=median) =
239239
ratio(method(result["viabm"][name]), method(result["block"][name]))

examples/shared_array_backend.jl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using BlockArrays: _BlockArray, PseudoBlockArray, BlockArray, BlockMatrix, BlockVector,
1+
using BlockArrays: _BlockArray, BlockedArray, BlockArray, BlockMatrix, BlockVector,
22
nblocks, Block, cumulsizes, AbstractBlockVector
33
using BlockBandedMatrices: BandedBlockBandedMatrix, _BandedBlockBandedMatrix,
44
blockbandwidths, subblockbandwidths, blockbandwidth,
@@ -15,12 +15,12 @@ import Adapt: adapt
1515

1616
adapt(T::Type, b::BandedBlockBandedMatrix) =
1717
_BandedBlockBandedMatrix(adapt(T, b.data), b.block_sizes)
18-
adapt(T::Type{<:AbstractArray}, b::PseudoBlockArray) =
19-
PseudoBlockArray(T(b.blocks), b.block_sizes)
18+
adapt(T::Type{<:AbstractArray}, b::BlockedArray) =
19+
BlockedArray(T(b.blocks), b.block_sizes)
2020

2121

2222
const SharedBandedBlockBandedMatrix =
23-
BandedBlockBandedMatrix{T, PseudoBlockArray{T, 2, SharedArray{T, 2}}} where T
23+
BandedBlockBandedMatrix{T, BlockedArray{T, 2, SharedArray{T, 2}}} where T
2424

2525
function SharedBandedBlockBandedMatrix{T}(::UndefInitializer,
2626
bs::BandedBlockBandedSizes;
@@ -155,15 +155,15 @@ function testme()
155155
n, m = rand(max(l, u, λ, μ):20, N), rand(max(l, u, λ, μ):20, M)
156156
A = BandedBlockBandedMatrix{Float64}(undef, (n, m), (l, u), (λ, μ))
157157
A.data .= rand.()
158-
x = PseudoBlockArray(Array{Float64, 1}(undef, size(A, 2)), m)
158+
x = BlockedArray(Array{Float64, 1}(undef, size(A, 2)), m)
159159
x .= rand.()
160160

161161
Ashared = adapt(SharedArray, A)
162162
@test Ashared.data.blocks isa SharedArray
163163
@test Ashared isa SharedBandedBlockBandedMatrix
164164
@test length(procs(Ashared)) == max(1, length(procs()) - 1)
165165
cshared = adapt(SharedArray,
166-
PseudoBlockArray(Array{Float64, 1}(undef, size(A, 1)), n))
166+
BlockedArray(Array{Float64, 1}(undef, size(A, 1)), n))
167167
@test cshared.blocks isa SharedArray
168168
cshared .= rand.()
169169
xshared = adapt(SharedArray, x)

examples/sharedarrays.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ pids = addprocs(4)
77
function shared_BandedBlockBandedMatrix(::UndefInitializer, bs::BlockSizes, (l, u), (λ, μ); pids=Int[])
88
bs = BandedBlockBandedSizes(bs, l, u, λ, μ)
99
data = SharedMatrix{Float64}((l+u+1)*+μ+1), size(A,2); pids=pids)
10-
_BandedBlockBandedMatrix(PseudoBlockArray(data, bs.data_block_sizes), bs)
10+
_BandedBlockBandedMatrix(BlockedArray(data, bs.data_block_sizes), bs)
1111
end
1212

1313
shared_BandedBlockBandedMatrix(::UndefInitializer, (N,M), (l, u), (λ, μ); pids=Int[]) =

src/BandedBlockBandedMatrix.jl

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,14 @@ struct BandedBlockBandedMatrix{T, BLOCKS, RAXIS<:AbstractUnitRange{Int}} <: Abst
3939
end
4040
end
4141

42-
const DefaultBandedBlockBandedMatrix{T} = BandedBlockBandedMatrix{T, PseudoBlockMatrix{T, Matrix{T}, NTuple{2,DefaultBlockAxis}}, DefaultBlockAxis}
42+
const DefaultBandedBlockBandedMatrix{T} = BandedBlockBandedMatrix{T, BlockedMatrix{T, Matrix{T}, NTuple{2,DefaultBlockAxis}}, DefaultBlockAxis}
4343

4444
@inline _BandedBlockBandedMatrix(data::AbstractMatrix, axes::NTuple{2,AbstractUnitRange{Int}}, lu::NTuple{2,Int}, λμ::NTuple{2,Int}) =
45-
_BandedBlockBandedMatrix(PseudoBlockArray(data,(blockedrange(Fill(sum(λμ)+1,sum(lu)+1)),axes[2])), axes[1], lu, λμ)
45+
_BandedBlockBandedMatrix(BlockedArray(data,(blockedrange(Fill(sum(λμ)+1,sum(lu)+1)),axes[2])), axes[1], lu, λμ)
4646

4747
@inline _BandedBlockBandedMatrix(data::AbstractMatrix,rblocksizes::AbstractVector{Int}, cblocksizes::AbstractVector{Int}, lu::NTuple{2,Int}, λμ::NTuple{2,Int}) =
4848
_BandedBlockBandedMatrix(data, (blockedrange(rblocksizes),blockedrange(cblocksizes)), lu, λμ)
4949

50-
_blocklengths2blocklasts(b::Fill) = cumsum(b)
5150
_bbb_data_axes(caxes, lu, λμ) = (blockedrange(Fill(max(0,sum(λμ)+1),max(0,sum(lu)+1))),caxes)
5251

5352
BandedBlockBandedMatrix{T,B,R}(::UndefInitializer, axes::NTuple{2,AbstractUnitRange{Int}}, lu::NTuple{2,Int}, λμ::NTuple{2,Int}) where {T,B,R<:AbstractUnitRange{Int}} =
@@ -61,7 +60,7 @@ BandedBlockBandedMatrix{T,B}(::UndefInitializer, rblocksizes::AbstractVector{Int
6160
BandedBlockBandedMatrix{T,B}(undef, (blockedrange(rblocksizes),blockedrange(cblocksizes)), lu, λμ)
6261

6362
BandedBlockBandedMatrix{T}(::UndefInitializer, axes::NTuple{2,AbstractUnitRange{Int}}, lu::NTuple{2,Int}, λμ::NTuple{2,Int}) where T =
64-
_BandedBlockBandedMatrix(PseudoBlockMatrix{T}(undef, _bbb_data_axes(axes[2],lu,λμ)), axes[1], lu, λμ)
63+
_BandedBlockBandedMatrix(BlockedMatrix{T}(undef, _bbb_data_axes(axes[2],lu,λμ)), axes[1], lu, λμ)
6564
"""
6665
BandedBlockBandedMatrix{T}(undef, rows, cols, (l, u), (λ, μ))
6766
@@ -242,11 +241,11 @@ convert(::Type{AbstractMatrix{T}}, B::BandedBlockBandedMatrix{T}) where T = B
242241
similar(A::BandedBlockBandedMatrix, ::Type{T}, axes::NTuple{2,AbstractUnitRange{Int}}) where T =
243242
BandedBlockBandedMatrix{T}(undef, axes, blockbandwidths(A), subblockbandwidths(A))
244243

245-
@inline similar(A::BandedBlockBandedMatrix, ::Type{T}, axes::Tuple{BlockedUnitRange,AbstractUnitRange{Int}}) where T =
244+
@inline similar(A::BandedBlockBandedMatrix, ::Type{T}, axes::Tuple{AbstractBlockedUnitRange,AbstractUnitRange{Int}}) where T =
246245
BandedBlockBandedMatrix{T}(undef, axes, blockbandwidths(A), subblockbandwidths(A))
247-
@inline similar(A::BandedBlockBandedMatrix, ::Type{T}, axes::Tuple{AbstractUnitRange{Int},BlockedUnitRange}) where T =
246+
@inline similar(A::BandedBlockBandedMatrix, ::Type{T}, axes::Tuple{AbstractUnitRange{Int},AbstractBlockedUnitRange}) where T =
248247
BandedBlockBandedMatrix{T}(undef, axes, blockbandwidths(A), subblockbandwidths(A))
249-
@inline similar(A::BandedBlockBandedMatrix, ::Type{T}, axes::Tuple{BlockedUnitRange,BlockedUnitRange}) where T =
248+
@inline similar(A::BandedBlockBandedMatrix, ::Type{T}, axes::Tuple{AbstractBlockedUnitRange,AbstractBlockedUnitRange}) where T =
250249
BandedBlockBandedMatrix{T}(undef, axes, blockbandwidths(A), subblockbandwidths(A))
251250

252251

@@ -289,7 +288,7 @@ subblockbandwidths(A::BandedBlockBandedMatrix) = (A.λ, A.μ)
289288
# default is to use whole block
290289
_subblockbandwidths(A::AbstractMatrix, ::NTuple{2,OneTo{Int}}) = bandwidths(A)
291290
function _subblockbandwidths(A::AbstractMatrix, _)
292-
M,N = map(maximum, blocksizes(A))
291+
M,N = map(maximum, blocklengths.(axes(A)))
293292
M-1,N-1
294293
end
295294

@@ -401,7 +400,7 @@ const SubBandedBlockBandedMatrix{T,R1,R2} =
401400
SubArray{T,2,<:BandedBlockBandedMatrix{T},<:Tuple{BlockSlice{R1},BlockSlice{R2}}}
402401

403402
const SingleBlockInd = Union{BlockSlice1, BlockSlice{<:BlockIndexRange1}}
404-
const BlockRangeInd = Union{BlockSlices, BlockedUnitRange}
403+
const BlockRangeInd = Union{BlockSlices, AbstractBlockedUnitRange}
405404

406405
sublayout(::BandedBlockBandedColumns{ML}, ::Type{II}) where {ML,II<:Tuple{SingleBlockInd,SingleBlockInd}} = bandedcolumns(sublayout(ML(), II))
407406
sublayout(::BandedBlockBandedColumns{ML}, ::Type{II}) where {ML,II<:Tuple{BlockRangeInd,BlockRangeInd}} = bandedblockbandedcolumns(sublayout(ML(), II))
@@ -410,7 +409,7 @@ sublayout(::BandedBlockBandedColumns{ML}, ::Type{II}) where {ML,II<:Tuple{BlockR
410409

411410
_blockaxes1(A::BlockSlice) = A.block
412411
_blockaxes1(A::Slice) = _blockaxes1(A.indices)
413-
_blockaxes1(A::BlockedUnitRange) = blockaxes(A,1)
412+
_blockaxes1(A::AbstractBlockedUnitRange) = blockaxes(A,1)
414413
blockbandshift(A, B) = BandedMatrices.bandshift(Int.(_blockaxes1(A)), Int.(_blockaxes1(B)))
415414
blockbandshift(S) = blockbandshift(parentindices(S)...)
416415

@@ -427,13 +426,11 @@ sublayout(::AbstractBandedBlockBandedLayout, ::Type{<:Tuple{BlockRangeInd,Single
427426

428427

429428
sub_materialize(::AbstractBandedBlockBandedLayout, V, _) = BandedBlockBandedMatrix(V)
430-
sub_materialize(::AbstractBandedBlockBandedLayout, V, ::Tuple{<:BlockedUnitRange,<:BlockedUnitRange}) = BandedBlockBandedMatrix(V)
431-
sub_materialize(::AbstractBandedBlockBandedLayout, V, ::Tuple{<:AbstractUnitRange,<:BlockedUnitRange}) = PseudoBlockArray(V)
432-
sub_materialize(::AbstractBandedBlockBandedLayout, V, ::Tuple{<:BlockedUnitRange,<:AbstractUnitRange}) = PseudoBlockArray(V)
429+
sub_materialize(::AbstractBandedBlockBandedLayout, V, ::Tuple{AbstractBlockedUnitRange,AbstractBlockedUnitRange}) = BandedBlockBandedMatrix(V)
430+
sub_materialize(::AbstractBandedBlockBandedLayout, V, ::Tuple{AbstractUnitRange,AbstractBlockedUnitRange}) = BlockedArray(V)
431+
sub_materialize(::AbstractBandedBlockBandedLayout, V, ::Tuple{AbstractBlockedUnitRange,AbstractUnitRange}) = BlockedArray(V)
433432

434433

435-
sub_materialize(::AbstractBandedLayout, V, ::Tuple{<:BlockedUnitRange,<:BlockedUnitRange}) = BandedMatrix(V)
436-
437434

438435
isbanded(A::SubArray{<:Any,2,<:BandedBlockBandedMatrix}) = MemoryLayout(A) isa AbstractBandedLayout
439436
isbandedblockbanded(A::SubArray{<:Any,2,<:BandedBlockBandedMatrix}) = MemoryLayout(A) isa AbstractBandedBlockBandedLayout
@@ -442,7 +439,7 @@ isbandedblockbanded(A::SubArray{<:Any,2,<:BandedBlockBandedMatrix}) = MemoryLayo
442439
subblockbandwidths(V::SubArray) = subblockbandwidths(parent(V))
443440

444441

445-
_firstblock(B::BlockedUnitRange) = Int(first(blockaxes(B,1)))
442+
_firstblock(B::AbstractBlockedUnitRange) = Int(first(blockaxes(B,1)))
446443
_firstblock(B::Block{1}) = Int(B)
447444
_firstblock(B::BlockIndexRange) = _firstblock(B.block)
448445
_firstblock(B::BlockRange) = first(B.indices[1])

src/BlockBandedMatrices.jl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,12 @@ import Base: *, +, -, /, \, ==, @propagate_inbounds, OneTo, Slice, axes, checkbo
1919

2020
import Base.Broadcast: AbstractArrayStyle, BroadcastStyle, Broadcasted, DefaultArrayStyle, broadcasted
2121

22-
import BlockArrays: AbstractBlockLayout, Block, BlockIndexRange, BlockLayout, BlockSlice, BlockSlice1, BlockSlices,
23-
BlockStyle, BlockedUnitRange, DefaultBlockAxis, _blockkron, _blocklengths2blocklasts, block,
22+
import BlockArrays: AbstractBlockLayout, AbstractBlockedUnitRange, Block, BlockIndexRange, BlockLayout, BlockBidiagonal, BlockDiagonal,
23+
BlockSlice, BlockSlice1, BlockSlices, BlockStyle, BlockTridiagonal, BlockedUnitRange, DefaultBlockAxis,
24+
_blockkron, _blocklengths2blocklasts, block,
2425
blockcheckbounds, blockcolstart, blockcolstop, blockcolsupport, blockindex, blockisequal,
25-
blockrowstart, blockrowstop, blockrowsupport, blocks, blocksize, hasmatchingblocks,
26-
sizes_from_blocks
26+
blockrowstart, blockrowstop, blockrowsupport, blocks, blocksize, checksquareblocks,
27+
hasmatchingblocks, sizes_from_blocks
2728

2829
import FillArrays: Fill, Ones, Zeros
2930

@@ -34,9 +35,8 @@ import LinearAlgebra.BLAS: BlasComplex, BlasFloat, BlasReal
3435

3536
import MatrixFactorizations: AdjQLPackedQLayout, QR, QRPackedQ, _ql, ql, ql!
3637

37-
3838
export BandedBlockBandedMatrix, BlockBandedMatrix, BlockSkylineMatrix, blockbandwidth, blockbandwidths,
39-
subblockbandwidth, subblockbandwidths, Ones, Zeros, Fill, Block, BlockTridiagonal, BlockBidiagonal, isblockbanded
39+
subblockbandwidth, subblockbandwidths, BlockTridiagonal, BlockBidiagonal, isblockbanded
4040

4141

4242
const Block1 = Block{1,Int}

0 commit comments

Comments
 (0)