File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -3436,6 +3436,11 @@ uint32_t BitOperations::Log2(uint64_t value)
34363436// Return Value:
34373437// The population count (number of bits set) of value
34383438//
3439+ #if defined(_MSC_VER)
3440+ // Disable optimizations for PopCount to avoid the compiler from generating intrinsics
3441+ // not supported on all platforms.
3442+ #pragma optimize("", off)
3443+ #endif // _MSC_VER
34393444uint32_t BitOperations::PopCount (uint32_t value)
34403445{
34413446#if defined(_MSC_VER)
@@ -3488,6 +3493,9 @@ uint32_t BitOperations::PopCount(uint64_t value)
34883493 return static_cast <uint32_t >(result);
34893494#endif
34903495}
3496+ #if defined(_MSC_VER)
3497+ #pragma optimize("", on)
3498+ #endif // _MSC_VER
34913499
34923500// ------------------------------------------------------------------------
34933501// BitOperations::ReverseBits: Reverses the bits in an integer value
You can’t perform that action at this time.
0 commit comments