@@ -26,22 +26,22 @@ function LineSearch(; method = nothing, autodiff = AutoFiniteDiff(), alpha = tru
26
26
return LineSearch (method, autodiff, alpha)
27
27
end
28
28
29
- @inline function init_linesearch_cache (ls:: LineSearch , args ... )
30
- return init_linesearch_cache (ls. method, ls, args ... )
29
+ @inline function init_linesearch_cache (ls:: LineSearch , f :: F , u, p, fu, iip) where {F}
30
+ return init_linesearch_cache (ls. method, ls, f, u, p, fu, iip )
31
31
end
32
32
33
33
@concrete struct NoLineSearchCache
34
34
α
35
35
end
36
36
37
- function init_linesearch_cache (:: Nothing , ls, f:: F , u, p, fu, iip) where {F}
37
+ function init_linesearch_cache (:: Nothing , ls:: LineSearch , f:: F , u, p, fu, iip) where {F}
38
38
return NoLineSearchCache (convert (eltype (u), ls. α))
39
39
end
40
40
41
41
perform_linesearch! (cache:: NoLineSearchCache , u, du) = cache. α
42
42
43
43
# LineSearches.jl doesn't have a supertype so default to that
44
- function init_linesearch_cache (_, ls, f:: F , u, p, fu, iip) where {F}
44
+ function init_linesearch_cache (_, ls:: LineSearch , f:: F , u, p, fu, iip) where {F}
45
45
return LineSearchesJLCache (ls, f, u, p, fu, iip)
46
46
end
47
47
0 commit comments