Updated the TensorIntDivisor code to work properly on LLP64 systems

This commit is contained in:
Benoit Steiner 2016-02-08 21:03:59 -08:00
parent 24d291cf16
commit d69946183d

View File

@ -45,8 +45,9 @@ namespace {
} }
return leading_zeros; return leading_zeros;
#else #else
EIGEN_STATIC_ASSERT(sizeof(unsigned long long) == 8, YOU_MADE_A_PROGRAMMING_MISTAKE);
return (sizeof(T) == 8) ? return (sizeof(T) == 8) ?
__builtin_clzl(static_cast<uint64_t>(val)) : __builtin_clzll(static_cast<uint64_t>(val)) :
__builtin_clz(static_cast<uint32_t>(val)); __builtin_clz(static_cast<uint32_t>(val));
#endif #endif
} }