Windows platform: fixed ARM compilation issue
assiduous
2 years ago
107 | 107 | |
108 | 108 | inline static Diligent::Uint32 CountOneBits(Diligent::Uint32 Val) |
109 | 109 | { |
110 | #if _M_ARM | |
111 | auto Bits = _CountOneBits(Val); | |
112 | #else | |
110 | 113 | auto Bits = __popcnt(Val); |
114 | #endif | |
111 | 115 | VERIFY_EXPR(Bits == BasicPlatformMisc::CountOneBits(Val)); |
112 | 116 | return Bits; |
113 | 117 | } |
114 | 118 | |
115 | 119 | inline static Diligent::Uint32 CountOneBits(Diligent::Uint64 Val) |
116 | 120 | { |
117 | #if _WIN64 | |
121 | #if _M_ARM | |
122 | auto Bits = _CountOneBits64(Val); | |
123 | #elif _WIN64 | |
118 | 124 | auto Bits = __popcnt64(Val); |
119 | 125 | #else |
120 | 126 | auto Bits = |