jobgroup.h File Reference

Classes

class  JobGroupInterface
 
class  JobGroupRef
 
class  StaticJobGroupInterface< T >
 
class  StaticJobGroupRef< T >
 
class  StaticJobArray< T >
 

Namespaces

 maxon
 

Enumerations

enum class  JOBGROUPFLAGS {
  DEFAULT ,
  ENQUEUEING_THREAD_WAITS ,
  FINALIZE_ON_WAIT ,
  THREAD_AFFINITY ,
  NO_JOB_DESTRUCTOR
}
 
enum class  STATICJOBGROUPFLAGS {
  DEFAULT ,
  WILL_RUN_FINALIZER ,
  ENQUEUEING_THREAD_WAITS ,
  THREAD_AFFINITY ,
  NO_JOB_DESTRUCTOR
}
 
enum class  STATICJOBARRAYFLAGS {
  DEFAULT ,
  INITIALIZE_LATER
}
 

Functions

enum maxon::JOBGROUPFLAGS MAXON_ENUM_FLAGS (JOBGROUPFLAGS)
 
enum maxon::STATICJOBGROUPFLAGS MAXON_ENUM_FLAGS (STATICJOBGROUPFLAGS)
 
enum maxon::STATICJOBARRAYFLAGS MAXON_ENUM_FLAGS (STATICJOBARRAYFLAGS)
 

Variables

 DEFAULT
 
 ENQUEUEING_THREAD_WAITS
 
 FINALIZE_ON_WAIT
 
 THREAD_AFFINITY
 
 NO_JOB_DESTRUCTOR
 
 WILL_RUN_FINALIZER
 
 INITIALIZE_LATER
 

Variable Documentation

◆ DEFAULT

DEFAULT

Default case.

Default behaviour: Array is empty.

Safe default case.

◆ ENQUEUEING_THREAD_WAITS

ENQUEUEING_THREAD_WAITS

The enqueuing thread waits until the group has finished and might be used to execute jobs.

◆ FINALIZE_ON_WAIT

FINALIZE_ON_WAIT

After Enqueue() further Add()s can be made which start the jobs ASAP. A following call to Wait() or GetResult() finalizes the group (no more jobs can be added). Can be useful if there is a lot of setup work before a job can be added.

◆ THREAD_AFFINITY

THREAD_AFFINITY

On Enqueue() each jobs is permanently assigned to a worker thread. This blocks load balancing and is therefore slower and only useful for special cases. If a group with thread affinity had more jobs than the queue had threads its jobs must not have dependencies or wait calls. Only supported for queues where thread affinity has been enabled.

On Enqueue() each jobs is permanently assigned to a worker thread. This blocks load balancing and therefore slower and only useful for special cases.

◆ NO_JOB_DESTRUCTOR

NO_JOB_DESTRUCTOR

The individual jobs do not require destruction.

◆ WILL_RUN_FINALIZER

WILL_RUN_FINALIZER

A single-threaded finalizer will run after waiting for the group.

◆ INITIALIZE_LATER

INITIALIZE_LATER

Array consists of as many uninitialized elements as it has capacity. The caller will construct them later on (before it is added to the group).