dispenso
A library for task parallelism
 
Loading...
Searching...
No Matches
dispenso::BiPropNode Class Reference

#include <graph.h>

Inherits dispenso::Node.

Public Member Functions

 BiPropNode (const BiPropNode &)=delete
 
BiPropNodeoperator= (const BiPropNode &)=delete
 
 BiPropNode (BiPropNode &&other) noexcept
 
template<class... Ns>
void biPropDependsOn (Ns &... nodes)
 
bool isSameSet (const BiPropNode &node) const
 
- Public Member Functions inherited from dispenso::Node
 Node (const Node &)=delete
 
Nodeoperator= (const Node &)=delete
 
 Node (Node &&other) noexcept
 
template<typename... Ns>
void dependsOn (Ns &... nodes)
 
void run () const
 
template<class F >
void forEachDependent (F &&func) const
 
template<class F >
void forEachDependent (F &&func)
 
size_t numPredecessors () const
 
bool isCompleted () const
 
bool setIncomplete () const
 
void setCompleted () const
 

Friends

template<class N >
class SubgraphT
 

Additional Inherited Members

- Protected Member Functions inherited from dispenso::Node
template<class F , class X = std::enable_if_t<!std::is_base_of<Node, F>::value, void>>
 Node (F &&f)
 
void dependsOnOneNode (Node &node)
 
- Protected Attributes inherited from dispenso::Node
std::atomic< size_tnumIncompletePredecessors_
 
size_t numPredecessors_ = 0
 
- Static Protected Attributes inherited from dispenso::Node
static constexpr size_t kCompleted = std::numeric_limits<size_t>::max()
 

Detailed Description

Class to store task with dependencies. Support bidirectional propagation dependency between nodes.

Definition at line 358 of file graph.h.

Constructor & Destructor Documentation

◆ BiPropNode()

dispenso::BiPropNode::BiPropNode ( BiPropNode &&  other)
inlinenoexcept

Definition at line 363 of file graph.h.

Member Function Documentation

◆ biPropDependsOn()

template<class... Ns>
void dispenso::BiPropNode::biPropDependsOn ( Ns &...  nodes)
inline

Make this node depends on nodes. Create bidirectional propagation dependency. This is not concurrency safe.

Parameters
nodespredecessors of the node

Definition at line 372 of file graph.h.

◆ isSameSet()

bool dispenso::BiPropNode::isSameSet ( const BiPropNode node) const
inline

Return true if node belongs to the same propogation set. (That means both nodes after propogation become completed/incomplete together.)

Parameters
nodeto test

Definition at line 381 of file graph.h.

Friends And Related Symbol Documentation

◆ SubgraphT

template<class N >
friend class SubgraphT
friend

Definition at line 402 of file graph.h.


The documentation for this class was generated from the following files: