Skip to content
Open
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions benchmarks/linear_programming/cuopt/initial_problem_check.hpp
Original file line number Diff line number Diff line change
@@ -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 */
Expand Down Expand Up @@ -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)) {
Expand Down
4 changes: 2 additions & 2 deletions cpp/libmps_parser/src/mps_parser.cpp
Original file line number Diff line number Diff line change
@@ -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 */
Expand Down Expand Up @@ -854,7 +854,7 @@ void mps_parser_t<i_t, f_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.
Expand Down
Original file line number Diff line number Diff line change
@@ -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 */
Expand Down Expand Up @@ -1324,7 +1324,7 @@ compute_median(const typename pdlp_restart_strategy_t<i_t, f_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
Expand All @@ -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];
Expand Down Expand Up @@ -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 =
Expand Down Expand Up @@ -1782,7 +1782,7 @@ void pdlp_restart_strategy_t<i_t, f_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,
Expand Down
8 changes: 4 additions & 4 deletions cpp/src/routing/ges/compute_fragment_ejections.cu
Original file line number Diff line number Diff line change
@@ -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 */
Expand Down Expand Up @@ -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),
Expand Down
12 changes: 6 additions & 6 deletions cpp/src/routing/ges/compute_fragment_ejections.cuh
Original file line number Diff line number Diff line change
@@ -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 */
Expand Down Expand Up @@ -50,7 +50,7 @@ DI i_t fill_to_delete(const typename solution_t<i_t, f_t, REQUEST>::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
Expand All @@ -73,7 +73,7 @@ DI i_t fill_to_delete(const typename solution_t<i_t, f_t, REQUEST>::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;
Expand Down Expand Up @@ -106,7 +106,7 @@ DI i_t fill_to_delete(const typename solution_t<i_t, f_t, REQUEST>::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
Expand Down Expand Up @@ -150,7 +150,7 @@ DI i_t fill_to_delete(const typename solution_t<i_t, f_t, REQUEST>::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)]; }
Expand All @@ -161,7 +161,7 @@ DI i_t fill_to_delete(const typename solution_t<i_t, f_t, REQUEST>::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;
}
}
Expand Down
4 changes: 2 additions & 2 deletions cpp/src/routing/ges/execute_insertion.cu
Original file line number Diff line number Diff line change
@@ -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 */
Expand Down Expand Up @@ -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[];
Expand Down
Original file line number Diff line number Diff line change
@@ -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 */
Expand Down Expand Up @@ -123,7 +123,7 @@ __global__ void lexicographic_search(typename solution_t<i_t, f_t, REQUEST>::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
Expand Down
8 changes: 4 additions & 4 deletions cpp/src/routing/node/pdp_node.cuh
Original file line number Diff line number Diff line change
@@ -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 */
Expand All @@ -25,9 +25,9 @@ struct request_id_t<request_t::PDP> {
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{};
Expand All @@ -41,7 +41,7 @@ struct request_id_t<request_t::VRP> {
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{};
Expand Down
22 changes: 11 additions & 11 deletions cpp/src/routing/route/route.cuh
Original file line number Diff line number Diff line change
@@ -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 */
Expand Down Expand Up @@ -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");
Expand Down Expand Up @@ -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");
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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");
Expand Down Expand Up @@ -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)
Expand All @@ -613,7 +613,7 @@ class route_t {
cuopt_assert((n_ejections % request_info_t<i_t, REQUEST>::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;

Expand All @@ -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);

Expand Down Expand Up @@ -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);
Expand All @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Loading