mirror of
https://github.com/opencv/opencv.git
synced 2025-06-09 18:43:05 +08:00
Merge pull request #12749 from powderluv:fix-clang-cl-tzcnt
This commit is contained in:
commit
aeec6e43eb
@ -368,6 +368,9 @@ inline unsigned int trailingZeros32(unsigned int value) {
|
|||||||
unsigned long index = 0;
|
unsigned long index = 0;
|
||||||
_BitScanForward(&index, value);
|
_BitScanForward(&index, value);
|
||||||
return (unsigned int)index;
|
return (unsigned int)index;
|
||||||
|
#elif defined(__clang__)
|
||||||
|
// clang-cl doesn't export _tzcnt_u32 for non BMI systems
|
||||||
|
return value ? __builtin_ctz(value) : 32;
|
||||||
#else
|
#else
|
||||||
return _tzcnt_u32(value);
|
return _tzcnt_u32(value);
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user