diff --git a/Eigen/src/Core/arch/AltiVec/MatrixProductMMA.h b/Eigen/src/Core/arch/AltiVec/MatrixProductMMA.h index 37db1a6f1..64f11727f 100644 --- a/Eigen/src/Core/arch/AltiVec/MatrixProductMMA.h +++ b/Eigen/src/Core/arch/AltiVec/MatrixProductMMA.h @@ -212,12 +212,18 @@ template<> EIGEN_STRONG_INLINE void pgerMMA(__vector_quad *acc, const __vector_pair& a, const Packet4f& b) { // Just for compilation + EIGEN_UNUSED_VARIABLE(acc) + EIGEN_UNUSED_VARIABLE(a) + EIGEN_UNUSED_VARIABLE(b) } template<> EIGEN_STRONG_INLINE void pgerMMA(__vector_quad *acc, const __vector_pair& a, const Packet4f& b) { // Just for compilation + EIGEN_UNUSED_VARIABLE(acc) + EIGEN_UNUSED_VARIABLE(a) + EIGEN_UNUSED_VARIABLE(b) } // This is necessary because ploadRhs for double returns a pair of vectors when MMA is enabled. diff --git a/Eigen/src/Core/arch/Default/BFloat16.h b/Eigen/src/Core/arch/Default/BFloat16.h index 81af56a3f..3c0cd39df 100644 --- a/Eigen/src/Core/arch/Default/BFloat16.h +++ b/Eigen/src/Core/arch/Default/BFloat16.h @@ -67,7 +67,7 @@ struct bfloat16 : public bfloat16_impl::bfloat16_base { : bfloat16_impl::bfloat16_base(bfloat16_impl::raw_uint16_to_bfloat16(b ? 0x3f80 : 0)) {} template - explicit EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR bfloat16(const T& val) + explicit EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR bfloat16(T val) : bfloat16_impl::bfloat16_base(bfloat16_impl::float_to_bfloat16_rtne::value>(static_cast(val))) {} explicit EIGEN_DEVICE_FUNC bfloat16(float f) diff --git a/Eigen/src/Core/arch/Default/Half.h b/Eigen/src/Core/arch/Default/Half.h index c91b0ce2f..3779ebc98 100644 --- a/Eigen/src/Core/arch/Default/Half.h +++ b/Eigen/src/Core/arch/Default/Half.h @@ -147,7 +147,7 @@ struct half : public half_impl::half_base { explicit EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR half(bool b) : half_impl::half_base(half_impl::raw_uint16_to_half(b ? 0x3c00 : 0)) {} template - explicit EIGEN_DEVICE_FUNC half(const T& val) + explicit EIGEN_DEVICE_FUNC half(T val) : half_impl::half_base(half_impl::float_to_half_rtne(static_cast(val))) {} explicit EIGEN_DEVICE_FUNC half(float f) : half_impl::half_base(half_impl::float_to_half_rtne(f)) {} diff --git a/test/array_cwise.cpp b/test/array_cwise.cpp index 92abf6968..6a88e0e27 100644 --- a/test/array_cwise.cpp +++ b/test/array_cwise.cpp @@ -25,7 +25,7 @@ void pow_test() { const Scalar denorm_min = std::numeric_limits::denorm_min(); const Scalar min = (std::numeric_limits::min)(); const Scalar max = (std::numeric_limits::max)(); - const Scalar max_exp = (static_cast(std::numeric_limits::max_exponent) * Scalar(EIGEN_LN2)) / eps; + const Scalar max_exp = (static_cast(int(std::numeric_limits::max_exponent)) * Scalar(EIGEN_LN2)) / eps; const static Scalar abs_vals[] = {zero, denorm_min,