MCPcopy Create free account
hub / github.com/PaddlePaddle/Paddle / TEST

Function TEST

test/cpp/cinn/utils/multi_threading_test.cc:28–35  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

26namespace utils {
27
28TEST(JobDispatcher, SequenceDispatcher) {
29 std::unique_ptr<JobDispatcher> dispatcher =
30 std::make_unique<SequenceDispatcher>(1, 3);
31 ASSERT_EQ(1, dispatcher->Next());
32 ASSERT_EQ(2, dispatcher->Next());
33 // check reach the end
34 ASSERT_EQ(-1, dispatcher->Next());
35}
36
37TEST(parallel_run, Basic) {
38 std::vector<int> results(100, -1);

Callers

nothing calls this directly

Calls 5

parallel_runFunction · 0.85
SequenceDispatcherClass · 0.85
NextMethod · 0.45
sizeMethod · 0.45
assignMethod · 0.45

Tested by

no test coverage detected