12 #define VERIFY_TRSM(TRI,XB) { \
13 (XB).setRandom(); ref = (XB); \
14 (TRI).solveInPlace(XB); \
15 VERIFY_IS_APPROX((TRI).toDenseMatrix() * (XB), ref); \
16 (XB).setRandom(); ref = (XB); \
17 (XB) = (TRI).solve(XB); \
18 VERIFY_IS_APPROX((TRI).toDenseMatrix() * (XB), ref); \
21 #define VERIFY_TRSM_ONTHERIGHT(TRI,XB) { \
22 (XB).setRandom(); ref = (XB); \
23 (TRI).transpose().template solveInPlace<OnTheRight>(XB.transpose()); \
24 VERIFY_IS_APPROX((XB).transpose() * (TRI).transpose().toDenseMatrix(), ref.transpose()); \
25 (XB).setRandom(); ref = (XB); \
26 (XB).transpose() = (TRI).transpose().template solve<OnTheRight>(XB.transpose()); \
27 VERIFY_IS_APPROX((XB).transpose() * (TRI).transpose().toDenseMatrix(), ref.transpose()); \
48 VERIFY_TRSM(cmLhs .
template triangularView<Upper>(), cmRhs);
50 VERIFY_TRSM(cmLhs.conjugate().template triangularView<Upper>(), rmRhs);
51 VERIFY_TRSM(cmLhs.adjoint() .template triangularView<Upper>(), rmRhs);
53 VERIFY_TRSM(cmLhs.conjugate().template triangularView<UnitLower>(), cmRhs);
54 VERIFY_TRSM(cmLhs .
template triangularView<UnitUpper>(), rmRhs);
57 VERIFY_TRSM(rmLhs.conjugate().template triangularView<UnitUpper>(), rmRhs);
71 int c = internal::random<int>(0,
cols-1);
80 Map<Matrix<Scalar,Size,Cols,colmajor>,0,
Stride<Dynamic,2> > map1(
buffer.data(),cmRhs.
rows(),cmRhs.
cols(),
Stride<Dynamic,2>(2*cmRhs.
outerStride(),2));
81 Map<Matrix<Scalar,Size,Cols,rowmajor>,0,
Stride<Dynamic,2> > map2(
buffer.data(),rmRhs.
rows(),rmRhs.
cols(),
Stride<Dynamic,2>(2*rmRhs.
outerStride(),2));