feat: automatically detect thread count in parallel finder

This commit is contained in:
Michael Mandl 2024-03-20 16:35:57 +01:00
parent ab0613e845
commit 21ca48b9c2
Signed by: mandlm
GPG key ID: 4AA25D647AA54CC7
3 changed files with 13 additions and 13 deletions

View file

@ -10,7 +10,6 @@
#include "word_list_generator.h"
#include <sstream>
#include <thread>
MainWindow::MainWindow(QWidget *parent)
: QMainWindow(parent), ui(new Ui::MainWindow) {
@ -70,8 +69,7 @@ void MainWindow::createSelectedFinder() {
finder_ = std::make_unique<LinearFinder>(word_list_);
break;
case 1:
finder_ = std::make_unique<ParallelFinder>(
word_list_, std::thread::hardware_concurrency());
finder_ = std::make_unique<ParallelFinder>(word_list_);
break;
case 2:
finder_ = std::make_unique<TreeFinder>(word_list_);