Skip to content
This repository has been archived by the owner on Nov 1, 2024. It is now read-only.

Commit

Permalink
Merge pull request #7 from LuxDL/auto-juliaformatter-pr
Browse files Browse the repository at this point in the history
Automatic JuliaFormatter.jl run
  • Loading branch information
avik-pal authored Mar 17, 2024
2 parents 18afaca + 9eebb05 commit 8037aa7
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions ext/BatchedRoutinesForwardDiffExt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,7 @@ end
return ForwardDiff.value.(y_duals), J_partial
end

function __batched_value_and_jacobian(
ad::AutoForwardDiff, f::F, u::AbstractMatrix{T},
function __batched_value_and_jacobian(ad::AutoForwardDiff, f::F, u::AbstractMatrix{T},
ck::Val{chunksize}) where {F, T, chunksize}
N, B = size(u)

Expand Down Expand Up @@ -116,8 +115,7 @@ end
ad, f, u, Val(batched_pickchunksize(u))))
end
else
jac_call = :((y, J) = __batched_value_and_jacobian(
ad, f, u, $(Val(CK))))
jac_call = :((y, J) = __batched_value_and_jacobian(ad, f, u, $(Val(CK))))
end
return Expr(:block, jac_call, :(return (y, UniformBlockDiagonalMatrix(J))))
end
Expand Down

0 comments on commit 8037aa7

Please sign in to comment.