mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-19 08:36:33 +08:00
Move struct RootMove to Search namespace
And directly pass RootMoves instead of SearchMoves to main thread. A class declaration is better suited in a header and slims a bit the fatty search.cpp No functional change. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
@@ -19,7 +19,6 @@
|
||||
|
||||
#include <fstream>
|
||||
#include <iostream>
|
||||
#include <set>
|
||||
#include <vector>
|
||||
|
||||
#include "misc.h"
|
||||
@@ -29,7 +28,6 @@
|
||||
#include "ucioption.h"
|
||||
|
||||
using namespace std;
|
||||
using namespace Search;
|
||||
|
||||
static const char* Defaults[] = {
|
||||
"rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1",
|
||||
@@ -62,7 +60,7 @@ static const char* Defaults[] = {
|
||||
void benchmark(int argc, char* argv[]) {
|
||||
|
||||
vector<string> fens;
|
||||
LimitsType limits;
|
||||
Search::LimitsType limits;
|
||||
int time;
|
||||
int64_t nodes = 0;
|
||||
|
||||
@@ -116,14 +114,14 @@ void benchmark(int argc, char* argv[]) {
|
||||
|
||||
if (valType == "perft")
|
||||
{
|
||||
int64_t cnt = perft(pos, limits.maxDepth * ONE_PLY);
|
||||
int64_t cnt = Search::perft(pos, limits.maxDepth * ONE_PLY);
|
||||
cerr << "\nPerft " << limits.maxDepth << " leaf nodes: " << cnt << endl;
|
||||
nodes += cnt;
|
||||
}
|
||||
else
|
||||
{
|
||||
Threads.start_thinking(pos, limits, set<Move>(), false);
|
||||
nodes += RootPosition.nodes_searched();
|
||||
Threads.start_thinking(pos, limits);
|
||||
nodes += Search::RootPosition.nodes_searched();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user