Skip to content

Commit f3f07b6

Browse files
committed
Remove pre 1.9 code
1 parent fc353f8 commit f3f07b6

9 files changed

+25
-88
lines changed

Project.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ version = "7.8.1"
55
[deps]
66
Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"
77
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
8-
Requires = "ae029012-a4dd-5104-9daa-d747884805df"
98
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
109
SuiteSparse = "4607b0f0-06f3-5cda-b6b1-a6196a1729e9"
1110

@@ -30,7 +29,6 @@ ArrayInterfaceTrackerExt = "Tracker"
3029
[compat]
3130
Adapt = "4"
3231
LinearAlgebra = "1.10"
33-
Requires = "1"
3432
SparseArrays = "1.10"
3533
SuiteSparse = "1.10"
3634
julia = "1.10"

ext/ArrayInterfaceBandedMatricesExt.jl

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,9 @@
11
module ArrayInterfaceBandedMatricesExt
22

3-
if isdefined(Base, :get_extension)
4-
using ArrayInterface
5-
using ArrayInterface: BandedMatrixIndex
6-
using BandedMatrices
7-
using LinearAlgebra
8-
else
9-
using ..ArrayInterface
10-
using ..ArrayInterface: BandedMatrixIndex
11-
using ..BandedMatrices
12-
using ..LinearAlgebra
13-
end
3+
using ArrayInterface
4+
using ArrayInterface: BandedMatrixIndex
5+
using BandedMatrices
6+
using LinearAlgebra
147

