HDK
|
#include <PDG_WorkItemSort.h>
Public Types | |
template<bool Reverse = false> | |
using | Priority = Comparator< PriorityComparator, Reverse > |
Functor that compares two work item references or pointers by priority. More... | |
template<bool Reverse = false> | |
using | Index = Comparator< IndexComparator, Reverse > |
Functor for comparing work items for sorting by index. More... | |
template<bool Reverse = false> | |
using | IndexInput = Comparator< IndexComparator, Reverse, const PDG_NodeArray * > |
Functor for comparing work items for sorting by index and node. More... | |
template<bool Reverse = false> | |
using | Input = Comparator< InputComparator, Reverse, const PDG_NodeArray * > |
template<bool Reverse = false> | |
using | Attribute = Comparator< AttributeComparator, Reverse, const PDG_AttributeEvaluatorCache & > |
Compares work items using an attribute. More... | |
template<bool Reverse = false> | |
using | Frame = Comparator< FrameComparator, Reverse, const PDG_NodeArray * > |
Compars work items using their frame value. More... | |
Static Public Member Functions | |
template<typename Array > | |
static void | sortItems (Array &work_items) |
Sorts the work items based on index, in ascending order. More... | |
template<typename Array > | |
static void | sortItems (Array &work_items, const PDG_Node *target_node, const PDG_WorkItemIDBoolMap *required_items) |
template<typename Array > | |
static void | sortItems (Array &work_items, const PDG_SortOptions &sort_options, const PDG_WorkItemIDBoolMap *required_items, const PDG_NodeArray *inputs) |
Sorts the work items based on a sort options struct. More... | |
Utility functors for sorting work items. All functors can be used for both ascending or descending order, as determined by the "reverse" parameter passed during construction. They default to ascending order for compatibility with the standard C++ std::sort/less-than comparator.
It is also possible to statically create a reversed comparator using the reverse template argument. This is useful when defining datastructures that need to use one of the comparators as a template argument for ordering, e.g. a Priority Queue.
Definition at line 33 of file PDG_WorkItemSort.h.
using PDG_WorkItemSort::Attribute = Comparator< AttributeComparator, Reverse, const PDG_AttributeEvaluatorCache&> |
Compares work items using an attribute.
Definition at line 183 of file PDG_WorkItemSort.h.
using PDG_WorkItemSort::Frame = Comparator<FrameComparator, Reverse, const PDG_NodeArray*> |
Compars work items using their frame value.
Definition at line 187 of file PDG_WorkItemSort.h.
using PDG_WorkItemSort::Index = Comparator<IndexComparator, Reverse> |
Functor for comparing work items for sorting by index.
Definition at line 165 of file PDG_WorkItemSort.h.
using PDG_WorkItemSort::IndexInput = Comparator<IndexComparator, Reverse, const PDG_NodeArray*> |
Functor for comparing work items for sorting by index and node.
Definition at line 170 of file PDG_WorkItemSort.h.
using PDG_WorkItemSort::Input = Comparator<InputComparator, Reverse, const PDG_NodeArray*> |
Functor for comparing work items for sorting by input number. Fallback to index when the input is the same.
Definition at line 176 of file PDG_WorkItemSort.h.
using PDG_WorkItemSort::Priority = Comparator<PriorityComparator, Reverse> |
Functor that compares two work item references or pointers by priority.
Definition at line 161 of file PDG_WorkItemSort.h.
|
inlinestatic |
Sorts the work items based on index, in ascending order.
Definition at line 193 of file PDG_WorkItemSort.h.
|
inlinestatic |
Sorts the work items based on the sort preferences of the specified node
Definition at line 202 of file PDG_WorkItemSort.h.
|
inlinestatic |
Sorts the work items based on a sort options struct.
Definition at line 219 of file PDG_WorkItemSort.h.