From c4059ffcb6763be9108f050df9ef179f4bbbfa73 Mon Sep 17 00:00:00 2001 From: Rasmus Munk Larsen Date: Mon, 8 Jun 2020 11:48:44 -0700 Subject: [PATCH] Fix static analyzer warning in SelfadjointProduct.h. Fix compiler warnings in GeneralBlockPanelKernel.h. --- Eigen/src/Core/products/GeneralBlockPanelKernel.h | 4 ++-- Eigen/src/Core/products/SelfadjointProduct.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Eigen/src/Core/products/GeneralBlockPanelKernel.h b/Eigen/src/Core/products/GeneralBlockPanelKernel.h index afef6762f..a24b452cd 100644 --- a/Eigen/src/Core/products/GeneralBlockPanelKernel.h +++ b/Eigen/src/Core/products/GeneralBlockPanelKernel.h @@ -2680,14 +2680,14 @@ struct gemm_pack_rhs::size, HalfPacketSize = unpacket_traits::size, QuarterPacketSize = unpacket_traits::size}; - bool HasHalf = (int)HalfPacketSize < (int)PacketSize; - bool HasQuarter = (int)QuarterPacketSize < (int)HalfPacketSize; EIGEN_DONT_INLINE void operator()(Scalar* blockB, const DataMapper& rhs, Index depth, Index cols, Index stride=0, Index offset=0) { EIGEN_ASM_COMMENT("EIGEN PRODUCT PACK RHS ROWMAJOR"); EIGEN_UNUSED_VARIABLE(stride); EIGEN_UNUSED_VARIABLE(offset); eigen_assert(((!PanelMode) && stride==0 && offset==0) || (PanelMode && stride>=depth && offset<=stride)); + const bool HasHalf = (int)HalfPacketSize < (int)PacketSize; + const bool HasQuarter = (int)QuarterPacketSize < (int)HalfPacketSize; conj_if::IsComplex && Conjugate> cj; Index packet_cols8 = nr>=8 ? (cols/8) * 8 : 0; Index packet_cols4 = nr>=4 ? (cols/4) * 4 : 0; diff --git a/Eigen/src/Core/products/SelfadjointProduct.h b/Eigen/src/Core/products/SelfadjointProduct.h index 61e8894e7..a21be8050 100644 --- a/Eigen/src/Core/products/SelfadjointProduct.h +++ b/Eigen/src/Core/products/SelfadjointProduct.h @@ -111,7 +111,7 @@ struct selfadjoint_product_selector Scalar, OtherIsRowMajor ? ColMajor : RowMajor, (!OtherBlasTraits::NeedToConjugate) && NumTraits::IsComplex, IsRowMajor ? RowMajor : ColMajor, MatrixType::InnerStrideAtCompileTime, UpLo> ::run(size, depth, - &actualOther.coeffRef(0,0), actualOther.outerStride(), &actualOther.coeffRef(0,0), actualOther.outerStride(), + actualOther.data(), actualOther.outerStride(), actualOther.data(), actualOther.outerStride(), mat.data(), mat.innerStride(), mat.outerStride(), actualAlpha, blocking); } };