mirror of
https://github.com/opelly27/Stockfish.git
synced 2026-05-20 13:17:44 +00:00
Consistent use of anonymous namespace
Also change `bindThisThread` to match the current code style for function naming. closes https://github.com/official-stockfish/Stockfish/pull/5118 No functional change
This commit is contained in:
+5
-3
@@ -596,14 +596,15 @@ namespace WinProcGroup {
|
||||
|
||||
#ifndef _WIN32
|
||||
|
||||
void bindThisThread(size_t) {}
|
||||
void bind_this_thread(size_t) {}
|
||||
|
||||
#else
|
||||
|
||||
namespace {
|
||||
// Retrieves logical processor information using Windows-specific
|
||||
// API and returns the best node id for the thread with index idx. Original
|
||||
// code from Texel by Peter Österlund.
|
||||
static int best_node(size_t idx) {
|
||||
int best_node(size_t idx) {
|
||||
|
||||
int threads = 0;
|
||||
int nodes = 0;
|
||||
@@ -668,10 +669,11 @@ static int best_node(size_t idx) {
|
||||
// then return -1 and let the OS to decide what to do.
|
||||
return idx < groups.size() ? groups[idx] : -1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Sets the group affinity of the current thread
|
||||
void bindThisThread(size_t idx) {
|
||||
void bind_this_thread(size_t idx) {
|
||||
|
||||
// Use only local variables to be thread-safe
|
||||
int node = best_node(idx);
|
||||
|
||||
Reference in New Issue
Block a user