From 232c0c3523c9321cdcb258c2114ae21c8436efdc Mon Sep 17 00:00:00 2001 From: fireice-uk Date: Tue, 18 Jul 2017 23:24:48 +0100 Subject: [PATCH] Fix cacheHashes calc --- autoAdjustHwloc.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoAdjustHwloc.hpp b/autoAdjustHwloc.hpp index f6711fb..92a668a 100644 --- a/autoAdjustHwloc.hpp +++ b/autoAdjustHwloc.hpp @@ -156,7 +156,7 @@ private: cores.reserve(16); findChildrenByType(obj, HWLOC_OBJ_CORE, [&cores](hwloc_obj_t found) { cores.emplace_back(found); } ); - size_t cacheHashes = (cacheSize + hashSize/2u - 1) / hashSize; + size_t cacheHashes = (cacheSize + hashSize/2) / hashSize; //Firstly allocate PU 0 of every CORE, then PU 1 etc. size_t pu_id = 0;