From 354660a42caee3356556bc9c0ae68e60b7009d37 Mon Sep 17 00:00:00 2001 From: pratham-mcw Date: Thu, 12 Jun 2025 15:55:37 +0530 Subject: [PATCH] Remove ARM exclusion for __popcnt on MSVC --- modules/bgsegm/src/bgfg_gsoc.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/bgsegm/src/bgfg_gsoc.cpp b/modules/bgsegm/src/bgfg_gsoc.cpp index 0ed67648210..2cc33febfc6 100644 --- a/modules/bgsegm/src/bgfg_gsoc.cpp +++ b/modules/bgsegm/src/bgfg_gsoc.cpp @@ -70,7 +70,7 @@ const float LSBPtau = 0.05f; inline int LSBPDist32(unsigned n) { #if defined(__GNUC__) || defined(__clang__) return __builtin_popcount(n); -#elif defined(_MSC_VER) && !(defined(_M_ARM) || defined(_M_ARM64)) +#elif defined(_MSC_VER) return __popcnt(n); #else // Taken from http://graphics.stanford.edu/~seander/bithacks.html#CountBitsSetParallel