Skip to content

Commit

Permalink
CpuBackend: do not return early if algo changed but threads are same
Browse files Browse the repository at this point in the history
fixes bug where backend did not stop and reinitialize on some systems
between rx/0 and flex or such when thread profiles were the same
  • Loading branch information
Spudz76 committed Aug 21, 2024
1 parent 9236bda commit a13f5a4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/backend/cpu/CpuBackend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ void xmrig::CpuBackend::setJob(const Job &job)
const auto &cpu = d_ptr->controller->config()->cpu();

auto threads = cpu.get(d_ptr->controller->miner(), job.algorithm());
if (!d_ptr->threads.empty() && d_ptr->threads.size() == threads.size() && std::equal(d_ptr->threads.begin(), d_ptr->threads.end(), threads.begin())) {
if (!d_ptr->threads.empty() && d_ptr->threads.size() == threads.size() && std::equal(d_ptr->threads.begin(), d_ptr->threads.end(), threads.begin()) && d_ptr->algo == job.algorithm()) {
return;
}

Expand Down

0 comments on commit a13f5a4

Please sign in to comment.