载入中...
搜索中...
未找到
JobSystemThreadPool.h
浏览该文件的文档.
Default JobSystem backend: a dependency-aware scheduler over the existing ThreadPool worker pool.
Definition JobSystemThreadPool.h:24
Job * createJob(JobFunc body) override
Create a paused job (dependencies can be wired, then schedule()).
Definition JobSystemThreadPool.cpp:584
void endFrame() override
End the frame: join outstanding frame jobs and recycle the arena.
Definition JobSystemThreadPool.cpp:644
Job * submitFrame(JobFunc body) override
Create a frame-scoped job and schedule it immediately.
Definition JobSystemThreadPool.cpp:610
Job * parallelFor(int first, int last, ParallelForBody body, int chunk=1) override
Run body over [first, last) in parallel.
Definition JobSystemThreadPool.cpp:602
JobSystemThreadPool & operator=(const JobSystemThreadPool &)=delete
Job * parallelForFrame(int first, int last, ParallelForBody body, int chunk=1) override
Frame-scoped parallel_for; see parallelFor().
Definition JobSystemThreadPool.cpp:628
JobSystemThreadPool(const JobSystemThreadPool &)=delete
TaskGroup * createTaskGroup() override
Create a fork/join task group.
Definition JobSystemThreadPool.cpp:606
int getPendingCount() const override
Number of ready jobs waiting for a worker (approximate).
Definition JobSystemThreadPool.cpp:561
void waitAll() override
Block until every scheduled job has finished.
Definition JobSystemThreadPool.cpp:648
int getOutstandingCount() const override
Number of scheduled jobs that have not finished (approximate).
Definition JobSystemThreadPool.cpp:566
int getWorkerCount() const override
Number of scheduler worker threads.
Definition JobSystemThreadPool.cpp:552
Job * submit(JobFunc body) override
Create a job and schedule it immediately.
Definition JobSystemThreadPool.cpp:571
void stop() override
Stop accepting work and join workers. Idempotent.
Definition JobSystemThreadPool.cpp:668
void schedule(Job *job) override
Kick a paused job so it can run.
Definition JobSystemThreadPool.cpp:589
TaskGroup * createFrameTaskGroup() override
Create a fork/join task group whose children are frame-scoped.
Definition JobSystemThreadPool.cpp:632
bool isRunning() const override
Whether the system is still accepting new jobs.
Definition JobSystemThreadPool.cpp:556
~JobSystemThreadPool() override
Definition JobSystemThreadPool.cpp:522
Job * createFrameJob(JobFunc body) override
Create a paused frame-scoped job.
Definition JobSystemThreadPool.cpp:623
void beginFrame() override
Start a new frame: join leftover frame jobs and recycle the arena.
Definition JobSystemThreadPool.cpp:640
Abstract job scheduler: dependencies, parallel_for, task_group, arena.
Definition JobSystem.h:153
Fork/join group: fork() spawns scheduled children, wait() joins them.
Definition JobSystem.h:106
std::function< void(int first, int last)> ParallelForBody
Body of a parallel_for subrange.
Definition JobSystem.h:22
std::function< void()> JobFunc
A unit of work executed by a JobSystem worker.
Definition JobSystem.h:15
Definition Build.cpp:11