Implementation of a JobSystem without threads, runs jobs as soon as they are added.  
 More...
#include <JobSystemSingleThreaded.h>
 | 
| JPH_OVERRIDE_NEW_DELETE  | JobSystemSingleThreaded ()=default | 
|   | Constructor.  More...
  | 
|   | 
|   | JobSystemSingleThreaded (uint inMaxJobs) | 
|   | 
| void  | Init (uint inMaxJobs) | 
|   | 
| virtual int  | GetMaxConcurrency () const override | 
|   | Get maximum number of concurrently executing jobs.  More...
  | 
|   | 
| virtual JobHandle  | CreateJob (const char *inName, ColorArg inColor, const JobFunction &inJobFunction, uint32 inNumDependencies=0) override | 
|   | 
| virtual Barrier *  | CreateBarrier () override | 
|   | Create a new barrier, used to wait on jobs.  More...
  | 
|   | 
| virtual void  | DestroyBarrier (Barrier *inBarrier) override | 
|   | Destroy a barrier when it is no longer used. The barrier should be empty at this point.  More...
  | 
|   | 
| virtual void  | WaitForJobs (Barrier *inBarrier) override | 
|   | Wait for a set of jobs to be finished, note that only 1 thread can be waiting on a barrier at a time.  More...
  | 
|   | 
| virtual  | ~JobSystem ()=default | 
|   | Destructor.  More...
  | 
|   | 
| virtual int  | GetMaxConcurrency () const =0 | 
|   | Get maximum number of concurrently executing jobs.  More...
  | 
|   | 
| virtual JobHandle  | CreateJob (const char *inName, ColorArg inColor, const JobFunction &inJobFunction, uint32 inNumDependencies=0)=0 | 
|   | 
| virtual Barrier *  | CreateBarrier ()=0 | 
|   | Create a new barrier, used to wait on jobs.  More...
  | 
|   | 
| virtual void  | DestroyBarrier (Barrier *inBarrier)=0 | 
|   | Destroy a barrier when it is no longer used. The barrier should be empty at this point.  More...
  | 
|   | 
| virtual void  | WaitForJobs (Barrier *inBarrier)=0 | 
|   | Wait for a set of jobs to be finished, note that only 1 thread can be waiting on a barrier at a time.  More...
  | 
|   | 
|   | NonCopyable ()=default | 
|   | 
|   | NonCopyable (const NonCopyable &)=delete | 
|   | 
| void  | operator= (const NonCopyable &)=delete | 
|   | 
Implementation of a JobSystem without threads, runs jobs as soon as they are added. 
 
◆ AvailableJobs
Array of jobs (fixed size) 
 
 
◆ JobSystemSingleThreaded() [1/2]
◆ JobSystemSingleThreaded() [2/2]
  
  
      
        
          | JobSystemSingleThreaded::JobSystemSingleThreaded  | 
          ( | 
          uint  | 
          inMaxJobs | ) | 
           | 
         
       
   | 
  
inlineexplicit   | 
  
 
 
◆ CreateBarrier()
Create a new barrier, used to wait on jobs. 
Implements JobSystem.
 
 
◆ CreateJob()
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.
 
 
◆ DestroyBarrier()
  
  
      
        
          | void JobSystemSingleThreaded::DestroyBarrier  | 
          ( | 
          Barrier *  | 
          inBarrier | ) | 
           | 
         
       
   | 
  
overridevirtual   | 
  
 
Destroy a barrier when it is no longer used. The barrier should be empty at this point. 
Implements JobSystem.
 
 
◆ FreeJob()
  
  
      
        
          | void JobSystemSingleThreaded::FreeJob  | 
          ( | 
          Job *  | 
          inJob | ) | 
           | 
         
       
   | 
  
overrideprotectedvirtual   | 
  
 
 
◆ GetMaxConcurrency()
  
  
      
        
          | virtual int JobSystemSingleThreaded::GetMaxConcurrency  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inlineoverridevirtual   | 
  
 
Get maximum number of concurrently executing jobs. 
Implements JobSystem.
 
 
◆ Init()
Initialize the job system 
- Parameters
 - 
  
    | inMaxJobs | Max number of jobs that can be allocated at any time  | 
  
   
 
 
◆ QueueJob()
  
  
      
        
          | void JobSystemSingleThreaded::QueueJob  | 
          ( | 
          Job *  | 
          inJob | ) | 
           | 
         
       
   | 
  
overrideprotectedvirtual   | 
  
 
Adds a job to the job queue. 
Implements JobSystem.
 
 
◆ QueueJobs()
  
  
      
        
          | void JobSystemSingleThreaded::QueueJobs  | 
          ( | 
          Job **  | 
          inJobs,  | 
         
        
           | 
           | 
          uint  | 
          inNumJobs  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
overrideprotectedvirtual   | 
  
 
Adds a number of jobs at once to the job queue. 
Implements JobSystem.
 
 
◆ WaitForJobs()
  
  
      
        
          | void JobSystemSingleThreaded::WaitForJobs  | 
          ( | 
          Barrier *  | 
          inBarrier | ) | 
           | 
         
       
   | 
  
overridevirtual   | 
  
 
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.
 
 
◆ mDummyBarrier
Shared barrier since the barrier implementation does nothing. 
 
 
◆ mJobs
The documentation for this class was generated from the following files: