mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-09-25 15:53:19 +08:00
synch with main devel branch
This commit is contained in:
commit
97c9445c60
@ -394,7 +394,7 @@ MatrixBase<Derived>::blueNorm() const
|
|||||||
{
|
{
|
||||||
ax = ei_abs(coeff(j));
|
ax = ei_abs(coeff(j));
|
||||||
if(ax > b2) abig += ei_abs2(ax*s2m);
|
if(ax > b2) abig += ei_abs2(ax*s2m);
|
||||||
else if(ax < b2) asml += ei_abs2(ax*s1m);
|
else if(ax < b1) asml += ei_abs2(ax*s1m);
|
||||||
else amed += ei_abs2(ax);
|
else amed += ei_abs2(ax);
|
||||||
}
|
}
|
||||||
if(abig > Scalar(0))
|
if(abig > Scalar(0))
|
||||||
|
@ -208,10 +208,10 @@ struct ei_traits<Product<LhsNested, RhsNested, ProductMode> >
|
|||||||
RhsRowMajor = RhsFlags & RowMajorBit,
|
RhsRowMajor = RhsFlags & RowMajorBit,
|
||||||
|
|
||||||
CanVectorizeRhs = RhsRowMajor && (RhsFlags & PacketAccessBit)
|
CanVectorizeRhs = RhsRowMajor && (RhsFlags & PacketAccessBit)
|
||||||
&& (ColsAtCompileTime % ei_packet_traits<Scalar>::size == 0),
|
&& (ColsAtCompileTime == Dynamic || (ColsAtCompileTime % ei_packet_traits<Scalar>::size) == 0),
|
||||||
|
|
||||||
CanVectorizeLhs = (!LhsRowMajor) && (LhsFlags & PacketAccessBit)
|
CanVectorizeLhs = (!LhsRowMajor) && (LhsFlags & PacketAccessBit)
|
||||||
&& (RowsAtCompileTime % ei_packet_traits<Scalar>::size == 0),
|
&& (RowsAtCompileTime == Dynamic || (RowsAtCompileTime % ei_packet_traits<Scalar>::size) == 0),
|
||||||
|
|
||||||
EvalToRowMajor = RhsRowMajor && (ProductMode==(int)CacheFriendlyProduct ? LhsRowMajor : (!CanVectorizeLhs)),
|
EvalToRowMajor = RhsRowMajor && (ProductMode==(int)CacheFriendlyProduct ? LhsRowMajor : (!CanVectorizeLhs)),
|
||||||
|
|
||||||
|
@ -86,9 +86,11 @@ class ei_compute_matrix_flags
|
|||||||
{
|
{
|
||||||
enum {
|
enum {
|
||||||
row_major_bit = Options&RowMajor ? RowMajorBit : 0,
|
row_major_bit = Options&RowMajor ? RowMajorBit : 0,
|
||||||
inner_max_size = row_major_bit ? MaxCols : MaxRows,
|
inner_max_size = MaxCols==1 ? MaxRows
|
||||||
|
: MaxRows==1 ? MaxCols
|
||||||
|
: row_major_bit ? MaxCols : MaxRows,
|
||||||
is_big = inner_max_size == Dynamic,
|
is_big = inner_max_size == Dynamic,
|
||||||
is_packet_size_multiple = (Cols*Rows) % ei_packet_traits<Scalar>::size == 0,
|
is_packet_size_multiple = Rows==Dynamic || Cols==Dynamic || ((Cols*Rows) % ei_packet_traits<Scalar>::size) == 0,
|
||||||
aligned_bit = (((Options&DontAlign)==0) && (is_big || is_packet_size_multiple)) ? AlignedBit : 0,
|
aligned_bit = (((Options&DontAlign)==0) && (is_big || is_packet_size_multiple)) ? AlignedBit : 0,
|
||||||
packet_access_bit = ei_packet_traits<Scalar>::size > 1 && aligned_bit ? PacketAccessBit : 0
|
packet_access_bit = ei_packet_traits<Scalar>::size > 1 && aligned_bit ? PacketAccessBit : 0
|
||||||
};
|
};
|
||||||
|
@ -277,6 +277,7 @@ Tridiagonalization<MatrixType>::matrixQ(void) const
|
|||||||
Scalar tmp = m_matrix.coeff(i+1,i);
|
Scalar tmp = m_matrix.coeff(i+1,i);
|
||||||
m_matrix.const_cast_derived().coeffRef(i+1,i) = 1;
|
m_matrix.const_cast_derived().coeffRef(i+1,i) = 1;
|
||||||
|
|
||||||
|
// TODO this product could be optimized by processing the submatrix per panel of at least 4 columns
|
||||||
matQ.corner(BottomRight,n-i-1,n-i-1) -=
|
matQ.corner(BottomRight,n-i-1,n-i-1) -=
|
||||||
((m_hCoeffs.coeff(i) * m_matrix.col(i).end(n-i-1)) *
|
((m_hCoeffs.coeff(i) * m_matrix.col(i).end(n-i-1)) *
|
||||||
(m_matrix.col(i).end(n-i-1).adjoint() * matQ.corner(BottomRight,n-i-1,n-i-1)).lazy()).lazy();
|
(m_matrix.col(i).end(n-i-1).adjoint() * matQ.corner(BottomRight,n-i-1,n-i-1)).lazy()).lazy();
|
||||||
|
@ -76,7 +76,8 @@ template<typename MatrixType> void adjoint(const MatrixType& m)
|
|||||||
{
|
{
|
||||||
VERIFY_IS_MUCH_SMALLER_THAN(vzero.norm(), static_cast<RealScalar>(1));
|
VERIFY_IS_MUCH_SMALLER_THAN(vzero.norm(), static_cast<RealScalar>(1));
|
||||||
VERIFY_IS_APPROX(v1.norm(), v1.stableNorm());
|
VERIFY_IS_APPROX(v1.norm(), v1.stableNorm());
|
||||||
VERIFY_IS_APPROX(v1.blueNorm(), v1.stableNorm());
|
// NOTE disabled because it currently compiles for float and double only
|
||||||
|
// VERIFY_IS_APPROX(v1.blueNorm(), v1.stableNorm());
|
||||||
}
|
}
|
||||||
|
|
||||||
// check compatibility of dot and adjoint
|
// check compatibility of dot and adjoint
|
||||||
|
Loading…
x
Reference in New Issue
Block a user