Skip to content

Commit

Permalink
Fixes the syntax?
Browse files Browse the repository at this point in the history
  • Loading branch information
avik-pal committed Dec 5, 2023
1 parent 2b67d66 commit 55513d4
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions test/test_sparse_jacobian.jl
Original file line number Diff line number Diff line change
Expand Up @@ -166,15 +166,17 @@ end

@static if VERSION v"1.9"
using AllocCheck
end

@static if VERSION v"1.9"
# Testing that the non-sparse jacobian's are non-allocating.
fvcat(x) = vcat(x, x)

x_sa = @SVector randn(Float32, 10);
x_sa = @SVector randn(Float32, 10)

J_true_sa = ForwardDiff.jacobian(fvcat, x_sa)

@check_allocs function __sparse_jacobian_no_allocs(ad, sd, f::F, x) where {F}
AllocCheck.@check_allocs function __sparse_jacobian_no_allocs(ad, sd, f::F, x) where {F}
return sparse_jacobian(ad, sd, f, x)
end

Expand All @@ -192,4 +194,4 @@ end
@test J J_true_sa
end
end
end
end

0 comments on commit 55513d4

Please sign in to comment.