@@ -212,7 +212,7 @@ function (L::FwdModeAutoDiffVecProd)(dv, v, p, t)
212
212
end
213
213
214
214
function Base. resize! (L:: FwdModeAutoDiffVecProd , n:: Integer )
215
- static_hasmethod (resize!, typeof ((L. f, n))) && resize! (L. f, n)
215
+ hasmethod (resize!, typeof ((L. f, n))) && resize! (L. f, n)
216
216
resize! (L. u, n)
217
217
218
218
for v in L. cache
@@ -304,7 +304,7 @@ function HesVec(f, u::AbstractArray, p = nothing, t = nothing;
304
304
305
305
(cache1, cache2, cache3), numauto_hesvec, numauto_hesvec!
306
306
elseif autodiff isa AutoZygote
307
- @assert static_hasmethod (autoback_hesvec, typeof ((f, u, u))) " To use AutoZygote() AD, first load Zygote with `using Zygote`, or `import Zygote`"
307
+ @assert hasmethod (autoback_hesvec, typeof ((f, u, u))) " To use AutoZygote() AD, first load Zygote with `using Zygote`, or `import Zygote`"
308
308
309
309
cache1 = Dual{
310
310
typeof (ForwardDiff. Tag (tag, eltype (u))), eltype (u), 1
@@ -316,8 +316,8 @@ function HesVec(f, u::AbstractArray, p = nothing, t = nothing;
316
316
error (" Set autodiff to either AutoForwardDiff(), AutoZygote(), or AutoFiniteDiff()" )
317
317
end
318
318
319
- outofplace = static_hasmethod (f, typeof ((u,)))
320
- isinplace = static_hasmethod (f, typeof ((u,)))
319
+ outofplace = hasmethod (f, typeof ((u,)))
320
+ isinplace = hasmethod (f, typeof ((u,)))
321
321
322
322
if ! (isinplace) & ! (outofplace)
323
323
error (" $f must have signature f(u)." )
@@ -347,8 +347,8 @@ function HesVecGrad(f, u::AbstractArray, p = nothing, t = nothing;
347
347
error (" Set autodiff to either AutoForwardDiff(), or AutoFiniteDiff()" )
348
348
end
349
349
350
- outofplace = static_hasmethod (f, typeof ((u,)))
351
- isinplace = static_hasmethod (f, typeof ((u, u)))
350
+ outofplace = hasmethod (f, typeof ((u,)))
351
+ isinplace = hasmethod (f, typeof ((u, u)))
352
352
353
353
if ! (isinplace) & ! (outofplace)
354
354
error (" $f must have signature f(u), or f(du, u)." )
0 commit comments