/*
Stockfish, a UCI chess playing engine derived from Glaurung 2.1
Copyright (C) 2004-2008 Tord Romstad (Glaurung author)
- Copyright (C) 2008-2010 Marco Costalba, Joona Kiiski, Tord Romstad
+ Copyright (C) 2008-2012 Marco Costalba, Joona Kiiski, Tord Romstad
Stockfish is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
void benchmark(int argc, char* argv[]) {
- vector<Move> searchMoves(1, MOVE_NONE);
vector<string> fenList;
Search::LimitsType limits;
int64_t totalNodes;
string fenFile = argc > 5 ? argv[5] : "default";
string valType = argc > 6 ? argv[6] : "depth";
- Options["Hash"].set_value(ttSize);
- Options["Threads"].set_value(threads);
- Options["OwnBook"].set_value("false");
+ Options["Hash"] = ttSize;
+ Options["Threads"] = threads;
+ Options["OwnBook"] = false;
// Search should be limited by nodes, time or depth ?
if (valType == "nodes")
// Ok, let's start the benchmark !
totalNodes = 0;
- time = get_system_time();
+ time = system_time();
for (size_t i = 0; i < fenList.size(); i++)
{
}
else
{
- Threads.start_thinking(pos, limits, searchMoves, false);
+ Threads.start_thinking(pos, limits, vector<Move>(), false);
totalNodes += Search::RootPosition.nodes_searched();
}
}
- time = get_system_time() - time;
+ time = system_time() - time;
cerr << "\n==============================="
<< "\nTotal time (ms) : " << time