We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7cccd1b commit fdf177dCopy full SHA for fdf177d
1 file changed
hwy/contrib/thread_pool/topology.cc
@@ -1014,7 +1014,9 @@ bool InitCachesWin(Caches& caches) {
1014
if (cr.Type != CacheUnified && cr.Type != CacheData) return;
1015
if (1 <= cr.Level && cr.Level <= 3) {
1016
Cache& c = caches[cr.Level];
1017
- HWY_ASSERT(c.size_kib == 0); // not set yet
+ // If the size is non-zero then we (probably) have already detected this
1018
+ // cache and can skip the CR.
1019
+ if (c.size_kib > 0) return;
1020
c.size_kib = static_cast<uint32_t>(DivByFactor(cr.CacheSize, 1024));
1021
c.bytes_per_line = static_cast<uint16_t>(cr.LineSize);
1022
c.associativity = (cr.Associativity == CACHE_FULLY_ASSOCIATIVE)
0 commit comments