MCPcopy Create free account
hub / github.com/RenderKit/embree / run

Method run

kernels/common/alloc.cpp:48–76  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

46 }
47
48 bool run ()
49 {
50 alloc = make_unique(new FastAllocator(nullptr,false));
51 numFailed.store(0);
52
53 size_t numThreads = getNumberOfLogicalThreads();
54 barrier.init(numThreads+1);
55
56 /* create threads */
57 std::vector<thread_t> threads;
58 for (size_t i=0; i<numThreads; i++)
59 threads.push_back(createThread((thread_func)thread_alloc,this));
60
61 /* run test */
62 for (size_t i=0; i<1000; i++)
63 {
64 alloc->reset();
65 barrier.wait();
66 barrier.wait();
67 }
68
69 /* destroy threads */
70 for (size_t i=0; i<numThreads; i++)
71 join(threads[i]);
72
73 alloc = nullptr;
74
75 return numFailed == 0;
76 }
77 };
78
79 fast_allocator_regression_test fast_allocator_regression;

Callers 2

getPropertyMethod · 0.45
commit_internalMethod · 0.45

Calls 9

createThreadFunction · 0.85
joinFunction · 0.85
make_uniqueFunction · 0.50
storeMethod · 0.45
initMethod · 0.45
push_backMethod · 0.45
resetMethod · 0.45
waitMethod · 0.45

Tested by

no test coverage detected