| 577 | |
| 578 | template <typename LhsScalar, typename RhsScalar, typename SpecType> |
| 579 | void TestSet<LhsScalar, RhsScalar, SpecType>::EvalRuy(TestResultType* result) { |
| 580 | GlobalContext().explicit_tuning = result->tuning; |
| 581 | if (max_num_threads) { |
| 582 | GlobalContext().max_num_threads = max_num_threads; |
| 583 | } else if (benchmark) { |
| 584 | GlobalContext().max_num_threads = 1; |
| 585 | } else { |
| 586 | GlobalContext().max_num_threads = 1 + global_random_engine()() % 8; |
| 587 | } |
| 588 | GlobalContext().SetRuntimeEnabledPaths(result->path); |
| 589 | if (expected_outcome == ExpectedOutcome::kSuccess) { |
| 590 | DoMul(result); |
| 591 | RUY_CHECK(GlobalContext().last_taken_path == result->path); |
| 592 | } else if (expected_outcome == ExpectedOutcome::kDeath) { |
| 593 | // TODO(benoitjacob) TSan and ASan seem to be breaking ASSERT_DEATH. |
| 594 | // Report a bug? |
| 595 | #if (!defined NDEBUG) && (!defined RUY_ASAN) && (!defined RUY_TSAN) |
| 596 | ASSERT_DEATH(DoMul(result), ""); |
| 597 | #endif |
| 598 | } else { |
| 599 | RUY_CHECK(false); |
| 600 | } |
| 601 | GlobalContext().explicit_tuning = Tuning::kAuto; |
| 602 | GlobalContext().max_num_threads = 1; |
| 603 | } |
| 604 | |
| 605 | #ifdef RUY_TEST_EXTERNAL_PATHS |
| 606 |
nothing calls this directly
no test coverage detected