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

Method execute_local_internal

common/tasking/taskschedulerinternal.cpp:75–97  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

73 }
74
75 bool TaskScheduler::TaskQueue::execute_local_internal(Thread& thread, Task* parent)
76 {
77 /* stop if we run out of local tasks or reach the waiting task */
78 if (right == 0 || &tasks[right-1] == parent)
79 return false;
80
81 /* execute task */
82 size_t oldRight = right;
83 tasks[right-1].run_internal(thread);
84 if (right != oldRight) {
85 THROW_RUNTIME_ERROR("you have to wait for spawned subtasks");
86 }
87
88 /* pop task and closure from stack */
89 right--;
90 if (tasks[right].stackPtr != size_t(-1))
91 stackPtr = tasks[right].stackPtr;
92
93 /* also move left pointer */
94 if (left >= right) left.store(right.load());
95
96 return right != 0;
97 }
98
99 dll_export bool TaskScheduler::TaskQueue::execute_local(Thread& thread, Task* parent) {
100 return execute_local_internal(thread,parent);

Callers 3

run_internalMethod · 0.80
waitMethod · 0.80
thread_loopMethod · 0.80

Calls 3

run_internalMethod · 0.80
storeMethod · 0.45
loadMethod · 0.45

Tested by

no test coverage detected