mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-01-24 14:45:14 +08:00
Fixed another compilation problem with TensorIntDiv.h
This commit is contained in:
parent
57154fdb32
commit
f074bb4b5f
@ -33,17 +33,17 @@ namespace {
|
||||
template <typename T>
|
||||
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE int count_leading_zeros(const T val)
|
||||
{
|
||||
#ifndef __CUDA_ARCH__
|
||||
return __builtin_clz(static_cast<uint32_t>(val));
|
||||
#ifdef __CUDA_ARCH__
|
||||
return __clz(val);
|
||||
#elif EIGEN_COMP_MSVC
|
||||
DWORD leading_zero = 0;
|
||||
_BitScanReverse( &leading_zero, value);
|
||||
return 31 - leading_zero;
|
||||
#else
|
||||
return __clz(val);
|
||||
return __builtin_clz(static_cast<uint32_t>(val));
|
||||
#endif
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
struct TensorIntDivisor {
|
||||
|
Loading…
Reference in New Issue
Block a user