@@ -547,20 +547,21 @@ void problem_t<i_t, f_t>::check_problem_representation(bool check_transposed,
547547 cuopt_expects (thrust::all_of (handle_ptr->get_thrust_policy (),
548548 thrust::make_counting_iterator<i_t >(0 ),
549549 thrust::make_counting_iterator<i_t >(n_variables),
550- [vars_bnd = make_span (variable_bounds)] __device__ (i_t idx) {
550+ [vars_bnd = make_span (variable_bounds)] __device__ (i_t idx) -> bool {
551551 auto bounds = vars_bnd[idx];
552552 return get_lower (bounds) <= get_upper (bounds);
553553 }),
554554 error_type_t ::ValidationError,
555555 " Variable bounds are invalid" );
556556 cuopt_expects (
557- thrust::all_of (handle_ptr->get_thrust_policy (),
558- thrust::make_counting_iterator<i_t >(0 ),
559- thrust::make_counting_iterator<i_t >(n_constraints),
560- [constraint_lower_bounds = constraint_lower_bounds.data (),
561- constraint_upper_bounds = constraint_upper_bounds.data ()] __device__ (i_t idx) {
562- return constraint_lower_bounds[idx] <= constraint_upper_bounds[idx];
563- }),
557+ thrust::all_of (
558+ handle_ptr->get_thrust_policy (),
559+ thrust::make_counting_iterator<i_t >(0 ),
560+ thrust::make_counting_iterator<i_t >(n_constraints),
561+ [constraint_lower_bounds = constraint_lower_bounds.data (),
562+ constraint_upper_bounds = constraint_upper_bounds.data ()] __device__ (i_t idx) -> bool {
563+ return constraint_lower_bounds[idx] <= constraint_upper_bounds[idx];
564+ }),
564565 error_type_t ::ValidationError,
565566 " Constraints bounds are invalid" );
566567
@@ -582,23 +583,21 @@ void problem_t<i_t, f_t>::check_problem_representation(bool check_transposed,
582583 cuopt_assert (thrust::all_of (handle_ptr->get_thrust_policy (),
583584 integer_indices.cbegin (),
584585 integer_indices.cend (),
585- [types = variable_types.data ()] __device__ (i_t idx) {
586+ [types = variable_types.data ()] __device__ (i_t idx) -> bool {
586587 return types[idx] == var_t ::INTEGER;
587588 }),
588589 " The integer indices table contains references to non-integer variables." );
589590 cuopt_assert (thrust::all_of (handle_ptr->get_thrust_policy (),
590591 binary_indices.cbegin (),
591592 binary_indices.cend (),
592- [bin_table = is_binary_variable.data ()] __device__ (i_t idx) {
593- return bin_table[idx];
594- }),
593+ [bin_table = is_binary_variable.data ()] __device__ (
594+ i_t idx) -> bool { return bin_table[idx]; }),
595595 " The binary indices table contains references to non-binary variables." );
596596 cuopt_assert (thrust::all_of (handle_ptr->get_thrust_policy (),
597597 nonbinary_indices.cbegin (),
598598 nonbinary_indices.cend (),
599- [bin_table = is_binary_variable.data ()] __device__ (i_t idx) {
600- return !bin_table[idx];
601- }),
599+ [bin_table = is_binary_variable.data ()] __device__ (
600+ i_t idx) -> bool { return !bin_table[idx]; }),
602601 " The non-binary indices table contains references to binary variables." );
603602 cuopt_assert (
604603 thrust::all_of (
@@ -607,7 +606,7 @@ void problem_t<i_t, f_t>::check_problem_representation(bool check_transposed,
607606 thrust::make_counting_iterator<i_t >(n_variables),
608607 [types = variable_types.data (),
609608 bin_table = is_binary_variable.data (),
610- pb_view = view ()] __device__ (i_t idx) {
609+ pb_view = view ()] __device__ (i_t idx) -> bool {
611610 // ensure the binary variable tables are correct
612611 if (bin_table[idx]) {
613612 if (!thrust::binary_search (
@@ -640,7 +639,7 @@ void problem_t<i_t, f_t>::check_problem_representation(bool check_transposed,
640639 thrust::make_counting_iterator<i_t >(n_variables),
641640 [types = variable_types.data (),
642641 bin_table = is_binary_variable.data (),
643- pb_view = view ()] __device__ (i_t idx) {
642+ pb_view = view ()] __device__ (i_t idx) -> bool {
644643 // ensure the binary variable tables are correct
645644 if (bin_table[idx]) {
646645 if (!thrust::binary_search (
@@ -673,7 +672,7 @@ void problem_t<i_t, f_t>::check_problem_representation(bool check_transposed,
673672 thrust::make_counting_iterator<i_t >(n_variables),
674673 [types = variable_types.data (),
675674 bin_table = is_binary_variable.data (),
676- pb_view = view ()] __device__ (i_t idx) {
675+ pb_view = view ()] __device__ (i_t idx) -> bool {
677676 // ensure the binary variable tables are correct
678677 if (bin_table[idx]) {
679678 if (!thrust::binary_search (
@@ -1212,7 +1211,7 @@ void problem_t<i_t, f_t>::set_implied_integers(const std::vector<i_t>& implied_i
12121211 objective_is_integral = thrust::all_of (handle_ptr->get_thrust_policy (),
12131212 thrust::make_counting_iterator (0 ),
12141213 thrust::make_counting_iterator (n_variables),
1215- [v = view ()] __device__ (i_t var_idx) {
1214+ [v = view ()] __device__ (i_t var_idx) -> bool {
12161215 if (v.objective_coefficients [var_idx] == 0 ) return true ;
12171216 return v.is_integer (v.objective_coefficients [var_idx]) &&
12181217 (v.variable_types [var_idx] == var_t ::INTEGER ||
0 commit comments