mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-19 00:26:33 +08:00
Let bench to have full defaults arguments
Now stockfish bench' defaults to stockfish bench 128 1 12 default depth that is the most used line (at least by me) No functional change. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
15
src/main.cpp
15
src/main.cpp
@@ -38,13 +38,13 @@
|
||||
using namespace std;
|
||||
|
||||
extern void uci_main_loop();
|
||||
extern void benchmark(const std::string& commandLine);
|
||||
extern void benchmark(int argc, char* argv[]);
|
||||
|
||||
////
|
||||
//// Functions
|
||||
////
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
int main(int argc, char* argv[]) {
|
||||
|
||||
// Disable IO buffering
|
||||
cout.rdbuf()->pubsetbuf(NULL, 0);
|
||||
@@ -71,17 +71,12 @@ int main(int argc, char *argv[]) {
|
||||
}
|
||||
else // Process command line arguments
|
||||
{
|
||||
if (string(argv[1]) != "bench" || argc < 4 || argc > 7)
|
||||
cout << "Usage: stockfish bench <hash size> <threads> "
|
||||
if (string(argv[1]) != "bench" || argc > 7)
|
||||
cout << "Usage: stockfish bench [hash size = 128] [threads = 1] "
|
||||
<< "[limit = 12] [fen positions file = default] "
|
||||
<< "[depth, time, perft or node limited = depth]" << endl;
|
||||
else
|
||||
{
|
||||
string val = argc > 4 ? argv[4] : "12";
|
||||
string fen = argc > 5 ? argv[5] : "default";
|
||||
string lim = argc > 6 ? argv[6] : "depth";
|
||||
benchmark(string(argv[2]) + " " + string(argv[3]) + " " + val + " " + fen + " " + lim);
|
||||
}
|
||||
benchmark(argc, argv);
|
||||
}
|
||||
|
||||
Application::free_resources();
|
||||
|
||||
Reference in New Issue
Block a user