Utility
Helper Functions
ComputableDAGs._lt_node_tuples — Method
_lt_node_tuples(n1::Tuple{Node, Int}, n2::Tuple{Node, Int})Less-Than comparison between nodes with indices.
sourceComputableDAGs.bytes_to_human_readable — Method
bytes_to_human_readable(bytes)Return a human readable string representation of the given number.
julia> using ComputableDAGs
julia> ComputableDAGs.bytes_to_human_readable(4096)
"4.0 KiB"sourceComputableDAGs.lower — Method
lower(schedule::Vector{Node}, machine::Machine)After schedule_dag has made a schedule of nodes, this function lowers the vector of Nodes and AbstractDevices into a vector of FunctionCalls.
ComputableDAGs.sort_node! — Method
sort_node!(node::Node)Sort the nodes' parents and children vectors. The vectors are mostly very short so sorting does not take a lot of time. Sorted nodes are required to make the finding of NodeReductions a lot faster using the NodeTrie data structure.
ComputableDAGs.unroll_symbol_vector — Method
unroll_symbol_vector(vec::Vector{Symbol})Return the given vector as single String without quotation marks or brackets.
sourceTrie Helper
This is a simple implementation of a Trie Data Structure to greatly improve the performance of the Node Reduction search.
ComputableDAGs.NodeIdTrie — Type
ComputableDAGs.NodeIdTrie — Method
ComputableDAGs.NodeTrie — Type
NodeTrieTrie data structure for node reduction, inserts nodes by children. Assumes that given nodes have ordered vectors of children (see sort_node!). First insertion level is the node's own task type + name and thus does not have a value (every node has a task type).
ComputableDAGs.NodeTrie — Method
Base.collect — Method
Base.insert! — Method
insert!(trie::NodeTrie, node::Node)Insert the given node into the trie. It's sorted by its type in the first layer, then by its children in the following layers.
sourceComputableDAGs.collect_helper — Method
collect_helper(trie::NodeIdTrie, acc::Set{Vector{Node}})Collects the Vectors of this NodeIdTrie node and all its children and puts them in the acc argument.
ComputableDAGs.insert_helper! — Method
insert_helper!(trie::NodeIdTrie, node::Node, depth::Int)Insert the given node into the trie. The depth is used to iterate through the trie layers, while the function calls itself recursively until it ran through all children of the node.
source