Skip to content

Commit 2cb50e0

Browse files
author
Stuart Daines
committed
sparse fast path only if J, sparsity share same sparsity pattern
Simplifies fast path logic. All other cases (J is not a SparseMatrixCSC, or J has a different sparsity pattern) use previous slow path.
1 parent e32a713 commit 2cb50e0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/differentiation/compute_jacobian_ad.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -274,8 +274,8 @@ function forwarddiff_color_jacobian!(J::AbstractMatrix{<:Number},
274274
cols_index = 1:size(J,2)
275275
end
276276

277-
# fast path if J and sparsity are both SparseMatrixCSC and have the same number of columns and stored values
278-
sparseCSC_common_sparsity = FiniteDiff._use_sparseCSC_common_sparsity!(J, sparsity)
277+
# fast path if J and sparsity are both SparseMatrixCSC and have the same sparsity pattern
278+
sparseCSC_common_sparsity = FiniteDiff._use_sparseCSC_common_sparsity(J, sparsity)
279279

280280
vecx = vec(x)
281281
vect = vec(t)

0 commit comments

Comments
 (0)