diff --git a/Eigen/src/Core/products/GeneralBlockPanelKernel.h b/Eigen/src/Core/products/GeneralBlockPanelKernel.h index 0efc07b50..fc3a81c63 100644 --- a/Eigen/src/Core/products/GeneralBlockPanelKernel.h +++ b/Eigen/src/Core/products/GeneralBlockPanelKernel.h @@ -1302,7 +1302,13 @@ EIGEN_ALWAYS_INLINE void gebp_micro_panel_impl(GEBPTraits& traits, const DataMap // Double-accumulation trick for 1pX4 path to break FMA dependency chains constexpr bool use_double_accum = (MrPackets == 1 && NrCols == 4); +#ifdef EIGEN_HAS_CXX17_IFCONSTEXPR AccPacketLocal D[use_double_accum ? NrCols : 1]; +#else + // Without if constexpr, we must allocate a larger array to satisfy the + // compiler that D[n] is always in bounds for the use_double_accum path. + AccPacketLocal D[CSize]; +#endif EIGEN_IF_CONSTEXPR(use_double_accum) { for (int n = 0; n < NrCols; ++n) traits.initAcc(D[n]); } diff --git a/unsupported/Eigen/FFT b/unsupported/Eigen/FFT index bca5a3ee1..4b7f2397c 100644 --- a/unsupported/Eigen/FFT +++ b/unsupported/Eigen/FFT @@ -382,7 +382,7 @@ class FFT { defined EIGEN_MKL_DEFAULT inline void inv2(Complex* dst, const Complex* src, int n0, int n1) { m_impl.inv2(dst, src, n0, n1); - if (HasFlag(Unscaled) == false) scale(dst, 1. / (n0 * n1), n0 * n1); + if (HasFlag(Unscaled) == false) scale(dst, Scalar(1) / (n0 * n1), n0 * n1); } #endif