parallel_for now creates jobs in reverse order

this is because the JobSystem's queue works as a LIFO, by creating
jobs in reverse (memory) order, we attempt to help streaming to
the d-cache on that threads -- until the point where
jobs are stolen. 

we also execute the last job immediately instead of creating a job
for it -- since we're already in a job.
This commit is contained in:
Mathias Agopian
2019-07-08 18:24:11 -07:00
committed by Mathias Agopian
parent 8170ca7cd1
commit 665703dbd8
2 changed files with 22 additions and 19 deletions

View File

@@ -386,6 +386,10 @@ void JobSystem::release(JobSystem::Job*& job) noexcept {
job = nullptr;
}
void JobSystem::signal() noexcept {
wake();
}
void JobSystem::run(JobSystem::Job*& job, uint32_t flags) noexcept {
HEAVY_SYSTRACE_CALL();