mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
fix errors in windows builds and tests
This commit is contained in:
@@ -126,12 +126,12 @@ void homogeneous(void) {
|
||||
}
|
||||
|
||||
{
|
||||
const Eigen::PermutationMatrix<Size> P{Eigen::Vector<int, Size>::EqualSpaced(0, 1)};
|
||||
const auto right = Eigen::Vector<Scalar, Size - 1>::Random().eval().homogeneous();
|
||||
const auto left = Eigen::RowVector<Scalar, Size - 1>::Random().eval().homogeneous();
|
||||
PermutationMatrix<Size> P{Vector<int, Size>::EqualSpaced(0, 1).reverse()};
|
||||
auto right = Vector<Scalar, Size - 1>::Random().eval().nestByValue().homogeneous();
|
||||
auto left = RowVector<Scalar, Size - 1>::Random().eval().nestByValue().homogeneous();
|
||||
|
||||
VERIFY_IS_APPROX(P * right, P * right.eval());
|
||||
VERIFY_IS_APPROX(left * P, left.eval() * P);
|
||||
VERIFY_IS_APPROX(P * right, right.reverse());
|
||||
VERIFY_IS_APPROX(left * P, left.reverse());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -352,7 +352,7 @@ void test_cref_move_ctor(const DenseBase<Derived> &expr) {
|
||||
const double *data1 = cref1.data(), *obj_data1 = static_cast<CRefDerived &>(cref1).m_object.data();
|
||||
VERIFY(test_is_equal(data1, obj_data1, owns_data));
|
||||
CRef cref2(std::move(cref1));
|
||||
VERIFY_IS_EQUAL(data1, cref1.data());
|
||||
VERIFY_IS_EQUAL(std::uintptr_t(data1), std::uintptr_t(cref1.data()));
|
||||
const double *data2 = cref2.data(), *obj_data2 = static_cast<CRefDerived &>(cref2).m_object.data();
|
||||
VERIFY(test_is_equal(data1, data2, MatrixType::MaxSizeAtCompileTime == Dynamic || !owns_data));
|
||||
VERIFY(test_is_equal(data1, obj_data2, MatrixType::MaxSizeAtCompileTime == Dynamic && owns_data));
|
||||
|
||||
Reference in New Issue
Block a user