| 320 | } |
| 321 | |
| 322 | void test_product() |
| 323 | { |
| 324 | typedef Matrix<half,Dynamic,Dynamic> MatrixXh; |
| 325 | Index rows = internal::random<Index>(1,EIGEN_TEST_MAX_SIZE); |
| 326 | Index cols = internal::random<Index>(1,EIGEN_TEST_MAX_SIZE); |
| 327 | Index depth = internal::random<Index>(1,EIGEN_TEST_MAX_SIZE); |
| 328 | MatrixXh Ah = MatrixXh::Random(rows,depth); |
| 329 | MatrixXh Bh = MatrixXh::Random(depth,cols); |
| 330 | MatrixXh Ch = MatrixXh::Random(rows,cols); |
| 331 | MatrixXf Af = Ah.cast<float>(); |
| 332 | MatrixXf Bf = Bh.cast<float>(); |
| 333 | MatrixXf Cf = Ch.cast<float>(); |
| 334 | VERIFY_IS_APPROX(Ch.noalias()+=Ah*Bh, (Cf.noalias()+=Af*Bf).cast<half>()); |
| 335 | } |
| 336 | |
| 337 | EIGEN_DECLARE_TEST(half_float) |
| 338 | { |
no test coverage detected