We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0ca2972 commit 95375a1Copy full SHA for 95375a1
hwy/contrib/thread_pool/topology.cc
@@ -422,7 +422,8 @@ void SetNodes(std::vector<Topology::LP>& lps) {
422
const auto find = [buf200, &pos](char c) -> size_t {
423
const char* found_ptr = strchr(buf200 + pos, c);
424
if (found_ptr == nullptr) return kNotFound;
425
- const size_t found_pos = found_ptr - buf200;
+ HWY_ASSERT(found_ptr >= buf200 + pos);
426
+ const size_t found_pos = static_cast<size_t>(found_ptr - buf200);
427
HWY_ASSERT(found_pos >= pos && buf200[found_pos] == c);
428
return found_pos;
429
};
0 commit comments