Jolt Physics
A multi core friendly Game Physics Engine
|
Implementation of a JobSystem without threads, runs jobs as soon as they are added. More...
#include <JobSystemSingleThreaded.h>
Classes | |
class | BarrierImpl |
Protected Types | |
using | AvailableJobs = FixedSizeFreeList<Job> |
Array of jobs (fixed size) | |
Protected Member Functions | |
virtual void | QueueJob (Job *inJob) override |
Adds a job to the job queue. | |
virtual void | QueueJobs (Job **inJobs, uint inNumJobs) override |
Adds a number of jobs at once to the job queue. | |
virtual void | FreeJob (Job *inJob) override |
Frees a job. | |
Protected Attributes | |
BarrierImpl | mDummyBarrier |
Shared barrier since the barrier implementation does nothing. | |
AvailableJobs | mJobs |
Additional Inherited Members | |
Public Types inherited from JobSystem | |
using | JobFunction = function<void()> |
Main function of the job. | |
Implementation of a JobSystem without threads, runs jobs as soon as they are added.
|
protected |
Array of jobs (fixed size)
|
default |
Constructor.
|
inlineexplicit |
|
overridevirtual |
Create a new barrier, used to wait on jobs.
Implements JobSystem.
|
overridevirtual |
Create a new job, the job is started immediately if inNumDependencies == 0 otherwise it starts when RemoveDependency causes the dependency counter to reach 0.
Implements JobSystem.
Destroy a barrier when it is no longer used. The barrier should be empty at this point.
Implements JobSystem.
Frees a job.
Implements JobSystem.
Get maximum number of concurrently executing jobs.
Implements JobSystem.
JPH_NAMESPACE_BEGIN void JobSystemSingleThreaded::Init | ( | uint | inMaxJobs | ) |
Initialize the job system
inMaxJobs | Max number of jobs that can be allocated at any time |
Adds a job to the job queue.
Implements JobSystem.
Adds a number of jobs at once to the job queue.
Implements JobSystem.
Wait for a set of jobs to be finished, note that only 1 thread can be waiting on a barrier at a time.
Implements JobSystem.
|
protected |
Shared barrier since the barrier implementation does nothing.
|
protected |