]> git.sesse.net Git - stockfish/blobdiff - src/benchmark.cpp
Teach 'bench' to run current position
[stockfish] / src / benchmark.cpp
index c31609bbf090589f05fe5356813cc7e39444b100..0417313cbb6bf3ac22ba5733cd77bda68fc3212f 100644 (file)
@@ -83,8 +83,14 @@ void benchmark(istringstream& is) {
   else
       limits.depth = atoi(limit.c_str());
 
-  if (fenFile != "default")
+  if (fenFile == "current")
   {
+      fens.clear();
+      fens.push_back(Search::RootPosition.to_fen());
+  }
+  else if (fenFile != "default")
+  {
+      fens.clear();
       string fen;
       ifstream file(fenFile.c_str());
 
@@ -106,7 +112,7 @@ void benchmark(istringstream& is) {
 
   for (size_t i = 0; i < fens.size(); i++)
   {
-      Position pos(fens[i], false, 0);
+      Position pos(fens[i], false, Threads.main_thread());
 
       cerr << "\nPosition: " << i + 1 << '/' << fens.size() << endl;