Skip to content

Commit 96575e5

Browse files
committed
fix
1 parent d6c6400 commit 96575e5

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

cpp/src/mip/diversity/lns/rins.cu

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -135,15 +135,16 @@ void rins_t<i_t, f_t>::run_rins()
135135
cuopt_assert(best_sol.assignment.size() == problem_copy->n_variables, "Assignment size mismatch");
136136

137137
rmm::device_uvector<i_t> vars_to_fix(problem_copy->n_integer_vars, rins_handle.get_stream());
138-
auto end = thrust::copy_if(rins_handle.get_thrust_policy(),
139-
problem_copy->integer_indices.begin(),
140-
problem_copy->integer_indices.end(),
141-
vars_to_fix.begin(),
142-
[lpopt = lp_opt_device.data(),
143-
pb = problem_copy->view(),
144-
incumbent = best_sol.assignment.data()] __device__(i_t var_idx) -> bool {
145-
return pb.integer_equal(lpopt[var_idx], incumbent[var_idx]);
146-
});
138+
auto end =
139+
thrust::copy_if(rins_handle.get_thrust_policy(),
140+
problem_copy->integer_indices.begin(),
141+
problem_copy->integer_indices.end(),
142+
vars_to_fix.begin(),
143+
[lpopt = lp_opt_device.data(),
144+
pb = problem_copy->view(),
145+
incumbent = best_sol.assignment.data()] __device__(i_t var_idx) -> bool {
146+
return pb.integer_equal(lpopt[var_idx], incumbent[var_idx]);
147+
});
147148
vars_to_fix.resize(end - vars_to_fix.begin(), rins_handle.get_stream());
148149
f_t fractional_ratio = (f_t)(vars_to_fix.size()) / (f_t)problem_copy->n_integer_vars;
149150

0 commit comments

Comments
 (0)