7 #ifndef PXR_BASE_WORK_TASK_GRAPH_DEFAULT_IMPL_H
8 #define PXR_BASE_WORK_TASK_GRAPH_DEFAULT_IMPL_H
35 template <
typename F,
typename ... Args>
40 task->_SetTaskGraph(
this);
64 _childCount.fetch_add(1, std::memory_order_acquire);
68 return _childCount.fetch_sub(1, std::memory_order_release) - 1;
71 template <
typename F,
typename ... Args>
74 F* obj =
new F{std::forward<Args>(
args)...};
90 _taskGraph = taskGraph;
101 bool _recycle =
false;
104 std::atomic<int> _childCount = 0;
107 template <
typename F,
typename ... Args>
109 return new F{std::forward<Args>(
args)...};
WORK_API void operator()(const int depth=0, WorkTaskGraph_DefaultImpl *const taskGraph=nullptr) const
virtual WORK_API ~BaseTask()
int RemoveChildReference()
#define PXR_NAMESPACE_OPEN_SCOPE
WorkTaskGraph_DefaultImpl & operator=(WorkTaskGraph_DefaultImpl const &)=delete
F * AllocateTask(Args &&...args)
virtual BaseTask * execute()=0
F * AllocateChild(Args &&...args)
~WorkTaskGraph_DefaultImpl() noexcept=default
WorkTaskGraph_DefaultImpl()=default
GLint GLint GLsizei GLsizei GLsizei depth
void _RecycleAsContinuation()
#define PXR_NAMESPACE_CLOSE_SCOPE
**If you just want to fire and args