Node

Type

ComputableDAGs.ComputeTaskNodeType
ComputeTaskNode <: Node

Any node that computes a result from inputs using an AbstractComputeTask.

Fields

.task: The node's compute task type. A concrete subtype of AbstractComputeTask.
.parents: A vector of the node's parents (i.e. nodes that depend on this one).
.children: A vector of tuples with the node's children (i.e. nodes that this one depends on) and their index, used to order the arguments for the AbstractComputeTask.
.id: The node's id. Improves the speed of comparisons and is used as a unique identifier.
.nodeReduction: Either this node's NodeReduction or missing, if none. There can only be at most one.
.nodeSplit: Either this node's NodeSplit or missing, if none. There can only be at most one.
.device: The Device this node has been scheduled on by a Scheduler.

source
ComputableDAGs.DataTaskNodeType
DataTaskNode <: Node

Any node that transfers data and does no computation.

Fields

.task: The node's data task type. Usually DataTask.
.parents: A vector of the node's parents (i.e. nodes that depend on this one).
.children: A vector of tuples of the node's children (i.e. nodes that this one depends on) and their indices, indicating their order in the resulting function call passed to the task.
.id: The node's id. Improves the speed of comparisons and is used as a unique identifier.
.nodeReduction: Either this node's NodeReduction or missing, if none. There can only be at most one.
.nodeSplit: Either this node's NodeSplit or missing, if none. There can only be at most one.
.name: The name of this node for entry nodes into the graph (is_entry_node) to reliably assign the inputs to the correct nodes when executing.

source
ComputableDAGs.EdgeType
Edge

Type of an edge in the graph. Edges can only exist between a DataTaskNode and a ComputeTaskNode or vice versa, not between two of the same type of node.

An edge always points from child to parent: child = e.edge[1] and parent = e.edge[2]. Additionally, the Edgecontains theindex` which is used as the child's index in the parent node.

The child is the prerequisite node of the parent.

source

Create

ComputableDAGs.make_edgeFunction
make_edge(n1::Node, n2::Node, index::Int)

Fallback implementation of make_edge throwing an error. If you got this error it likely means you tried to construct an edge between two nodes of the same type.

source
ComputableDAGs.make_edgeFunction
make_edge(n1::DataTaskNode, n2::ComputeTaskNode)

Construct and return a new Edge pointing from n1 (child) to n2 (parent).

The index parameter is 0 by default and is passed to the parent node as argument index for its child.

source
ComputableDAGs.make_edgeFunction
make_edge(n1::ComputeTaskNode, n2::DataTaskNode, index::Int)

Construct and return a new Edge pointing from n1 (child) to n2 (parent).

The index parameter is 0 by default and is passed to the parent node as argument index for its child.

source

Compare

Base.:==Method
==(e1::Edge, e2::Edge)

Equality comparison between two edges.

source
Base.:==Method
==(n1::Node, n2::Node)

Fallback equality comparison between two nodes. For equal node types, the more specific versions of this function will be called.

source

Properties

ComputableDAGs.childrenMethod
children(node::Node)

Return node's children.

A node's children are its prerequisite nodes, nodes that need to execute before the task of this node.

A node's children are the nodes that must run before it.

source
ComputableDAGs.parentsMethod
parents(node::Node)

Return the node's parents.

A node's parents are its subsequent nodes, nodes that need this node to execute.

source
ComputableDAGs.partnersMethod
partners(node::Node)

Return a vector of all partners of this node.

A node's partners are all parents of any of its children. The result contains no duplicates and includes the node itself.

Note

This is very slow when there are multiple children with many parents. This is less of a problem in siblings(node::Node) because (depending on the model) there are no nodes with a large number of children, or only a single one.

source
ComputableDAGs.siblingsMethod
siblings(node::Node)

Return a vector of all siblings of this node.

A node's siblings are all children of any of its parents. The result contains no duplicates and includes the node itself.

source

Print

Base.showMethod
show(io::IO, e::Edge)

Print a short string representation of the edge to io.

source
Base.showMethod
show(io::IO, n::Node)

Print a short string representation of the node to io.

source

Validate