Fix static analyzer warning in SelfadjointProduct.h.

Fix compiler warnings in GeneralBlockPanelKernel.h.
This commit is contained in:
Rasmus Munk Larsen 2020-06-08 11:48:44 -07:00
parent 1fcaaf460f
commit c4059ffcb6
2 changed files with 3 additions and 3 deletions

View File

@ -2680,14 +2680,14 @@ struct gemm_pack_rhs<Scalar, Index, DataMapper, nr, RowMajor, Conjugate, PanelMo
enum { PacketSize = packet_traits<Scalar>::size,
HalfPacketSize = unpacket_traits<HalfPacket>::size,
QuarterPacketSize = unpacket_traits<QuarterPacket>::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<NumTraits<Scalar>::IsComplex && Conjugate> cj;
Index packet_cols8 = nr>=8 ? (cols/8) * 8 : 0;
Index packet_cols4 = nr>=4 ? (cols/4) * 4 : 0;

View File

@ -111,7 +111,7 @@ struct selfadjoint_product_selector<MatrixType,OtherType,UpLo,false>
Scalar, OtherIsRowMajor ? ColMajor : RowMajor, (!OtherBlasTraits::NeedToConjugate) && NumTraits<Scalar>::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);
}
};