diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 22f0fa5..d3a2a11 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,6 +29,7 @@ jobs: - 'min' - 'lts' - '1' + - 'nightly' os: - ubuntu-latest - macOS-latest diff --git a/.github/workflows/downstream.yml b/.github/workflows/downstream.yml index f590f8b..faa2749 100644 --- a/.github/workflows/downstream.yml +++ b/.github/workflows/downstream.yml @@ -36,7 +36,7 @@ jobs: strategy: fail-fast: false matrix: - julia-version: ['1'] + julia-version: ['1', 'nightly'] os: [ubuntu-latest] package: - {repo: ApproxFunBase.jl, group: JuliaApproximation} diff --git a/src/BlockSkylineMatrix.jl b/src/BlockSkylineMatrix.jl index 633ffa6..e46fbb6 100644 --- a/src/BlockSkylineMatrix.jl +++ b/src/BlockSkylineMatrix.jl @@ -456,6 +456,9 @@ _parent_blocks(V::BlockBandedBlock)::Tuple{Int,Int} = MemoryLayout(::Type{<:BlockBandedBlock}) = ColumnMajor() Base.elsize(::Type{<:BlockSkylineMatrix{T,R}}) where {T,R} = Base.elsize(R) +function Base.cconvert(::Type{Ptr{T}}, V::BlockBandedBlock{T}) where T + V +end function Base.unsafe_convert(::Type{Ptr{T}}, V::BlockBandedBlock{T}) where T A = parent(V) K,J = _parent_blocks(V) diff --git a/src/linalg.jl b/src/linalg.jl index b018ae2..de246fc 100644 --- a/src/linalg.jl +++ b/src/linalg.jl @@ -106,6 +106,9 @@ strides(V::SubBlockSkylineMatrix{<:Any,LL,UU,<:Union{BlockRange1,Block1},Block1} (1,parent(V).block_sizes.block_strides[Int(parentindices(V)[2].block)]) +function Base.cconvert(::Type{Ptr{T}}, V::SubBlockSkylineMatrix{T,LL,UU,<:Union{BlockRange1,Block1},Block1}) where {T,LL,UU} + V +end function unsafe_convert(::Type{Ptr{T}}, V::SubBlockSkylineMatrix{T,LL,UU,<:Union{BlockRange1,Block1},Block1}) where {T,LL,UU} A = parent(V) JR = parentindices(V)[2] @@ -117,6 +120,9 @@ end strides(V::SubBlockSkylineMatrix{<:Any,LL,UU,<:BlockRange1,<:BlockIndexRange1}) where {LL,UU} = (1,parent(V).block_sizes.block_strides[Int(Block(parentindices(V)[2]))]) +function Base.cconvert(::Type{Ptr{T}}, V::SubBlockSkylineMatrix{T,LL,UU,<:BlockRange1,<:BlockIndexRange1}) where {T,LL,UU} + V +end function unsafe_convert(::Type{Ptr{T}}, V::SubBlockSkylineMatrix{T,LL,UU,<:BlockRange1,<:BlockIndexRange1}) where {T,LL,UU} A = parent(V) JR = parentindices(V)[2] @@ -127,6 +133,9 @@ function unsafe_convert(::Type{Ptr{T}}, V::SubBlockSkylineMatrix{T,LL,UU,<:Block p + sizeof(T)*(JR.block.indices[1][1]-1)*stride(V,2) end +function Base.cconvert(::Type{Ptr{T}}, V::SubBlockSkylineMatrix{T,LL,UU,BlockIndexRange1,BlockIndexRange1}) where {T,LL,UU} + V +end function unsafe_convert(::Type{Ptr{T}}, V::SubBlockSkylineMatrix{T,LL,UU,BlockIndexRange1,BlockIndexRange1}) where {T,LL,UU} A = parent(V) JR = parentindices(V)[2]