Lines Matching defs:edge
33 struct dag_edge edge = {
38 util_dynarray_append(&parent->edges, struct dag_edge, edge);
43 * Adds a directed edge from the parent node to the child.
45 * Both nodes should have been initialized with dag_init_node(). The edge
51 util_dynarray_foreach(&parent->edges, struct dag_edge, edge) {
52 if (edge->child == child && edge->data == data)
60 * Adds a directed edge from the parent node to the child.
63 * already an existing edge, the data is updated to the maximum of the
71 util_dynarray_foreach(&parent->edges, struct dag_edge, edge) {
72 if (edge->child == child) {
73 edge->data = MAX2(edge->data, data);
81 /* Removes a single edge from the graph, promoting the child to a DAG head.
88 dag_remove_edge(struct dag *dag, struct dag_edge *edge)
90 if (!edge->child)
93 struct dag_node *child = edge->child;
98 edge->child = NULL;
99 edge->data = 0;
113 util_dynarray_foreach(&node->edges, struct dag_edge, edge) {
114 dag_remove_edge(dag, edge);
156 util_dynarray_foreach_reverse(&node->edges, struct dag_edge, edge) {
157 if (!_mesa_set_search(state->seen, edge->child)) {
158 util_dynarray_append(&stack, struct dag_node *, edge->child);