• Home
  • Raw
  • Download

Lines Matching refs:m4

9   Eigen::Matrix4f m4 = Eigen::Matrix4f::Identity();  in main()  local
11 std::cout << "*** Step 1 ***\nm3:\n" << m3 << "\nm4:\n" << m4 << std::endl; in main()
14 m4.setZero(); in main()
17 std::cout << "*** Step 2 ***\nm3:\n" << m3 << "\nm4:\n" << m4 << std::endl; in main()
20 m4.block<3,3>(0,1) = m3; in main()
21 m3.row(2) = m4.block<1,3>(2,0); in main()
23 std::cout << "*** Step 3 ***\nm3:\n" << m3 << "\nm4:\n" << m4 << std::endl; in main()
28 m4.block(0,1,3,3).setIdentity(); in main()
29 std::cout << "*** Step 4 ***\nm4:\n" << m4 << std::endl; in main()
33 m4.diagonal().block(1,2).setOnes(); in main()
34 std::cout << "*** Step 5 ***\nm4.diagonal():\n" << m4.diagonal() << std::endl; in main()
35 std::cout << "m4.diagonal().start(3)\n" << m4.diagonal().start(3) << std::endl; in main()
38 m4 = m4.cwise()*m4; in main()
40 std::cout << "*** Step 6 ***\nm3:\n" << m3 << "\nm4:\n" << m4 << std::endl; in main()
43 std::cout << "*** Step 7 ***\n m4.sum(): " << m4.sum() << std::endl; in main()
44 std::cout << "m4.col(2).sum(): " << m4.col(2).sum() << std::endl; in main()
45 std::cout << "m4.colwise().sum():\n" << m4.colwise().sum() << std::endl; in main()
46 std::cout << "m4.rowwise().sum():\n" << m4.rowwise().sum() << std::endl; in main()
49 m4 = m4 * m4; // auto-evaluates so no aliasing problem (performance penalty is low) in main()
50 Eigen::Matrix4f other = (m4 * m4).lazy(); // forces lazy evaluation in main()
51 m4 = m4 + m4; // here Eigen goes for lazy evaluation, as with most expressions in main()
52 m4 = -m4 + m4 + 5 * m4; // same here, Eigen chooses lazy evaluation for all that. in main()
53 m4 = m4 * (m4 + m4); // here Eigen chooses to first evaluate m4 + m4 into a temporary. in main()
55 m3 = m3 * m4.block<3,3>(1,1); // here Eigen chooses NOT to evaluate block() into a temporary in main()
58 m4 = m4 * m4.transpose(); // same here, lazy evaluation of the transpose. in main()
59 m4 = m4 * m4.transpose().eval(); // forces immediate evaluation of the transpose in main()
61 std::cout << "*** Step 8 ***\nm3:\n" << m3 << "\nm4:\n" << m4 << std::endl; in main()