9 #ifndef __PDG_GRAPH_H__
10 #define __PDG_GRAPH_H__
39 static constexpr
int nodeIdBase = 1000000;
42 using IdMap = UT_ConcurrentHashMap<PDG_WorkItemID, PDG_WorkItem*>;
50 int64 getMemoryUsage(
bool inclusive)
const;
55 bool inclusive)
const;
100 void removeAllNodes();
106 {
return myNodeNameMap.size(); }
108 {
return myNodeNameMap; }
149 bool allow_null)
const;
162 void dependencyGraph(
171 void dependencyGraph(
222 void bindGlobalAttribute(
253 {
return mySerialCookLock; }
256 template <
typename Func>
260 auto it = myNodeIdMap.find(
id);
261 if (it != myNodeIdMap.end())
266 template <
typename Func>
275 template <
typename Func>
280 if (myWorkItemIdMap.find(access,
id))
305 IdMap myWorkItemIdMap;
311 int myCacheIdCounter;
virtual bool areAttribFlagsValid(uint16 flags) const
virtual UT_StringHolder attribOwnerName() const
void safeNodeMapAccess(const Func &f) const
Runs a functor on the node map with the node lock held.
UT_UniquePtr< PDG_Node > PDG_NodePtr
Array, set and map of nodes.
IdMap workItemIdMap() const
Returns the map of work item ids -> work item.
const PDG_NodePtrMap & nodes() const
void safeNodeAccess(int id, const Func &f) const
Runs a functor on the specified node with the node lock held.
GLuint GLint GLboolean GLint GLenum access
void safeWorkItemAccess(PDG_WorkItemID id, const Func &f) const
PDG_AttributeCast
Enumeration of attribute cast results.
UT_ConcurrentHashMap< PDG_WorkItemID, PDG_WorkItem * > IdMap
Typedef for work item id -> work item.
void applyDirty(bool remove_outputs)
Applies the stored dirty operation.
A simple class to hold a rwlock and release it when it goes out of scope.
GLuint const GLchar * name
PDG_AttributeFlag
Enumeration of extra attribute flags. Flags can be ORed together.
UT_RWLock & serialCookLock()
**If you just want to fire and args
UT_SharedPtr< PDG_Dependency > PDG_DependencyPtr
Type defs for registered type objects.
virtual bool isAttribFlagValid(PDG_AttributeFlag flag) const
exint PDG_WorkItemID
Type defs for unique work item IDs.
Reader/Writer mutex class.
GLint GLint GLint GLint GLint GLint GLint GLbitfield GLenum filter