From f074bb4b5f6ddf0a67348365499a5c5c335a5e17 Mon Sep 17 00:00:00 2001 From: Benoit Steiner Date: Thu, 26 Feb 2015 11:14:23 -0800 Subject: [PATCH] Fixed another compilation problem with TensorIntDiv.h --- unsupported/Eigen/CXX11/src/Tensor/TensorIntDiv.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorIntDiv.h b/unsupported/Eigen/CXX11/src/Tensor/TensorIntDiv.h index 535abd6fd..11c7ce443 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorIntDiv.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorIntDiv.h @@ -33,17 +33,17 @@ namespace { template EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE int count_leading_zeros(const T val) { -#ifndef __CUDA_ARCH__ - return __builtin_clz(static_cast(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(val)); #endif } -}; +} template struct TensorIntDivisor {