MCPcopy Create free account
hub / github.com/Derious/cuMPC / test_product

Function test_product

dependence/eigen-3.4.0/test/half_float.cpp:322–335  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

320}
321
322void 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
337EIGEN_DECLARE_TEST(half_float)
338{

Callers 1

EIGEN_DECLARE_TESTFunction · 0.70

Calls 1

noaliasMethod · 0.80

Tested by

no test coverage detected