]> git.sesse.net Git - stockfish/commitdiff
Write perft(N-1) into cout
authorlucasart <lucas.braesch@gmail.com>
Thu, 7 Aug 2014 13:07:57 +0000 (21:07 +0800)
committerlucasart <lucas.braesch@gmail.com>
Thu, 7 Aug 2014 13:15:05 +0000 (21:15 +0800)
So that one can redirect cout to /dev/null and only print print cerr in the terminal (for more accurate speed
tests).

Suggested by Marco.

No functional change.

src/benchmark.cpp

index de8b48bb4c039f480f45f5e6339b19192b8ab70b..a92a634c615a18c707c4dd6ba53be097a7448d0f 100644 (file)
@@ -145,7 +145,7 @@ void benchmark(const Position& current, istream& is) {
               pos.do_move(*it, si);
               uint64_t cnt = limits.depth > 1 ? Search::perft(pos, (limits.depth - 1) * ONE_PLY) : 1;
               pos.undo_move(*it);
               pos.do_move(*it, si);
               uint64_t cnt = limits.depth > 1 ? Search::perft(pos, (limits.depth - 1) * ONE_PLY) : 1;
               pos.undo_move(*it);
-              cerr << move_to_uci(*it, pos.is_chess960()) << ": " << cnt << endl;
+              cout << move_to_uci(*it, pos.is_chess960()) << ": " << cnt << endl;
               nodes += cnt;
           }
       else
               nodes += cnt;
           }
       else