Sorts all of the WorkUnits in the FrameScheduler. More...
#include <frameschedulerworkunits.h>
Inheritance diagram for Mezzanine::Threading::WorkSorter:
Collaboration diagram for Mezzanine::Threading::WorkSorter:Public Member Functions | |
| WorkSorter () | |
| Default constructor. | |
| virtual void | DoWork (DefaultThreadSpecificStorage::Type &CurrentThreadStorage) |
| This usually does nothing, but sometimes it will do a whole bunch of work sorting. More... | |
| virtual Whole | GetSortingFrequency () |
| Check how often this sorts. More... | |
| virtual void | SetSortingFrequency (Whole FramesBetweenSorts) |
| Set how often this actually does work. More... | |
Public Member Functions inherited from Mezzanine::Threading::DefaultWorkUnit | |
| DefaultWorkUnit () | |
| Simple constructor. | |
| virtual | ~DefaultWorkUnit () |
| Virtual destructor, doesn't actually do much. | |
| virtual void | AddDependency (iWorkUnit *NewDependency) |
| Force this WorkUnit to Start after another has completed. More... | |
| virtual void | ClearDependencies () |
| Drop any information about what work units this one depends on. | |
| virtual iWorkUnit * | GetDependency (Whole Index) const |
| This is used to iterate of all the dependencies. More... | |
| virtual Whole | GetDependencyCount () const |
| How many other WorkUnits does this one depend on? More... | |
| virtual Whole | GetDependentCount (FrameScheduler &SchedulerToCount) |
| This returns the count workunits that depend on this work unit. More... | |
| virtual Whole | GetImmediateDependencyCount () const |
| Get the amount of dependencies that directly count on this for access purposes. More... | |
| virtual Whole | GetPerformance () const |
| Get the internal rolling average for querying. More... | |
| virtual RollingAverage< Whole > & | GetPerformanceLog () |
| Get the internal rolling average for querying. More... | |
| virtual RunningState | GetRunningState () const |
| Retrieves the current RunningState of the thread. More... | |
| virtual WorkUnitKey | GetSortingKey (FrameScheduler &SchedulerToCount) |
| Get the sorting metadata. More... | |
| virtual bool | IsEveryDependencyComplete () |
| Check if this WorkUnit could concievably run right now. More... | |
| virtual void | operator() (DefaultThreadSpecificStorage::Type &CurrentThreadStorage) |
| This does everything required to track metadata and log work. More... | |
| virtual void | PrepareForNextFrame () |
| This resets the running state and takes any further action required to use the WorkUnit again. | |
| virtual void | RemoveDependency (iWorkUnit *RemoveDependency) |
| Remove a dependency. More... | |
| virtual RunningState | TakeOwnerShip () |
| Attempts to atomically start the work unit in the current thread. More... | |
Public Member Functions inherited from Mezzanine::Threading::iWorkUnit | |
| virtual | ~iWorkUnit () |
| Virtual destructor. | |
Protected Attributes | |
| Whole | FramesSinceLastSort |
| How long since the last sort? | |
| Whole | SortingFrequency |
| 1 in every this many frames Sorting happens. | |
| std::vector< WorkUnitKey > | WorkUnitsAffinity |
| A freshly sorted WorkUnitsAffinity or an empty vector. | |
| std::vector< WorkUnitKey > | WorkUnitsMain |
| A freshly sorted WorkUnitsMain or an empty vector. | |
Protected Attributes inherited from Mezzanine::Threading::DefaultWorkUnit | |
| Int32 | CurrentRunningState |
| This controls do work with this after it has. | |
| std::vector< iWorkUnit * > | Dependencies |
| A collection of of workunits that must be complete before this one can start. | |
| DefaultRollingAverage< Whole >::Type | PerformanceLog |
| A rolling average of execution times. | |
Friends | |
| class | FrameScheduler |
Sorts all of the WorkUnits in the FrameScheduler.
Definition at line 104 of file frameschedulerworkunits.h.
|
virtual |
This usually does nothing, but sometimes it will do a whole bunch of work sorting.
| CurrentThreadStorage | Just to get a reference to the framescheduler. So the WorkUnits can sorted and passed back to the Scheduler outisde of scheduling. |
Implements Mezzanine::Threading::iWorkUnit.
Definition at line 108 of file frameschedulerworkunits.cpp.
|
virtual |
Check how often this sorts.
Definition at line 137 of file frameschedulerworkunits.cpp.
|
virtual |
Set how often this actually does work.
| FramesBetweenSorts | 1 in every this many frame this will sort the work units. |
Definition at line 134 of file frameschedulerworkunits.cpp.
1.8.9.1. Thanks to the
Open Icon Library
for help with some of the icons.