Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions cpp/src/linear_programming/solver_solution.cu
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,12 @@ template <typename i_t, typename f_t>
void optimization_problem_solution_t<i_t, f_t>::copy_from(
const raft::handle_t* handle_ptr, const optimization_problem_solution_t<i_t, f_t>& other)
{
// Resize to make sure they are of same size
primal_solution_.resize(other.primal_solution_.size(), handle_ptr->get_stream());
dual_solution_.resize(other.dual_solution_.size(), handle_ptr->get_stream());
reduced_cost_.resize(other.reduced_cost_.size(), handle_ptr->get_stream());

// Copy the data
raft::copy(primal_solution_.data(),
other.primal_solution_.data(),
primal_solution_.size(),
Expand Down