Skip to content

Commit

Permalink
Merge pull request #20938 from charris/backport-20931
Browse files Browse the repository at this point in the history
BUG: Fix missing intrinsics for windows/arm64 target
  • Loading branch information
charris committed Jan 29, 2022
2 parents a796a99 + e3afb6d commit e2b5201
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion numpy/core/src/npymath/npy_math_internal.h.src
Expand Up @@ -887,7 +887,7 @@ npy_popcountu@c@(npy_@type@ a)
/* use built-in popcount if present, else use our implementation */
#if (defined(__clang__) || defined(__GNUC__)) && NPY_BITSOF_@STYPE@ >= 32
return __builtin_popcount@c@(a);
#elif defined(_MSC_VER) && NPY_BITSOF_@STYPE@ >= 16
#elif defined(_MSC_VER) && NPY_BITSOF_@STYPE@ >= 16 && !defined(_M_ARM64) && !defined(_M_ARM)
/* no builtin __popcnt64 for 32 bits */
#if defined(_WIN64) || (defined(_WIN32) && NPY_BITSOF_@STYPE@ != 64)
return TO_BITS_LEN(__popcnt)(a);
Expand Down

0 comments on commit e2b5201

Please sign in to comment.