Skip to content

Commit

Permalink
Mark time_points as const
Browse files Browse the repository at this point in the history
  • Loading branch information
SSoelvsten committed Aug 7, 2023
1 parent 5fa9ab1 commit 5a5c547
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/queens.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,9 @@ void run_queens(int argc, char** argv)

// ========================================================================
// Initialise package manager
time_point t_init_before = get_timestamp();
const time_point t_init_before = get_timestamp();
adapter_t adapter(N*N);
time_point t_init_after = get_timestamp();
const time_point t_init_after = get_timestamp();
INFO("\n %s initialisation:\n", adapter_t::NAME.c_str());
INFO(" | time (ms): %zu\n", duration_of(t_init_before, t_init_after));

Expand All @@ -105,9 +105,9 @@ void run_queens(int argc, char** argv)
// ========================================================================
// Compute the bdd that represents the entire board
INFO("\n Decision diagram construction:\n");
time_point t1 = get_timestamp();
const time_point t1 = get_timestamp();
typename adapter_t::dd_t res = queens_B(adapter);
time_point t2 = get_timestamp();
const time_point t2 = get_timestamp();

const time_duration construction_time = duration_of(t1,t2);

Expand All @@ -122,9 +122,9 @@ void run_queens(int argc, char** argv)
// ========================================================================
// Count number of solutions
INFO("\n Counting solutions:\n");
time_point t3 = get_timestamp();
const time_point t3 = get_timestamp();
solutions = adapter.satcount(res);
time_point t4 = get_timestamp();
const time_point t4 = get_timestamp();

const time_duration counting_time = duration_of(t3,t4);

Expand Down

0 comments on commit 5a5c547

Please sign in to comment.