Lines Matching refs:node
28 * Adds a directed edge from the parent node to the child.
78 dag_prune_head(struct dag *dag, struct dag_node *node)
80 assert(!node->parent_count);
82 list_delinit(&node->link);
84 util_dynarray_foreach(&node->edges, struct dag_edge, edge) {
90 * Initializes DAG node (probably embedded in some other datastructure in the
94 dag_init_node(struct dag *dag, struct dag_node *node)
96 util_dynarray_init(&node->edges, dag);
97 list_addtail(&node->link, &dag->heads);
106 dag_traverse_bottom_up_node(struct dag_node *node,
107 void (*cb)(struct dag_node *node,
111 if (_mesa_set_search(state->seen, node))
114 util_dynarray_foreach(&node->edges, struct dag_edge, edge) {
118 cb(node, state->data);
119 _mesa_set_add(state->seen, node);
123 * Walks the DAG from leaves to the root, ensuring that each node is only seen
124 * once its children have been, and each node is only traversed once.
127 dag_traverse_bottom_up(struct dag *dag, void (*cb)(struct dag_node *node,
135 list_for_each_entry(struct dag_node, node, &dag->heads, link) {
136 dag_traverse_bottom_up_node(node, cb, &state);