158
const TransOrAdjBandedMatrix = Union{
169
Adjoint{T, <:BandedMatrix{T}},

ext/ArrayInterfaceBlockBandedMatricesExt.jl

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,9 @@
11
module ArrayInterfaceBlockBandedMatricesExt
22

3-
4-
5-
if isdefined(Base, :get_extension)
6-
using ArrayInterface
7-
using ArrayInterface: BandedMatrixIndex
8-
using BlockBandedMatrices
9-
using BlockBandedMatrices.BlockArrays
10-
else
11-
using ..ArrayInterface
12-
using ..ArrayInterface: BandedMatrixIndex
13-
using ..BlockBandedMatrices
14-
using ..BlockBandedMatrices.BlockArrays
15-
end
3+
using ArrayInterface
4+
using ArrayInterface: BandedMatrixIndex
5+
using BlockBandedMatrices
6+
using BlockBandedMatrices.BlockArrays
167

178
struct BlockBandedMatrixIndex <: ArrayInterface.MatrixIndex
189
count::Int

ext/ArrayInterfaceCUDAExt.jl

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,9 @@
11
module ArrayInterfaceCUDAExt
22

33
using ArrayInterface
4-
5-
if isdefined(Base, :get_extension)
6-
using CUDA
7-
using CUDA.CUSOLVER
8-
using LinearAlgebra
9-
else
10-
using ..CUDA
11-
using ..CUDA.CUSOLVER
12-
using ..LinearAlgebra
13-
end
4+
using CUDA
5+
using CUDA.CUSOLVER
6+
using LinearAlgebra
147

158
function ArrayInterface.lu_instance(A::CuMatrix{T}) where {T}
169
if VERSION >= v"1.8-"

ext/ArrayInterfaceGPUArraysCoreExt.jl

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,9 @@
11
module ArrayInterfaceGPUArraysCoreExt
22

3-
4-
if isdefined(Base, :get_extension)
5-
using Adapt
6-
using ArrayInterface
7-
using LinearAlgebra: lu
8-
import GPUArraysCore
9-
else
10-
using Adapt # Will cause problems for relocatability.
11-
using ..ArrayInterface
12-
using ..LinearAlgebra: lu
13-
import ..GPUArraysCore
14-
end
3+
using Adapt
4+
using ArrayInterface
5+
using LinearAlgebra: lu
6+
import GPUArraysCore
157

168
ArrayInterface.fast_scalar_indexing(::Type{<:GPUArraysCore.AbstractGPUArray}) = false
179
@inline ArrayInterface.allowed_getindex(x::GPUArraysCore.AbstractGPUArray, i...) = GPUArraysCore.@allowscalar(x[i...])

ext/ArrayInterfaceReverseDiffExt.jl

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,17 @@
11
module ArrayInterfaceReverseDiffExt
22

3-
if isdefined(Base, :get_extension)
4-
using ArrayInterface
5-
import ReverseDiff
6-
else
7-
using ..ArrayInterface
8-
import ..ReverseDiff
9-
end
3+
using ArrayInterface
4+
import ReverseDiff
105

116
ArrayInterface.ismutable(::Type{<:ReverseDiff.TrackedArray}) = false
127
ArrayInterface.ismutable(T::Type{<:ReverseDiff.TrackedReal}) = false
138
ArrayInterface.can_setindex(::Type{<:ReverseDiff.TrackedArray}) = false
149
ArrayInterface.fast_scalar_indexing(::Type{<:ReverseDiff.TrackedArray}) = false
15-
function ArrayInterface.aos_to_soa(x::AbstractArray{<:ReverseDiff.TrackedReal,N}) where {N}
10+
function ArrayInterface.aos_to_soa(x::AbstractArray{<:ReverseDiff.TrackedReal, N}) where {N}
1611
if length(x) > 1
17-
return reshape(reduce(vcat,x), size(x))
12+
return reshape(reduce(vcat, x), size(x))
1813
else
19-
return reduce(vcat,[x[1],x[1]])[1:1]
14+
return reduce(vcat,[x[1], x[1]])[1:1]
2015
end
2116
end
2217

ext/ArrayInterfaceStaticArraysCoreExt.jl

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,8 @@
11
module ArrayInterfaceStaticArraysCoreExt
22

3-
if isdefined(Base, :get_extension)
4-
import ArrayInterface
5-
using LinearAlgebra
6-
import StaticArraysCore
7-
else
8-
import ..ArrayInterface
9-
using ..LinearAlgebra
10-
import ..StaticArraysCore
11-
end
3+
import ArrayInterface
4+
using LinearAlgebra
5+
import StaticArraysCore
126

137
function ArrayInterface.undefmatrix(::StaticArraysCore.MArray{S, T, N, L}) where {S, T, N, L}
148
return StaticArraysCore.MMatrix{L, L, T, L*L}(undef)

ext/ArrayInterfaceTrackerExt.jl

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
11
module ArrayInterfaceTrackerExt
22

3-
if isdefined(Base, :get_extension)
4-
using ArrayInterface
5-
import Tracker
6-
else
7-
using ..ArrayInterface
8-
import ..Tracker
9-
end
3+
using ArrayInterface
4+
import Tracker
105

116
ArrayInterface.ismutable(::Type{<:Tracker.TrackedArray}) = false
127
ArrayInterface.ismutable(T::Type{<:Tracker.TrackedReal}) = false

src/ArrayInterface.jl

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1000,18 +1000,4 @@ ensures_sorted(@nospecialize( T::Type{<:AbstractRange})) = true
10001000
ensures_sorted(T::Type) = is_forwarding_wrapper(T) ? ensures_sorted(parent_type(T)) : false
10011001
ensures_sorted(@nospecialize(x)) = ensures_sorted(typeof(x))
10021002

1003-
## Extensions
1004-
1005-
import Requires
1006-
@static if !isdefined(Base, :get_extension)
1007-
function __init__()
1008-
Requires.@require BandedMatrices = "aae01518-5342-5314-be14-df237901396f" begin include("../ext/ArrayInterfaceBandedMatricesExt.jl") end
1009-
Requires.@require BlockBandedMatrices = "ffab5731-97b5-5995-9138-79e8c1846df0" begin include("../ext/ArrayInterfaceBlockBandedMatricesExt.jl") end
1010-
Requires.@require GPUArraysCore = "46192b85-c4d5-4398-a991-12ede77f4527" begin include("../ext/ArrayInterfaceGPUArraysCoreExt.jl") end
1011-
Requires.@require StaticArraysCore = "1e83bf80-4336-4d27-bf5d-d5a4f845583c" begin include("../ext/ArrayInterfaceStaticArraysCoreExt.jl") end
1012-
Requires.@require CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" begin include("../ext/ArrayInterfaceCUDAExt.jl") end
1013-
Requires.@require Tracker="9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" begin include("../ext/ArrayInterfaceTrackerExt.jl") end
1014-
end
1015-
end
1016-
10171003
end # module

0 commit comments

Comments
 (0)