Skip to content

Commit

Permalink
Refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
kimwalisch committed Feb 12, 2024
1 parent dc18f75 commit 3692c11
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/app/stressTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
///

#include <primesieve/iterator.hpp>
#include <primesieve/macros.hpp>
#include <primesieve/PrimeSieve.hpp>
#include <primesieve/Vector.hpp>
#include "CmdOptions.hpp"
Expand Down Expand Up @@ -149,8 +148,7 @@ void stressTest(const CmdOptions& opts)
// same time, which allows us to more effectively limit the status
// output (print results of a different thread every 10 secs).
uint64_t dist = primeCounts.size() / threads;
dist += (dist % 2 == 0);
ASSERT(dist >= 1 && dist % 2 == 1);
dist = std::max((uint64_t) 1, dist);
uint64_t startIndex = 1 + (dist * threadId) % primeCounts.size();

// The thread keeps on running forever. It only stops if
Expand Down

0 comments on commit 3692c11

Please sign in to comment.