From 19f538c550f55c5154b768a26764e61d9925354f Mon Sep 17 00:00:00 2001 From: slaren Date: Mon, 15 May 2023 04:24:26 +0200 Subject: [PATCH] Add spaces to maintain consistent formatting --- examples/common.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/common.cpp b/examples/common.cpp index bedbebb28..259880a7c 100644 --- a/examples/common.cpp +++ b/examples/common.cpp @@ -31,18 +31,18 @@ int32_t get_num_physical_cores() { #ifdef __linux__ // enumerate the set of thread siblings, num entries is num cores std::unordered_set siblings; - for(uint32_t cpu=0; cpu < UINT32_MAX; ++cpu) { + for (uint32_t cpu=0; cpu < UINT32_MAX; ++cpu) { std::ifstream thread_siblings("/sys/devices/system/cpu" + std::to_string(cpu) + "/topology/thread_siblings"); - if(!thread_siblings.is_open()) { + if (!thread_siblings.is_open()) { break; // no more cpus } std::string line; - if(std::getline(thread_siblings, line)) { + if (std::getline(thread_siblings, line)) { siblings.insert(line); } } - if(siblings.size() > 0) { + if (siblings.size() > 0) { return static_cast(siblings.size()); } #elif defined(__APPLE__) && defined(__MACH__)