Skip to content

Commit 4c3fbe2

Browse files
committed
support MemoryLayout for AbstractBandedMatrix
1 parent 6046ac2 commit 4c3fbe2

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

ext/PTYQoLBandedMatricesExt.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ module PTYQoLBandedMatricesExt
33
import BandedMatrices: inbands_getindex, inbands_setindex!, AbstractBandedMatrix, bandwidths, MemoryLayout, BandedLayout
44
import Base: getindex, setindex!, @propagate_inbounds
55

6+
MemoryLayout(::Type{<:AbstractBandedMatrix}) = BandedLayout()
7+
68
@propagate_inbounds function getindex(A::AbstractBandedMatrix, j::Integer, k::Integer)
79
@boundscheck checkbounds(A, j, k)
810
l, u = bandwidths(A)

0 commit comments

Comments
 (0)