ExaTN
Public Member Functions | Protected Attributes | List of all members
exatn::runtime::DirectedBoostGraph Class Reference
Inheritance diagram for exatn::runtime::DirectedBoostGraph:
exatn::runtime::TensorGraph exatn::Identifiable exatn::Cloneable< TensorGraph >

Public Member Functions

 DirectedBoostGraph (const DirectedBoostGraph &)=delete
 
DirectedBoostGraphoperator= (const DirectedBoostGraph &)=delete
 
 DirectedBoostGraph (DirectedBoostGraph &&) noexcept=default
 
DirectedBoostGraphoperator= (DirectedBoostGraph &&) noexcept=default
 
VertexIdType addOperation (std::shared_ptr< TensorOperation > op) override
 
void addDependency (VertexIdType dependent, VertexIdType dependee) override
 
bool dependencyExists (VertexIdType vertex_id1, VertexIdType vertex_id2) override
 
TensorOpNodegetNodeProperties (VertexIdType vertex_id) override
 
std::size_t getNodeDegree (VertexIdType vertex_id) override
 
std::size_t getNumNodes () override
 
std::size_t getNumDependencies () override
 
std::vector< VertexIdType > getNeighborList (VertexIdType vertex_id) override
 
void computeShortestPath (VertexIdType startIndex, std::vector< double > &distances, std::vector< VertexIdType > &paths) override
 
void printIt () override
 
const std::string name () const override
 
const std::string description () const override
 
std::shared_ptr< TensorGraphclone () override
 
- Public Member Functions inherited from exatn::runtime::TensorGraph
 TensorGraph (const TensorGraph &)=delete
 
TensorGraphoperator= (const TensorGraph &)=delete
 
 TensorGraph (TensorGraph &&) noexcept=default
 
TensorGraphoperator= (TensorGraph &&) noexcept=default
 
void setNodeExecuting (VertexIdType vertex_id)
 
void setNodeExecuted (VertexIdType vertex_id, int error_code=0)
 
void setNodeIdle (VertexIdType vertex_id)
 
bool nodeExecuting (VertexIdType vertex_id)
 
bool nodeExecuted (VertexIdType vertex_id, int *error_code=nullptr)
 
std::size_t getTensorUpdateCount (const Tensor &tensor)
 
void registerDependencyFreeNode (VertexIdType node_id)
 
bool extractDependencyFreeNode (VertexIdType *node_id)
 
void registerExecutingNode (VertexIdType node_id)
 
bool extractExecutingNode (VertexIdType *node_id)
 
bool progressFrontNode (VertexIdType node_executed)
 
VertexIdType getFrontNode () const
 
bool hasUnexecutedNodes ()
 
void lock ()
 
void unlock ()
 
- Public Member Functions inherited from exatn::Cloneable< TensorGraph >
virtual ~Cloneable ()
 

Protected Attributes

DirectedGraphType dag_
 
- Protected Attributes inherited from exatn::runtime::TensorGraph
TensorExecState exec_state_
 

Member Function Documentation

◆ addDependency()

void exatn::runtime::DirectedBoostGraph::addDependency ( VertexIdType  dependent,
VertexIdType  dependee 
)
overridevirtual

Adds a directed edge between dependent and dependee DAG nodes: <dependent> depends on <dependee> (dependent –> dependee).

Implements exatn::runtime::TensorGraph.

◆ addOperation()

VertexIdType exatn::runtime::DirectedBoostGraph::addOperation ( std::shared_ptr< TensorOperation op)
overridevirtual

Adds a new node (tensor operation) into the DAG and returns its id.

Implements exatn::runtime::TensorGraph.

◆ clone()

std::shared_ptr<TensorGraph> exatn::runtime::DirectedBoostGraph::clone ( )
inlineoverridevirtual

Clones an empty subclass instance (needed for plugin registry).

Implements exatn::runtime::TensorGraph.

◆ computeShortestPath()

void exatn::runtime::DirectedBoostGraph::computeShortestPath ( VertexIdType  startIndex,
std::vector< double > &  distances,
std::vector< VertexIdType > &  paths 
)
overridevirtual

Computes the shortest path from the start index.

Implements exatn::runtime::TensorGraph.

◆ dependencyExists()

bool exatn::runtime::DirectedBoostGraph::dependencyExists ( VertexIdType  vertex_id1,
VertexIdType  vertex_id2 
)
overridevirtual

Returns TRUE if there is a dependency between two DAG nodes: If vertex_id1 node depends on vertex_id2 node.

Implements exatn::runtime::TensorGraph.

◆ getNeighborList()

std::vector< VertexIdType > exatn::runtime::DirectedBoostGraph::getNeighborList ( VertexIdType  vertex_id)
overridevirtual

Returns the list of nodes connected to the given DAG node.

Implements exatn::runtime::TensorGraph.

◆ getNodeDegree()

std::size_t exatn::runtime::DirectedBoostGraph::getNodeDegree ( VertexIdType  vertex_id)
overridevirtual

Returns the number of nodes the given node is connected to.

Implements exatn::runtime::TensorGraph.

◆ getNodeProperties()

TensorOpNode & exatn::runtime::DirectedBoostGraph::getNodeProperties ( VertexIdType  vertex_id)
overridevirtual

Returns the properties (TensorOpNode) of a given DAG node (by reference). Subsequently, one may need to lock/unlock the returned TensorOpNode in order to ensure a mutually exclusive access to it.

Implements exatn::runtime::TensorGraph.

◆ getNumDependencies()

std::size_t exatn::runtime::DirectedBoostGraph::getNumDependencies ( )
overridevirtual

Returns the total number of dependencies (directed edges) in the DAG.

Implements exatn::runtime::TensorGraph.

◆ getNumNodes()

std::size_t exatn::runtime::DirectedBoostGraph::getNumNodes ( )
overridevirtual

Returns the total number of nodes in the DAG.

Implements exatn::runtime::TensorGraph.

◆ printIt()

void exatn::runtime::DirectedBoostGraph::printIt ( )
overridevirtual

Prints the DAG

Implements exatn::runtime::TensorGraph.


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