mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-02-23 18:20:47 +08:00
Workaround warning: assuming signed overflow does not occur when...
This commit is contained in:
parent
5108ef01fc
commit
b73baa1ea4
@ -75,6 +75,7 @@ template<typename MatrixType> void cwiseops(const MatrixType& m)
|
|||||||
Index cols = m.cols();
|
Index cols = m.cols();
|
||||||
|
|
||||||
MatrixType m1 = MatrixType::Random(rows, cols),
|
MatrixType m1 = MatrixType::Random(rows, cols),
|
||||||
|
m1bis = m1,
|
||||||
m2 = MatrixType::Random(rows, cols),
|
m2 = MatrixType::Random(rows, cols),
|
||||||
m3(rows, cols),
|
m3(rows, cols),
|
||||||
m4(rows, cols),
|
m4(rows, cols),
|
||||||
@ -164,8 +165,8 @@ template<typename MatrixType> void cwiseops(const MatrixType& m)
|
|||||||
VERIFY( (m1.cwise().max(m2).cwise() > (m1-mones)).all() );
|
VERIFY( (m1.cwise().max(m2).cwise() > (m1-mones)).all() );
|
||||||
|
|
||||||
VERIFY( (m1.cwise()<m1.unaryExpr(bind2nd(plus<Scalar>(), Scalar(1)))).all() );
|
VERIFY( (m1.cwise()<m1.unaryExpr(bind2nd(plus<Scalar>(), Scalar(1)))).all() );
|
||||||
VERIFY( !(m1.cwise()<m1.unaryExpr(bind2nd(minus<Scalar>(), Scalar(1)))).all() );
|
VERIFY( !(m1.cwise()<m1bis.unaryExpr(bind2nd(minus<Scalar>(), Scalar(1)))).all() );
|
||||||
VERIFY( !(m1.cwise()>m1.unaryExpr(bind2nd(plus<Scalar>(), Scalar(1)))).any() );
|
VERIFY( !(m1.cwise()>m1bis.unaryExpr(bind2nd(plus<Scalar>(), Scalar(1)))).any() );
|
||||||
|
|
||||||
cwiseops_real_only(m1, m2, m3, mones);
|
cwiseops_real_only(m1, m2, m3, mones);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user