feat: automatically detect thread count in parallel finder
This commit is contained in:
parent
ab0613e845
commit
21ca48b9c2
3 changed files with 13 additions and 13 deletions
|
@ -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_);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue