X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fmisc.cpp;fp=src%2Fmisc.cpp;h=b46786dff08e0e98badfbbe1373a08d3979c8432;hp=294b7c8f85b78381748cdc55929742ade02c6e92;hb=e4b7403f127a36a35bbace9f833ab43babd98a6c;hpb=c9977aa0a89c83bf21651bffd3b6f10c344ccc46 diff --git a/src/misc.cpp b/src/misc.cpp index 294b7c8f..b46786df 100644 --- a/src/misc.cpp +++ b/src/misc.cpp @@ -515,7 +515,7 @@ int best_node(size_t idx) { if (!fun1) return -1; - // First call to GetLogicalProcessorInformationEx() to get returnLength. + // First call to GetLogicalProcessorInformationEx() to get returnLength. // We expect the call to fail due to null buffer. if (fun1(RelationAll, nullptr, &returnLength)) return -1; @@ -589,13 +589,13 @@ void bindThisThread(size_t idx) { if (!fun2 || !fun3) return; - if (!fun4 || !fun5) + if (!fun4 || !fun5) { GROUP_AFFINITY affinity; if (fun2(node, &affinity)) // GetNumaNodeProcessorMaskEx fun3(GetCurrentThread(), &affinity, nullptr); // SetThreadGroupAffinity - } - else + } + else { // If a numa node has more than one processor group, we assume they are // sized equal and we spread threads evenly across the groups.