Skip to content

Commit 5ad835d

Browse files
authored
Enable LineModel on GPU (#208)
1 parent b2bbf68 commit 5ad835d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: src/linesearch/line_model.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ mutable struct LineModel{T, S, M <: AbstractNLPModel{T, S}} <: AbstractNLPModel{
2222
end
2323

2424
function LineModel(nlp::AbstractNLPModel{T, S}, x::S, d::S; xt::S = similar(x)) where {T, S}
25-
meta = NLPModelMeta{T, S}(1, x0 = zeros(T, 1), name = "LineModel to $(nlp.meta.name))")
25+
meta = NLPModelMeta{T, S}(1, x0 = similar(x, 1), name = "LineModel to $(nlp.meta.name))")
2626
return LineModel(meta, Counters(), nlp, x, d, xt)
2727
end
2828

0 commit comments

Comments
 (0)