Skip to content

Commit 4d2d61d

Browse files
Merge pull request #275 from SciML/arrayinterface
Update to ArrayInterface v7
2 parents f218598 + b74deae commit 4d2d61d

File tree

4 files changed

+14
-14
lines changed

4 files changed

+14
-14
lines changed

Project.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ authors = ["SciML"]
44
version = "1.35.0"
55

66
[deps]
7-
ArrayInterfaceCore = "30b0a656-2188-435a-8636-2ec0e6a096e2"
7+
ArrayInterface = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9"
88
DocStringExtensions = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae"
99
FastLapackInterface = "29a986be-02c6-4525-aec4-84b980013641"
1010
GPUArraysCore = "46192b85-c4d5-4398-a991-12ede77f4527"
@@ -32,7 +32,7 @@ HYPRE = "b5ffcf37-a2bd-41ab-a3da-4bd9bc8ad771"
3232
LinearSolveHYPRE = "HYPRE"
3333

3434
[compat]
35-
ArrayInterfaceCore = "0.1.1"
35+
ArrayInterface = "7"
3636
DocStringExtensions = "0.8, 0.9"
3737
FastLapackInterface = "1"
3838
GPUArraysCore = "0.1"

src/LinearSolve.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ if isdefined(Base, :Experimental) &&
33
isdefined(Base.Experimental, Symbol("@max_methods"))
44
@eval Base.Experimental.@max_methods 1
55
end
6-
using ArrayInterfaceCore
6+
using ArrayInterface
77
using RecursiveFactorization
88
using Base: cache_dependencies, Bool
99
using LinearAlgebra

src/default.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ function defaultalg(A, b, ::OperatorAssumptions{true})
142142
# whether MKL or OpenBLAS is being used
143143
if (A === nothing && !(b isa GPUArraysCore.AbstractGPUArray)) || A isa Matrix
144144
if (A === nothing || eltype(A) <: Union{Float32, Float64, ComplexF32, ComplexF64}) &&
145-
ArrayInterfaceCore.can_setindex(b)
145+
ArrayInterface.can_setindex(b)
146146
if length(b) <= 10
147147
alg = GenericLUFactorization()
148148
elseif (length(b) <= 100 || (isopenblas() && length(b) <= 500)) &&
@@ -160,7 +160,7 @@ function defaultalg(A, b, ::OperatorAssumptions{true})
160160

161161
# This catches the cases where a factorization overload could exist
162162
# For example, BlockBandedMatrix
163-
elseif A !== nothing && ArrayInterfaceCore.isstructured(A)
163+
elseif A !== nothing && ArrayInterface.isstructured(A)
164164
alg = GenericFactorization()
165165

166166
# Not factorizable operator, default to only using A*x

src/factorization.jl

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ end
6969
function init_cacheval(alg::Union{LUFactorization, GenericLUFactorization}, A, b, u, Pl, Pr,
7070
maxiters::Int, abstol, reltol, verbose::Bool,
7171
assumptions::OperatorAssumptions)
72-
ArrayInterfaceCore.lu_instance(convert(AbstractMatrix, A))
72+
ArrayInterface.lu_instance(convert(AbstractMatrix, A))
7373
end
7474

7575
## QRFactorization
@@ -131,25 +131,25 @@ end
131131
function init_cacheval(alg::GenericFactorization{typeof(lu)}, A, b, u, Pl, Pr,
132132
maxiters::Int,
133133
abstol, reltol, verbose::Bool, assumptions::OperatorAssumptions)
134-
ArrayInterfaceCore.lu_instance(convert(AbstractMatrix, A))
134+
ArrayInterface.lu_instance(convert(AbstractMatrix, A))
135135
end
136136
function init_cacheval(alg::GenericFactorization{typeof(lu!)}, A, b, u, Pl, Pr,
137137
maxiters::Int,
138138
abstol, reltol, verbose::Bool, assumptions::OperatorAssumptions)
139-
ArrayInterfaceCore.lu_instance(convert(AbstractMatrix, A))
139+
ArrayInterface.lu_instance(convert(AbstractMatrix, A))
140140
end
141141

142142
function init_cacheval(alg::GenericFactorization{typeof(lu)},
143143
A::StridedMatrix{<:LinearAlgebra.BlasFloat}, b, u, Pl, Pr,
144144
maxiters::Int,
145145
abstol, reltol, verbose::Bool, assumptions::OperatorAssumptions)
146-
ArrayInterfaceCore.lu_instance(A)
146+
ArrayInterface.lu_instance(A)
147147
end
148148
function init_cacheval(alg::GenericFactorization{typeof(lu!)},
149149
A::StridedMatrix{<:LinearAlgebra.BlasFloat}, b, u, Pl, Pr,
150150
maxiters::Int,
151151
abstol, reltol, verbose::Bool, assumptions::OperatorAssumptions)
152-
ArrayInterfaceCore.lu_instance(A)
152+
ArrayInterface.lu_instance(A)
153153
end
154154
function init_cacheval(alg::GenericFactorization{typeof(lu)}, A::Diagonal, b, u, Pl, Pr,
155155
maxiters::Int, abstol, reltol, verbose::Bool,
@@ -159,7 +159,7 @@ end
159159
function init_cacheval(alg::GenericFactorization{typeof(lu)}, A::Tridiagonal, b, u, Pl, Pr,
160160
maxiters::Int, abstol, reltol, verbose::Bool,
161161
assumptions::OperatorAssumptions)
162-
ArrayInterfaceCore.lu_instance(A)
162+
ArrayInterface.lu_instance(A)
163163
end
164164
function init_cacheval(alg::GenericFactorization{typeof(lu!)}, A::Diagonal, b, u, Pl, Pr,
165165
maxiters::Int, abstol, reltol, verbose::Bool,
@@ -169,7 +169,7 @@ end
169169
function init_cacheval(alg::GenericFactorization{typeof(lu!)}, A::Tridiagonal, b, u, Pl, Pr,
170170
maxiters::Int, abstol, reltol, verbose::Bool,
171171
assumptions::OperatorAssumptions)
172-
ArrayInterfaceCore.lu_instance(A)
172+
ArrayInterface.lu_instance(A)
173173
end
174174

175175
function init_cacheval(alg::GenericFactorization, A::Diagonal, b, u, Pl, Pr, maxiters::Int,
@@ -179,7 +179,7 @@ end
179179
function init_cacheval(alg::GenericFactorization, A::Tridiagonal, b, u, Pl, Pr,
180180
maxiters::Int,
181181
abstol, reltol, verbose::Bool, assumptions::OperatorAssumptions)
182-
ArrayInterfaceCore.lu_instance(A)
182+
ArrayInterface.lu_instance(A)
183183
end
184184
function init_cacheval(alg::GenericFactorization, A::SymTridiagonal{T, V}, b, u, Pl, Pr,
185185
maxiters::Int, abstol, reltol, verbose::Bool,
@@ -359,7 +359,7 @@ end
359359
function init_cacheval(alg::RFLUFactorization, A, b, u, Pl, Pr, maxiters::Int,
360360
abstol, reltol, verbose::Bool, assumptions::OperatorAssumptions)
361361
ipiv = Vector{LinearAlgebra.BlasInt}(undef, min(size(A)...))
362-
ArrayInterfaceCore.lu_instance(convert(AbstractMatrix, A)), ipiv
362+
ArrayInterface.lu_instance(convert(AbstractMatrix, A)), ipiv
363363
end
364364

365365
function SciMLBase.solve(cache::LinearCache, alg::RFLUFactorization{P, T};

0 commit comments

Comments
 (0)