mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-07-23 21:34:30 +08:00
Fixed the integer division code on windows
This commit is contained in:
parent
6d30683113
commit
b084133dbf
@ -36,7 +36,13 @@ namespace {
|
||||
#ifdef __CUDA_ARCH__
|
||||
return (sizeof(T) == 8) ? __clzll(val) : __clz(val);
|
||||
#elif EIGEN_COMP_MSVC
|
||||
return (sizeof(T) == 8) ? __lzcnt64(val) : __lzcnt(val);
|
||||
unsigned long index;
|
||||
if (sizeof(T) == 8) {
|
||||
_BitScanReverse64(&index, val);
|
||||
} else {
|
||||
_BitScanReverse(&index, val);
|
||||
}
|
||||
return (sizeof(T) == 8) ? 63 - index : 31 - index;
|
||||
#else
|
||||
EIGEN_STATIC_ASSERT(sizeof(unsigned long long) == 8, YOU_MADE_A_PROGRAMMING_MISTAKE);
|
||||
return (sizeof(T) == 8) ?
|
||||
|
Loading…
x
Reference in New Issue
Block a user