Skip to content

Commit a272651

Browse files
Merge pull request #62 from SciML/arrayinterface
ArrayInterface v7
2 parents ac97c6f + bd055cc commit a272651

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

Project.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ version = "0.4.11"
55

66
[deps]
77
Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"
8-
ArrayInterfaceCore = "30b0a656-2188-435a-8636-2ec0e6a096e2"
8+
ArrayInterface = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9"
99
ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210"
1010
Requires = "ae029012-a4dd-5104-9daa-d747884805df"
1111

1212
[compat]
1313
Adapt = "3"
14-
ArrayInterfaceCore = "0.1.1"
14+
ArrayInterface = "7"
1515
ForwardDiff = "0.10.3"
1616
Requires = "1.0"
1717
julia = "1.6"

src/PreallocationTools.jl

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

3-
using ForwardDiff, ArrayInterfaceCore, Adapt
3+
using ForwardDiff, ArrayInterface, Adapt
44

55
struct FixedSizeDiffCache{T <: AbstractArray, S <: AbstractArray}
66
du::T
@@ -10,7 +10,7 @@ end
1010

1111
function FixedSizeDiffCache(u::AbstractArray{T}, siz,
1212
::Type{Val{chunk_size}}) where {T, chunk_size}
13-
x = ArrayInterfaceCore.restructure(u,
13+
x = ArrayInterface.restructure(u,
1414
zeros(ForwardDiff.Dual{nothing, T, chunk_size},
1515
siz...))
1616
xany = Any[]
@@ -76,7 +76,7 @@ struct DiffCache{T <: AbstractArray, S <: AbstractArray}
7676
end
7777

7878
function DiffCache(u::AbstractArray{T}, siz, chunk_sizes) where {T}
79-
x = adapt(ArrayInterfaceCore.parameterless_type(u),
79+
x = adapt(ArrayInterface.parameterless_type(u),
8080
zeros(T, prod(chunk_sizes .+ 1) * prod(siz)))
8181
xany = Any[]
8282
DiffCache(u, x, xany)
@@ -147,7 +147,7 @@ function _restructure(normal_cache::Array, duals)
147147
end
148148

149149
function _restructure(normal_cache::AbstractArray, duals)
150-
ArrayInterfaceCore.restructure(normal_cache, duals)
150+
ArrayInterface.restructure(normal_cache, duals)
151151
end
152152

153153
function enlargediffcache!(dc, nelem) #warning comes only once per DiffCache.

0 commit comments

Comments
 (0)