9 #ifndef __PDG_PROCESSOR_H__
10 #define __PDG_PROCESSOR_H__
116 bool inclusive)
const override;
121 {
return myPriorityType; }
125 {
return myCookType; }
131 return (myServiceStatus ==
132 eServiceStatusStarted);
137 {
return myServiceResetWhen; }
141 {
return myServiceResetType; }
152 void injectStaticItems(
162 PriorityType priority_type)
const;
181 bool has_filter)
override;
232 bool dynamic_inputs)
override;
248 eServiceStatusUnstarted,
251 eServiceStatusStarted,
254 eServiceStatusFailed,
257 eServiceStatusUnused,
262 using ParentMap = UT_ConcurrentHashMap<PDG_WorkItemID, PDG_WorkItemIDMap>;
266 bool workItemsForParent(
272 bool generateFromUpstream(
278 void addInternalDependencies(
292 void setWorkItemLabel(
297 void configureWorkItems(
302 void configureServices();
306 void checkDuplicateOutputs()
const;
309 ParentMap myParentMap;
313 PriorityType myPriorityType;
314 LabelType myLabelType;
315 GenerateWhen myGenerateWhen;
316 CacheMode myCacheMode;
319 ServiceStatus myServiceStatus;
323 mutable UT_Lock myServiceStatusLock;
326 bool myUseScheduleCondition;
PDG_ServiceResetType serviceResetType() const
Returns the reset type for service clients used by this node.
Automatic - checks if the file exists and uses it if it does.
LabelType
Labeling scheme that node can use when generating work item.
virtual PDGE_Dependency::State evalPartial(PDGE_Resolutions &, const PDGE_Evaluator &, PDGE_Dependency *, const Array &)
void addWorkItems(const PDG_WorkItemArray &work_items, const PDG_BatchWorkItemSet &batches, PDG_EvaluationContext::State state, bool sort_items)
virtual bool deserializeWorkItem(PDG_WorkItem *work_item)
State
Evaluation context state.
PriorityType
Prioritization schemes that node can use when generating work items.
virtual PDG_WorkItemCacheState outputCacheState(const PDG_WorkItem *work_item) const
Returns the cache state of a work item in this node.
virtual void clearAllWorkItems()
friend class PDG_Processor
PDG_WorkItemCookType cookType() const
Returns the cook type for work items created by this node.
GenerateWhen
Enumeration of generation conditions.
std::unique_ptr< T, Deleter > UT_UniquePtr
A smart pointer for unique ownership of dynamically allocated objects.
virtual void clearWorkItem(const PDG_WorkItem *work_item)
Generate work items when all inputs work items are generated.
PDG_WorkItemState
Enum of possible work item states.
Inherit the label from the parent item.
PDG_ServiceResetWhen
When service clients should be reset.
virtual PDG_WorkItemState updateOutputCache(PDG_WorkItem *work_item) const
Generate work items when all inputs work items are cooked.
PDG_WorkItemCookType
Enumeration of work item cook types.
GLuint const GLchar * name
Set the priority based on an expression.
virtual bool syncWorkItem(PDG_WorkItem *work_item, const PDG_WorkItem *clone_target)
virtual void addInputDeps(PDG_Node *input_node)
**Note that the tasks the is the thread number *for the or if it s being executed by a non pool thread(this *can happen in cases where the whole pool is occupied and the calling *thread contributes to running the work load).**Thread pool.Have fun
PriorityType prioritizeBy() const
Set the label based on an expression.
bool preCook(PDG_NodeSet &dirty, PDG_NodeSet &visited, bool &save_scene, bool has_filter)
Runs precook logic for this node and recurses into input nodes.
virtual void commitWorkItem(PDG_WorkItem *work_item)
Called after a work item is completely deserialized.
~PDG_Processor() override
virtual bool shouldSchedule(const PDG_WorkItem *work_item) const
Generate work items each time an input work item cooks.
virtual PDGE_Dependency::State evalResolve(PDGE_Resolutions &, const PDGE_Evaluator &, PDGE_Dependency *)
Called when a dependency owned by this object is resolved.
PDG_ServiceResetWhen serviceResetWhen() const
Returns the condition when this node resets service clients.
virtual bool cacheBuiltinParms(PDG_NodeSet &dirty, bool dynamic_inputs)
void resetOwner() override
Resets the owner.
virtual void addWorkItem(PDG_WorkItem *work_item)
Automatic generation mode.
virtual void memoryInfo(PDG_MemoryInfo &memory_info, bool inclusive) const
Returns the memory usage as a PDG_MemoryInfo struct.