We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 411ec2a commit 715e2d5Copy full SHA for 715e2d5
src/PreallocationTools.jl
@@ -22,7 +22,7 @@ and for the `Dual` version of `u`, allowing use of pre-cached vectors with
22
forward-mode automatic differentiation. Supports nested AD.
23
24
"""
25
-dualcache(u::AbstractArray, N::Int=ForwardDiff.pickchunksize(length(u)); levels::Int = 1) = DiffCache(u, size(u), N^levels)
+dualcache(u::AbstractArray, N::Int=ForwardDiff.pickchunksize(length(u)); levels::Int = 1) = DiffCache(u, size(u), N*ones(Int, levels))
26
dualcache(u::AbstractArray, N::AbstractArray{<:Int}) = DiffCache(u, size(u), N)
27
28
0 commit comments