diff --git a/vtkm/Math.h b/vtkm/Math.h index ed22ace2f..79cfd3709 100644 --- a/vtkm/Math.h +++ b/vtkm/Math.h @@ -2890,7 +2890,7 @@ vtkm::Int32 CountSetBits(vtkm::UInt32 word) return __builtin_popcount(word); -# elif defined(VTKM_MSVC) +# elif defined(VTKM_MSVC) && !defined(_M_ARM64) return static_cast(__popcnt(word)); @@ -2932,7 +2932,7 @@ vtkm::Int32 CountSetBits(vtkm::UInt64 word) return __builtin_popcountll(word); -# elif defined(VTKM_MSVC) +# elif defined(VTKM_MSVC) && !defined(_M_ARM64) return static_cast(__popcnt64(word)); diff --git a/vtkm/Math.h.in b/vtkm/Math.h.in index 65125c6db..a5bd61837 100644 --- a/vtkm/Math.h.in +++ b/vtkm/Math.h.in @@ -1492,7 +1492,7 @@ vtkm::Int32 CountSetBits(vtkm::UInt32 word) return __builtin_popcount(word); -# elif defined(VTKM_MSVC) +# elif defined(VTKM_MSVC) && !defined(_M_ARM64) return static_cast(__popcnt(word)); @@ -1534,7 +1534,7 @@ vtkm::Int32 CountSetBits(vtkm::UInt64 word) return __builtin_popcountll(word); -# elif defined(VTKM_MSVC) +# elif defined(VTKM_MSVC) && !defined(_M_ARM64) return static_cast(__popcnt64(word));