Skip to content

Commit 01731e5

Browse files
Merge pull request #96 from mauro3/m3/api-jac
Small API addition to forwarddiff_color_jacobian: kword chunksize
2 parents 36978ea + 65af3e5 commit 01731e5

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/differentiation/compute_jacobian_ad.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,12 @@ function forwarddiff_color_jacobian(f,
6969
dx = copy(x), #if dx is nothing, we will estimate dx at the cost of a function call
7070
colorvec = 1:length(x),
7171
sparsity = nothing,
72-
jac_prototype = nothing)
72+
jac_prototype = nothing,
73+
chunksize = nothing)
7374
if dx isa Nothing
7475
dx = f(x)
7576
end
76-
forwarddiff_color_jacobian(f,x,ForwardColorJacCache(f,x,dx=dx,colorvec=colorvec,sparsity=sparsity),jac_prototype)
77+
forwarddiff_color_jacobian(f,x,ForwardColorJacCache(f,x,chunksize,dx=dx,colorvec=colorvec,sparsity=sparsity),jac_prototype)
7778
end
7879

7980
function forwarddiff_color_jacobian(f,x::AbstractArray{<:Number},jac_cache::ForwardColorJacCache,jac_prototype=nothing)

0 commit comments

Comments
 (0)