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;
234 bool dynamic_inputs)
override;
250 eServiceStatusUnstarted,
253 eServiceStatusStarted,
256 eServiceStatusFailed,
259 eServiceStatusUnused,
264 using ParentMap = UT_ConcurrentHashMap<PDG_WorkItemID, PDG_WorkItemIDMap>;
268 bool workItemsForParent(
274 bool generateFromUpstream(
280 void addInternalDependencies(
294 void setWorkItemLabel(
299 void configureWorkItems(
304 void configureServices();
308 void checkDuplicateOutputs()
const;
311 ParentMap myParentMap;
315 PriorityType myPriorityType;
316 LabelType myLabelType;
317 GenerateWhen myGenerateWhen;
318 CacheMode myCacheMode;
321 ServiceStatus myServiceStatus;
325 mutable UT_Lock myServiceStatusLock;
328 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.
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.
virtual bool cacheBuiltinParms(PDG_NodeSet &dirty, int num_inputs, bool dynamic_inputs)