mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
more product refactoring
This commit is contained in:
@@ -148,7 +148,6 @@ template<typename Scalar, int Mode> void transformations(void)
|
||||
Transform3 tmat3(mat3), tmat4(mat4);
|
||||
if(Mode!=int(AffineCompact))
|
||||
tmat4.matrix()(3,3) = Scalar(1);
|
||||
std::cerr << tmat3.matrix() << "\n\n" << tmat4.matrix() << "\n\n";
|
||||
VERIFY_IS_APPROX(tmat3.matrix(), tmat4.matrix());
|
||||
|
||||
Scalar a3 = ei_random<Scalar>(-Scalar(M_PI), Scalar(M_PI));
|
||||
|
||||
@@ -65,7 +65,12 @@ template<typename MatrixType> void nomalloc(const MatrixType& m)
|
||||
VERIFY_IS_APPROX((m1+m2)*s1, s1*m1+s1*m2);
|
||||
VERIFY_IS_APPROX((m1+m2)(r,c), (m1(r,c))+(m2(r,c)));
|
||||
VERIFY_IS_APPROX(m1.cwise() * m1.block(0,0,rows,cols), m1.cwise() * m1);
|
||||
VERIFY_IS_APPROX((m1*m1.transpose())*m2, m1*(m1.transpose()*m2));
|
||||
if (MatrixType::RowsAtCompileTime<EIGEN_CACHEFRIENDLY_PRODUCT_THRESHOLD) {
|
||||
// If the matrices are too large, we have better to use the optimized GEMM
|
||||
// routines which allocates temporaries. However, on some platforms
|
||||
// these temporaries are allocated on the stack using alloca.
|
||||
VERIFY_IS_APPROX((m1*m1.transpose())*m2, m1*(m1.transpose()*m2));
|
||||
}
|
||||
}
|
||||
|
||||
void test_nomalloc()
|
||||
|
||||
Reference in New Issue
Block a user