@@ -32,15 +32,15 @@ function ForwardColorJacCache(f,x,_chunksize = nothing;
32
32
end
33
33
34
34
p = adapt .(parameterless_type (x),generate_chunked_partials (x,colorvec,chunksize))
35
- _t = Dual {ForwardDiff.Tag(f,eltype(vec(x)))} .(vec (x),first (p))
35
+ _t = Dual {typeof( ForwardDiff.Tag(f,eltype(vec(x) )))} .(vec (x),first (p))
36
36
t = ArrayInterface. restructure (x,_t)
37
37
if dx isa Nothing
38
38
fx = similar (t)
39
39
_dx = similar (x)
40
40
else
41
41
tup = ArrayInterface. allowed_getindex (ArrayInterface. allowed_getindex (p,1 ),1 ) .* false
42
42
_pi = adapt (parameterless_type (dx),[tup for i in 1 : length (dx)])
43
- fx = reshape (Dual {ForwardDiff.Tag(f,eltype(vec(x)))} .(vec (dx),_pi),size (dx)... )
43
+ fx = reshape (Dual {typeof( ForwardDiff.Tag(f,eltype(vec(x) )))} .(vec (dx),_pi),size (dx)... )
44
44
_dx = dx
45
45
end
46
46
@@ -97,7 +97,7 @@ function forwarddiff_color_jacobian(f,x::AbstractArray{<:Number},jac_cache::Forw
97
97
98
98
for i in eachindex (p)
99
99
partial_i = p[i]
100
- t = reshape (Dual {ForwardDiff.Tag(f,eltype(vecx))} .(vecx, partial_i),size (t))
100
+ t = reshape (Dual {typeof( ForwardDiff.Tag(f,eltype(vecx) ))} .(vecx, partial_i),size (t))
101
101
fx = f (t)
102
102
if ! (sparsity isa Nothing)
103
103
for j in 1 : chunksize
@@ -171,7 +171,7 @@ function forwarddiff_color_jacobian!(J::AbstractMatrix{<:Number},
171
171
172
172
for i in eachindex (p)
173
173
partial_i = p[i]
174
- vect .= Dual {ForwardDiff.Tag(f,eltype(vecx))} .(vecx, partial_i)
174
+ vect .= Dual {typeof( ForwardDiff.Tag(f,eltype(vecx) ))} .(vecx, partial_i)
175
175
f (fx,t)
176
176
if ! (sparsity isa Nothing)
177
177
for j in 1 : chunksize
0 commit comments