@@ -45,9 +45,8 @@ void problem_checking_t<i_t, f_t>::check_csr_representation(
4545 cuopt_expects (thrust::all_of (op_problem.get_handle_ptr ()->get_thrust_policy (),
4646 op_problem.get_constraint_matrix_indices ().cbegin (),
4747 op_problem.get_constraint_matrix_indices ().cend (),
48- [n_variables = op_problem.get_n_variables ()] __device__ (i_t val) {
49- return val >= 0 && val < n_variables;
50- }),
48+ [n_variables = op_problem.get_n_variables ()] __device__ (
49+ i_t val) -> bool { return val >= 0 && val < n_variables; }),
5150 error_type_t ::ValidationError,
5251 " A_indices values must positive lower than the number of variables (c size)." );
5352}
@@ -72,7 +71,7 @@ void problem_checking_t<i_t, f_t>::check_initial_primal_representation(
7271 [lower_bounds = make_span (op_problem.get_variable_lower_bounds ()),
7372 upper_bounds = make_span (op_problem.get_variable_upper_bounds ()),
7473 assignment_span = make_span (primal_initial_solution),
75- int_tol = 1e-8 ] __device__ (i_t idx) {
74+ int_tol = 1e-8 ] __device__ (i_t idx) -> bool {
7675 return assignment_span[idx] < lower_bounds[idx] - int_tol ||
7776 assignment_span[idx] > upper_bounds[idx] + int_tol;
7877 }),
@@ -171,13 +170,14 @@ void problem_checking_t<i_t, f_t>::check_problem_representation(
171170
172171 // Check row type if set
173172 if (!op_problem.get_row_types ().is_empty ()) {
174- cuopt_expects (
175- thrust::all_of (op_problem.get_handle_ptr ()->get_thrust_policy (),
176- op_problem.get_row_types ().cbegin (),
177- op_problem.get_row_types ().cend (),
178- [] __device__ (char val) { return val == ' E' || val == ' G' || val == ' L' ; }),
179- error_type_t ::ValidationError,
180- " row_types values must equal to 'E', 'G' or 'L'." );
173+ cuopt_expects (thrust::all_of (op_problem.get_handle_ptr ()->get_thrust_policy (),
174+ op_problem.get_row_types ().cbegin (),
175+ op_problem.get_row_types ().cend (),
176+ [] __device__ (char val) -> bool {
177+ return val == ' E' || val == ' G' || val == ' L' ;
178+ }),
179+ error_type_t ::ValidationError,
180+ " row_types values must equal to 'E', 'G' or 'L'." );
181181
182182 cuopt_expects (
183183 op_problem.get_row_types ().size () == op_problem.get_constraint_bounds ().size (),
@@ -322,19 +322,17 @@ bool problem_checking_t<i_t, f_t>::has_crossing_bounds(
322322 thrust::make_counting_iterator (0 ),
323323 thrust::make_counting_iterator (0 ) + op_problem.get_variable_upper_bounds ().size (),
324324 [upper_bounds = make_span (op_problem.get_variable_upper_bounds ()),
325- lower_bounds = make_span (op_problem.get_variable_lower_bounds ())] __device__ (size_t i) {
326- return upper_bounds[i] >= lower_bounds[i];
327- });
325+ lower_bounds = make_span (op_problem.get_variable_lower_bounds ())] __device__ (size_t i)
326+ -> bool { return upper_bounds[i] >= lower_bounds[i]; });
328327
329328 // Check if all constraint bounds are valid (upper >= lower)
330329 bool all_constraint_bounds_valid = thrust::all_of (
331330 op_problem.get_handle_ptr ()->get_thrust_policy (),
332331 thrust::make_counting_iterator (0 ),
333332 thrust::make_counting_iterator (0 ) + op_problem.get_constraint_upper_bounds ().size (),
334333 [upper_bounds = make_span (op_problem.get_constraint_upper_bounds ()),
335- lower_bounds = make_span (op_problem.get_constraint_lower_bounds ())] __device__ (size_t i) {
336- return upper_bounds[i] >= lower_bounds[i];
337- });
334+ lower_bounds = make_span (op_problem.get_constraint_lower_bounds ())] __device__ (size_t i)
335+ -> bool { return upper_bounds[i] >= lower_bounds[i]; });
338336
339337 // Return true if any bounds are invalid (crossing)
340338 return !all_variable_bounds_valid || !all_constraint_bounds_valid;
0 commit comments