MCPcopy Create free account
hub / github.com/davisking/dlib / test_parallel_for2

Function test_parallel_for2

dlib/test/parallel_for.cpp:56–71  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

54 }
55
56 void test_parallel_for2(long start)
57 {
58 std::vector<int> vect(200,0);
59
60 assign_element temp(vect);
61 parallel_for(4, start, vect.size(), temp, &assign_element::go);
62
63 for (long i = 0; i < start; ++i)
64 {
65 DLIB_TEST(vect[i] == 0);
66 }
67 for (long i = start; i < (long)vect.size(); ++i)
68 {
69 DLIB_TEST(vect[i] == i);
70 }
71 }
72
73 struct parfor_test_helper
74 {

Callers 1

perform_testMethod · 0.85

Calls 2

parallel_forFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected