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

Method exitTaskingSystem

kernels/common/device.cpp:389–406  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

387 }
388
389 void Device::exitTaskingSystem()
390 {
391 Lock<MutexSys> lock(g_mutex);
392 g_num_threads_map.erase(this);
393
394 /* terminate tasking system */
395 if (g_num_threads_map.size() == 0) {
396 TaskScheduler::destroy();
397 }
398 /* or configure new number of threads */
399 else {
400 size_t maxNumThreads = getMaxNumThreads();
401 TaskScheduler::create(maxNumThreads,State::set_affinity,State::start_threads);
402 }
403#if USE_TASK_ARENA
404 arena->arena.reset();
405#endif
406 }
407
408 void Device::execute(bool join, const std::function<void()>& func)
409 {

Callers

nothing calls this directly

Calls 4

getMaxNumThreadsFunction · 0.85
createFunction · 0.85
sizeMethod · 0.45
resetMethod · 0.45

Tested by

no test coverage detected