@@ -143,7 +143,8 @@ reshape_jacobian(result::DiffResult, ydual, xdual) = reshape_jacobian(DiffResult
143143# vector mode #
144144# ##############
145145
146- function vector_mode_jacobian (f:: F , x, cfg:: JacobianConfig{T,V,N} ) where {F,T,V,N}
146+ function vector_mode_jacobian (f:: F , x, cfg:: JacobianConfig{T} ) where {F,T}
147+ N = chunksize (cfg)
147148 ydual = vector_mode_dual_eval! (f, cfg, x)
148149 ydual isa AbstractArray || throw (JACOBIAN_ERROR)
149150 result = similar (ydual, valtype (eltype (ydual)), length (ydual), N)
@@ -152,7 +153,8 @@ function vector_mode_jacobian(f::F, x, cfg::JacobianConfig{T,V,N}) where {F,T,V,
152153 return result
153154end
154155
155- function vector_mode_jacobian (f!:: F , y, x, cfg:: JacobianConfig{T,V,N} ) where {F,T,V,N}
156+ function vector_mode_jacobian (f!:: F , y, x, cfg:: JacobianConfig{T} ) where {F,T}
157+ N = chunksize (cfg)
156158 ydual = vector_mode_dual_eval! (f!, cfg, y, x)
157159 map! (d -> value (T,d), y, ydual)
158160 result = similar (y, length (y), N)
@@ -161,14 +163,16 @@ function vector_mode_jacobian(f!::F, y, x, cfg::JacobianConfig{T,V,N}) where {F,
161163 return result
162164end
163165
164- function vector_mode_jacobian! (result, f:: F , x, cfg:: JacobianConfig{T,V,N} ) where {F,T,V,N}
166+ function vector_mode_jacobian! (result, f:: F , x, cfg:: JacobianConfig{T} ) where {F,T}
167+ N = chunksize (cfg)
165168 ydual = vector_mode_dual_eval! (f, cfg, x)
166169 extract_jacobian! (T, result, ydual, N)
167170 extract_value! (T, result, ydual)
168171 return result
169172end
170173
171- function vector_mode_jacobian! (result, f!:: F , y, x, cfg:: JacobianConfig{T,V,N} ) where {F,T,V,N}
174+ function vector_mode_jacobian! (result, f!:: F , y, x, cfg:: JacobianConfig{T} ) where {F,T}
175+ N = chunksize (cfg)
172176 ydual = vector_mode_dual_eval! (f!, cfg, y, x)
173177 map! (d -> value (T,d), y, ydual)
174178 extract_jacobian! (T, result, ydual, N)
0 commit comments