diff --git a/benchmarks/linear_programming/cuopt/initial_problem_check.hpp b/benchmarks/linear_programming/cuopt/initial_problem_check.hpp index ded35ea6c..48d370ecd 100644 --- a/benchmarks/linear_programming/cuopt/initial_problem_check.hpp +++ b/benchmarks/linear_programming/cuopt/initial_problem_check.hpp @@ -1,6 +1,6 @@ /* clang-format off */ /* - * SPDX-FileCopyrightText: Copyright (c) 2025, NVIDIA CORPORATION & AFFILIATES. All rights reserved. + * SPDX-FileCopyrightText: Copyright (c) 2025-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ /* clang-format on */ @@ -79,7 +79,7 @@ bool test_constraint_and_variable_sanity( if (variable_types[i] == 'I' && abs(primal_vars[i] - round(primal_vars[i])) > int_tol) { feasible_variables = false; } - // Not always stricly true because we apply variable bound clamping on the scaled problem + // Not always strictly true because we apply variable bound clamping on the scaled problem // After unscaling it, the variables might not respect exactly (this adding an epsilon) if (!(primal_vars[i] >= variable_lower_bounds[i] - int_tol && primal_vars[i] <= variable_upper_bounds[i] + int_tol)) { diff --git a/cpp/libmps_parser/src/mps_parser.cpp b/cpp/libmps_parser/src/mps_parser.cpp index ee1034f9b..6a81b3b6c 100644 --- a/cpp/libmps_parser/src/mps_parser.cpp +++ b/cpp/libmps_parser/src/mps_parser.cpp @@ -1,6 +1,6 @@ /* clang-format off */ /* - * SPDX-FileCopyrightText: Copyright (c) 2022-2025, NVIDIA CORPORATION & AFFILIATES. All rights reserved. + * SPDX-FileCopyrightText: Copyright (c) 2022-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ /* clang-format on */ @@ -854,7 +854,7 @@ void mps_parser_t::parse_rows(std::string_view line) objective_name = name; else ignored_objective_names.emplace(name); - // If we wanted to stricly follow MPS definition: a new objective row ('N') should be treated + // If we wanted to strictly follow MPS definition: a new objective row ('N') should be treated // as an unbounded constraints, aka an extra contraints row with lower bound -infinity and upper // bound +infinity. Most solver ignore it to simplify the constraint matrix. We keep // it in record as ignored to not consider finding it in COLUMNS section as an error. diff --git a/cpp/src/linear_programming/restart_strategy/pdlp_restart_strategy.cu b/cpp/src/linear_programming/restart_strategy/pdlp_restart_strategy.cu index 565377682..c0f8c75bb 100644 --- a/cpp/src/linear_programming/restart_strategy/pdlp_restart_strategy.cu +++ b/cpp/src/linear_programming/restart_strategy/pdlp_restart_strategy.cu @@ -1,6 +1,6 @@ /* clang-format off */ /* - * SPDX-FileCopyrightText: Copyright (c) 2022-2025, NVIDIA CORPORATION & AFFILIATES. All rights reserved. + * SPDX-FileCopyrightText: Copyright (c) 2022-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ /* clang-format on */ @@ -1324,7 +1324,7 @@ compute_median(const typename pdlp_restart_strategy_t::view_t& restart i_t range_low, i_t range_high) { - cuopt_assert(range_low < range_high, "range_low should be stricly lower than range_high"); + cuopt_assert(range_low < range_high, "range_low should be strictly lower than range_high"); const i_t size = range_high - range_low; if ((size & 1) == 0) { // Even, return average @@ -1342,7 +1342,7 @@ DI void clamp_test_points( i_t range_low, i_t range_high) { - cuopt_assert(range_low < range_high, "range_low should be stricly lower than range_high"); + cuopt_assert(range_low < range_high, "range_low should be strictly lower than range_high"); for (int i = blockIdx.x * blockDim.x + threadIdx.x + range_low; i < range_high; i += blockDim.x * gridDim.x) { const f_t lower_bound_value = restart_strategy_view.lower_bound[i]; @@ -1522,7 +1522,7 @@ __global__ void solve_bound_constrained_trust_region_kernel( while (*testing_range_low != *testing_range_high) { const i_t range_low = *testing_range_low; const i_t range_high = *testing_range_high; - cuopt_assert(range_low < range_high, "range_low should be stricly lower than range_high"); + cuopt_assert(range_low < range_high, "range_low should be strictly lower than range_high"); // Each of those calls perform an implicit grid sync const f_t test_threshold = @@ -1782,7 +1782,7 @@ void pdlp_restart_strategy_t::solve_bound_constrained_trust_region( } else // No inf found, end is primal_size_h_ testing_range_high_.set_value_async(index_end_primal, stream_view_); cuopt_assert(index_start_primal <= index_end_primal, - "Start should be stricly smalled than end"); + "Start should be strictly smaller than end"); cuopt_assert(!thrust::any_of(handle_ptr_->get_thrust_policy(), threshold_.data() + index_start_primal, diff --git a/cpp/src/routing/ges/compute_fragment_ejections.cu b/cpp/src/routing/ges/compute_fragment_ejections.cu index 09a09de8f..89d54eb1a 100644 --- a/cpp/src/routing/ges/compute_fragment_ejections.cu +++ b/cpp/src/routing/ges/compute_fragment_ejections.cu @@ -1,6 +1,6 @@ /* clang-format off */ /* - * SPDX-FileCopyrightText: Copyright (c) 2022-2025, NVIDIA CORPORATION & AFFILIATES. All rights reserved. + * SPDX-FileCopyrightText: Copyright (c) 2022-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ /* clang-format on */ @@ -47,15 +47,15 @@ __global__ void kernel_get_best_insertion_ejection_solution( cuopt_assert(route_id >= 0 || route_id == -1, "Route id from route_id_per_node should be positive or flagged"); - cuopt_assert(route_id < solution.n_routes, "Route id should be smalled than number of routes"); + cuopt_assert(route_id < solution.n_routes, "Route id should be smaller than number of routes"); // Discard deleted requests if (route_id == -1) return; auto& route = solution.routes[route_id]; const auto route_length = route.get_num_nodes(); - cuopt_assert(route_length > 1, "Route length should be greated than one"); - cuopt_assert(intra_pickup_id > 0, "Intra pickup id must be stricly positive"); + cuopt_assert(route_length > 1, "Route length should be greater than one"); + cuopt_assert(intra_pickup_id > 0, "Intra pickup id must be strictly positive"); cuopt_assert(intra_pickup_id < route_length, "Intra pickup id must be inferior to route length"); if constexpr (REQUEST == request_t::PDP) { cuopt_assert(route.requests().is_pickup_node(intra_pickup_id), diff --git a/cpp/src/routing/ges/compute_fragment_ejections.cuh b/cpp/src/routing/ges/compute_fragment_ejections.cuh index 94a051c93..1a53d4567 100644 --- a/cpp/src/routing/ges/compute_fragment_ejections.cuh +++ b/cpp/src/routing/ges/compute_fragment_ejections.cuh @@ -1,6 +1,6 @@ /* clang-format off */ /* - * SPDX-FileCopyrightText: Copyright (c) 2021-2025, NVIDIA CORPORATION & AFFILIATES. All rights reserved. + * SPDX-FileCopyrightText: Copyright (c) 2021-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ /* clang-format on */ @@ -50,7 +50,7 @@ DI i_t fill_to_delete(const typename solution_t::view_t& solu cuopt_assert(BLOCK_SIZE % raft::WarpSize == 0, "Block size should be modulo of warp size"); const auto route_length = route.get_num_nodes(); - cuopt_assert(route_length >= 1, "Route lenght should be stricly positive"); + cuopt_assert(route_length >= 1, "Route length should be strictly positive"); if (intra_pickup_id + fragment_size >= route_length) { // Not enough to delete vrp case @@ -73,7 +73,7 @@ DI i_t fill_to_delete(const typename solution_t::view_t& solu } cuopt_assert(i < route_length, "Intra pickup id can only be smaller than route size"); - cuopt_assert(i > 0, "Intra pickup id can only be stricly positive"); + cuopt_assert(i > 0, "Intra pickup id can only be strictly positive"); if (p_scores != nullptr) p_score += p_scores[node_info.node()]; to_delete[counter] = i; ++counter; @@ -106,7 +106,7 @@ DI i_t fill_to_delete(const typename solution_t::view_t& solu cuopt_assert(BLOCK_SIZE % raft::WarpSize == 0, "Block size should be modulo of warp size"); const auto route_length = route.get_num_nodes(); - cuopt_assert(route_length >= 1, "Route lenght should be stricly positive"); + cuopt_assert(route_length >= 1, "Route length should be strictly positive"); // Check for fragement spanning to large (no looping around) // Range covered goes from intra_pickup_id to intra_pickup_id + blockDim.x @@ -150,7 +150,7 @@ DI i_t fill_to_delete(const typename solution_t::view_t& solu if (route.requests().is_pickup_node(i) && i != route_length) { to_delete[counter] = i; cuopt_assert(i < route_length, "Intra pickup id can only be smaller than route size"); - cuopt_assert(i > 0, "Intra pickup id can only be stricly positive"); + cuopt_assert(i > 0, "Intra pickup id can only be strictly positive"); cuopt_assert(route.requests().is_pickup_node(i), "Node should be pickup"); cuopt_assert(route.get_node(i).request.is_pickup(), "Node should be pickup"); if (p_scores != nullptr) { p_score += p_scores[route.node_id(i)]; } @@ -161,7 +161,7 @@ DI i_t fill_to_delete(const typename solution_t::view_t& solu to_delete[counter] = brother_intra_idx; cuopt_assert(brother_intra_idx < route.get_num_nodes(), "Intra delivery id can only be smaller than route size"); - cuopt_assert(brother_intra_idx > 0, "Intra delivery id can only be stricly positive"); + cuopt_assert(brother_intra_idx > 0, "Intra delivery id can only be strictly positive"); ++counter; } } diff --git a/cpp/src/routing/ges/execute_insertion.cu b/cpp/src/routing/ges/execute_insertion.cu index 50c8d7450..fd1d40174 100644 --- a/cpp/src/routing/ges/execute_insertion.cu +++ b/cpp/src/routing/ges/execute_insertion.cu @@ -1,6 +1,6 @@ /* clang-format off */ /* - * SPDX-FileCopyrightText: Copyright (c) 2022-2025, NVIDIA CORPORATION & AFFILIATES. All rights reserved. + * SPDX-FileCopyrightText: Copyright (c) 2022-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ /* clang-format on */ @@ -159,7 +159,7 @@ __global__ void __launch_bounds__(1024, 1) "Elected route_id should be smaller than number of routes"); auto& orginal_route = solution.routes[route_id]; const auto orginal_route_length = orginal_route.get_num_nodes(); - cuopt_assert(orginal_route_length > 0, "Route length should be stricly positive"); + cuopt_assert(orginal_route_length > 0, "Route length should be strictly positive"); // Load orignal route to shared to first fill ejection pool extern __shared__ i_t shmem[]; diff --git a/cpp/src/routing/ges/lexicographic_search/lexicographic_search.cu b/cpp/src/routing/ges/lexicographic_search/lexicographic_search.cu index 09d635d5c..a3f6b4a3b 100644 --- a/cpp/src/routing/ges/lexicographic_search/lexicographic_search.cu +++ b/cpp/src/routing/ges/lexicographic_search/lexicographic_search.cu @@ -1,6 +1,6 @@ /* clang-format off */ /* - * SPDX-FileCopyrightText: Copyright (c) 2022-2025, NVIDIA CORPORATION & AFFILIATES. All rights reserved. + * SPDX-FileCopyrightText: Copyright (c) 2022-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ /* clang-format on */ @@ -123,7 +123,7 @@ __global__ void lexicographic_search(typename solution_t::vie cuopt_assert(request_id != nullptr, "Request id should not be nullptr"); cuopt_assert(request_id->is_valid(solution.problem.order_info.depot_included), "Request id should be positive"); - cuopt_assert(solution.get_num_orders() > 0, "Number of orders must be stricly positive"); + cuopt_assert(solution.get_num_orders() > 0, "Number of orders must be strictly positive"); // the name is very verbose not to confuse this with node_ids or intra_route_index // this is specifying which position in the 2k + 1 items is the delivery diff --git a/cpp/src/routing/node/pdp_node.cuh b/cpp/src/routing/node/pdp_node.cuh index a0b5c0569..df3aba484 100644 --- a/cpp/src/routing/node/pdp_node.cuh +++ b/cpp/src/routing/node/pdp_node.cuh @@ -1,6 +1,6 @@ /* clang-format off */ /* - * SPDX-FileCopyrightText: Copyright (c) 2021-2025, NVIDIA CORPORATION & AFFILIATES. All rights reserved. + * SPDX-FileCopyrightText: Copyright (c) 2021-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ /* clang-format on */ @@ -25,9 +25,9 @@ struct request_id_t { HDI int& id() { return pickup; } HDI void check([[maybe_unused]] int n_orders) const { - cuopt_assert(pickup >= 0, "pickup id must be stricly positive"); + cuopt_assert(pickup >= 0, "pickup id must be strictly positive"); cuopt_assert(pickup < n_orders, "delivery id must be lower than number of orders"); - cuopt_assert(delivery >= 0, "delivery id must be stricly positive"); + cuopt_assert(delivery >= 0, "delivery id must be strictly positive"); cuopt_assert(delivery < n_orders, "delivery id must be lower than number of orders"); } int pickup{}; @@ -41,7 +41,7 @@ struct request_id_t { HDI int& id() { return pickup_or_delivery; } HDI void check([[maybe_unused]] int n_orders) const { - cuopt_assert(pickup_or_delivery >= 0, "id must be stricly positive"); + cuopt_assert(pickup_or_delivery >= 0, "id must be strictly positive"); cuopt_assert(pickup_or_delivery < n_orders, "id must be lower than number of orders"); } int pickup_or_delivery{}; diff --git a/cpp/src/routing/route/route.cuh b/cpp/src/routing/route/route.cuh index 022a2e5ce..e6367a483 100644 --- a/cpp/src/routing/route/route.cuh +++ b/cpp/src/routing/route/route.cuh @@ -1,6 +1,6 @@ /* clang-format off */ /* - * SPDX-FileCopyrightText: Copyright (c) 2021-2025, NVIDIA CORPORATION & AFFILIATES. All rights reserved. + * SPDX-FileCopyrightText: Copyright (c) 2021-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ /* clang-format on */ @@ -265,7 +265,7 @@ class route_t { int nb_nodes = 1) { cuopt_assert(__popc(__activemask()) == 1, "eject_node should be single threaded"); - cuopt_assert(ejection_idx >= 0, "ejection_idx should be greated than 0"); + cuopt_assert(ejection_idx >= 0, "ejection_idx should be greater than 0"); cuopt_assert(ejection_idx + nb_nodes - 1 < *n_nodes, "ejection_idx should be smaller than n_nodes"); cuopt_assert(*n_nodes >= 1, "Size cannot be smaller than 1"); @@ -294,7 +294,7 @@ class route_t { int nb_nodes = 1) { if (nb_nodes == 0) return; - cuopt_assert(ejection_idx > 0, "ejection_idx should be greated than 0"); + cuopt_assert(ejection_idx > 0, "ejection_idx should be greater than 0"); cuopt_assert(ejection_idx + nb_nodes - 1 < *n_nodes, "ejection_idx should be smaller than n_nodes"); cuopt_assert(*n_nodes >= 1, "Size cannot be smaller than 1"); @@ -339,7 +339,7 @@ class route_t { i_t nb_nodes = 1) { if (nb_nodes == 0) return; - cuopt_assert(insertion_idx >= 0, "insertion_idx should be greated than 0"); + cuopt_assert(insertion_idx >= 0, "insertion_idx should be greater than 0"); // copy to open up space const i_t n_nodes_w_depot = *n_nodes + 1; // copy nodes to be shifted @@ -382,7 +382,7 @@ class route_t { i_t nb_nodes = 1) { cuopt_assert(__popc(__activemask()) == 1, "Insert node should be single threaded"); - cuopt_assert(insertion_idx >= 0, "insertion_idx should be greated than 0"); + cuopt_assert(insertion_idx >= 0, "insertion_idx should be greater than 0"); cuopt_assert(insertion_idx <= *n_nodes, "insertion_idx should be less than n_nodes"); cuopt_assert(*n_nodes + nb_nodes + 1 <= max_nodes_per_route(), "Can not insert more nodes than the max nodes per route"); @@ -591,7 +591,7 @@ class route_t { } copy_fixed_route_data(orig_route, 0, intra_idx, 0); cuopt_assert(intra_idx < delivery_intra_idx, - "Intra pickup and delivery indices should be in stricly increasing order"); + "Intra pickup and delivery indices should be in strictly increasing order"); copy_fixed_route_data(orig_route, intra_idx + 1, delivery_intra_idx, intra_idx); // + 1 to include end depot // Start index : intra_idx + (delivery_intra_idx - intra_idx - 1) @@ -613,7 +613,7 @@ class route_t { cuopt_assert((n_ejections % request_info_t::size()) == 0, "Number of ejection should be even"); cuopt_assert(0 < intra_ejection_indices[0], - "Intra indices should be in stricly increasing order"); + "Intra indices should be in strictly increasing order"); const auto route_length = *orig_route.n_nodes; @@ -628,14 +628,14 @@ class route_t { for (int i = 0; i < n_ejections - 1; ++i) { const i_t curr = intra_ejection_indices[i]; const i_t next = intra_ejection_indices[i + 1]; - cuopt_assert(curr < next, "Intra indices should be in stricly increasing order"); + cuopt_assert(curr < next, "Intra indices should be in strictly increasing order"); copy_fixed_route_data(orig_route, curr + 1, next, curr_size); curr_size += next - curr - 1; } // + 1 to go up to end depot cuopt_assert(intra_ejection_indices[n_ejections - 1] < route_length + 1, - "Intra indices should be in stricly increasing order"); + "Intra indices should be in strictly increasing order"); copy_fixed_route_data( orig_route, intra_ejection_indices[n_ejections - 1] + 1, route_length + 1, curr_size); @@ -738,7 +738,7 @@ class route_t { static DI void compute_forward_in_between(view_t& curr_route, i_t start, i_t end) { cuopt_assert(start >= 0, "Start has to be positive."); - cuopt_assert(end > 0, "End has to be stricly positive."); + cuopt_assert(end > 0, "End has to be strictly positive."); cuopt_assert(end >= start, "End should be bigger than start."); cuopt_assert(start <= curr_route.get_num_nodes(), "Start should be smaller than n_nodes+1."); auto curr_node = curr_route.get_node(start); @@ -759,7 +759,7 @@ class route_t { static DI void compute_backward_in_between(view_t& curr_route, i_t start, i_t end) { cuopt_assert(start >= 0, "Start has to be positive."); - cuopt_assert(end > 0, "End has to be stricly positive."); + cuopt_assert(end > 0, "End has to be strictly positive."); cuopt_assert(end >= start, "End should be bigger than start."); cuopt_assert(end <= curr_route.get_num_nodes(), "End should be smaller than n_nodes+1."); auto curr_node = curr_route.get_node(end); diff --git a/cpp/tests/linear_programming/utilities/pdlp_test_utilities.cuh b/cpp/tests/linear_programming/utilities/pdlp_test_utilities.cuh index 11dbdba4b..a7f414d42 100644 --- a/cpp/tests/linear_programming/utilities/pdlp_test_utilities.cuh +++ b/cpp/tests/linear_programming/utilities/pdlp_test_utilities.cuh @@ -127,7 +127,7 @@ static void test_constraint_sanity( // std::all_of would work but we would need C++23 zip views for (size_t i = 0; i < primal_vars.size(); ++i) { - // Not always stricly true because we apply variable bound clamping on the scaled problem + // Not always strictly true because we apply variable bound clamping on the scaled problem // After unscaling it, the variables might not respect exactly (this adding an epsilon) auto condition = primal_vars[i] >= variable_lower_bounds[i] - epsilon && primal_vars[i] <= variable_upper_bounds[i] + epsilon;