mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-20 17:16:33 +08:00
Code clean-up
This patch implements some idea by Alain Savard and Mike Whiteley taken from the perpertual renaming/reformatting thread. This is a pure code cleaning patch (so no change in functionality), but I use it as a pretext to correct the bogus bench number that I introduced in the previous commit. Bench: 4413383
This commit is contained in:
@@ -224,11 +224,11 @@ void bindThisThread(size_t) {}
|
||||
|
||||
#else
|
||||
|
||||
/// get_group() retrieves logical processor information using Windows specific
|
||||
/// best_group() retrieves logical processor information using Windows specific
|
||||
/// API and returns the best group id for the thread with index idx. Original
|
||||
/// code from Texel by Peter Österlund.
|
||||
|
||||
int get_group(size_t idx) {
|
||||
int best_group(size_t idx) {
|
||||
|
||||
int threads = 0;
|
||||
int nodes = 0;
|
||||
@@ -299,7 +299,7 @@ int get_group(size_t idx) {
|
||||
void bindThisThread(size_t idx) {
|
||||
|
||||
// Use only local variables to be thread-safe
|
||||
int group = get_group(idx);
|
||||
int group = best_group(idx);
|
||||
|
||||
if (group == -1)
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user