fix compilation issue for openmp on windows (#20312)

* fix compilation issue for openmp on windows

* update based on suggestions
This commit is contained in:
Fang Xu 2023-10-23 16:48:51 +05:30 committed by GitHub
parent b67cff7cd5
commit 5e017dc5d2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -397,7 +397,7 @@ struct CPUStreamsExecutor::Impl {
auto numaNodes = get_available_numa_nodes();
if (_config._streams != 0) {
std::copy_n(std::begin(numaNodes),
std::min(static_cast<std::size_t>(_config._streams), numaNodes.size()),
std::min<std::size_t>(_config._streams, numaNodes.size()),
std::back_inserter(_usedNumaNodes));
} else {
_usedNumaNodes = numaNodes;