@@ -44,14 +44,14 @@ function ForwardColorJacCache(f::F, x, _chunksize = nothing;
44
44
p = adapt .(parameterless_type (x), generate_chunked_partials (x, colorvec, chunksize))
45
45
_t = Dual{T, eltype (x), getsize (chunksize)
46
46
}. (vec (x), ForwardDiff. Partials .(first (p)))
47
- t = ArrayInterfaceCore . restructure (x, _t)
47
+ t = ArrayInterface . restructure (x, _t)
48
48
end
49
49
50
50
if dx isa Nothing
51
51
fx = similar (t)
52
52
_dx = similar (x)
53
53
else
54
- tup = ArrayInterfaceCore . allowed_getindex (ArrayInterfaceCore . allowed_getindex (p, 1 ),
54
+ tup = ArrayInterface . allowed_getindex (ArrayInterface . allowed_getindex (p, 1 ),
55
55
1 ) .* false
56
56
_pi = adapt (parameterless_type (dx), [tup for i in 1 : length (dx)])
57
57
fx = reshape (Dual {T, eltype(dx), length(tup)} .(vec (dx), ForwardDiff. Partials .(_pi)),
156
156
function forwarddiff_color_jacobian (f:: F , x:: AbstractArray{<:Number} ,
157
157
jac_cache:: ForwardColorJacCache ,
158
158
jac_prototype = nothing ) where {F}
159
- if jac_prototype isa Nothing ? ArrayInterfaceCore . ismutable (x) :
160
- ArrayInterfaceCore . ismutable (jac_prototype)
159
+ if jac_prototype isa Nothing ? ArrayInterface . ismutable (x) :
160
+ ArrayInterface . ismutable (jac_prototype)
161
161
# Whenever J is mutable, we mutate it to avoid allocations
162
162
dx = jac_cache. dx
163
163
vecx = vec (x)
@@ -190,7 +190,7 @@ function forwarddiff_color_jacobian(J::AbstractMatrix{<:Number}, f::F,
190
190
nrows, ncols = size (J)
191
191
192
192
if ! (sparsity isa Nothing)
193
- rows_index, cols_index = ArrayInterfaceCore . findstructralnz (sparsity)
193
+ rows_index, cols_index = ArrayInterface . findstructralnz (sparsity)
194
194
rows_index = [rows_index[i] for i in 1 : length (rows_index)]
195
195
cols_index = [cols_index[i] for i in 1 : length (cols_index)]
196
196
end
@@ -267,7 +267,7 @@ function forwarddiff_color_jacobian_immutable(f, x::AbstractArray{<:Number},
267
267
nrows, ncols = size (J)
268
268
269
269
if ! (sparsity isa Nothing)
270
- rows_index, cols_index = ArrayInterfaceCore . findstructralnz (sparsity)
270
+ rows_index, cols_index = ArrayInterface . findstructralnz (sparsity)
271
271
rows_index = [rows_index[i] for i in 1 : length (rows_index)]
272
272
cols_index = [cols_index[i] for i in 1 : length (cols_index)]
273
273
end
@@ -317,7 +317,7 @@ function forwarddiff_color_jacobian!(J::AbstractMatrix{<:Number},
317
317
x:: AbstractArray{<:Number} ;
318
318
dx = similar (x, size (J, 1 )),
319
319
colorvec = 1 : length (x),
320
- sparsity = ArrayInterfaceCore . has_sparsestruct (J) ? J :
320
+ sparsity = ArrayInterface . has_sparsestruct (J) ? J :
321
321
nothing )
322
322
forwarddiff_color_jacobian! (J, f, x,
323
323
ForwardColorJacCache (f, x, dx = dx, colorvec = colorvec,
@@ -347,7 +347,7 @@ function forwarddiff_color_jacobian!(J::AbstractMatrix{<:Number},
347
347
end
348
348
349
349
if FiniteDiff. _use_findstructralnz (sparsity)
350
- rows_index, cols_index = ArrayInterfaceCore . findstructralnz (sparsity)
350
+ rows_index, cols_index = ArrayInterface . findstructralnz (sparsity)
351
351
else
352
352
rows_index = 1 : size (J, 1 )
353
353
cols_index = 1 : size (J, 2 )
@@ -385,7 +385,7 @@ function forwarddiff_color_jacobian!(J::AbstractMatrix{<:Number},
385
385
dx .= partials .(fx, j)
386
386
end
387
387
388
- if ArrayInterfaceCore . fast_scalar_indexing (dx)
388
+ if ArrayInterface . fast_scalar_indexing (dx)
389
389
# dx is implicitly used in vecdx
390
390
if sparseCSC_common_sparsity
391
391
FiniteDiff. _colorediteration! (J, vecdx, colorvec, color_i, ncols)
0 commit comments