Lines Matching refs:tree
290 …OrderDepthFirst(PetscInt num_nodes, PetscInt parent, PetscNestedEventNode tree[], PetscInt *num_de… in PetscLogNestedEventNodesOrderDepthFirst() argument
298 if (tree[node].parent == parent) { in PetscLogNestedEventNodesOrderDepthFirst()
300 PetscNestedEventNode tmp = tree[start_loc]; in PetscLogNestedEventNodesOrderDepthFirst()
301 tree[start_loc] = tree[node]; in PetscLogNestedEventNodesOrderDepthFirst()
302 tree[node] = tmp; in PetscLogNestedEventNodesOrderDepthFirst()
303 …scLogNestedEventNodesOrderDepthFirst(num_nodes - start_loc - 1, tree[start_loc].id, &tree[start_lo… in PetscLogNestedEventNodesOrderDepthFirst()
304 tree[start_loc].num_descendants = num_this_descendants; in PetscLogNestedEventNodesOrderDepthFirst()
325 PetscNestedEventNode *tree; in PetscLogNestedCreatePerfNodes() local
329 PetscCall(PetscCalloc1(num_nodes, &tree)); in PetscLogNestedCreatePerfNodes()
331 tree[node].id = node; in PetscLogNestedCreatePerfNodes()
332 PetscCall(PetscLogGlobalNamesGlobalGetName(global_events, node, &tree[node].name)); in PetscLogNestedCreatePerfNodes()
333 tree[node].parent = -1; in PetscLogNestedCreatePerfNodes()
348 tree[leaf_global].parent = root_global; in PetscLogNestedCreatePerfNodes()
357 for (PetscInt node = 0; node < num_nodes; node++) parents[node] = tree[node].parent; in PetscLogNestedCreatePerfNodes()
359 for (PetscInt node = 0; node < num_nodes; node++) tree[node].parent = parents[node]; in PetscLogNestedCreatePerfNodes()
364 PetscCall(PetscLogNestedEventNodesOrderDepthFirst(num_nodes, -1, tree, &num_descendants)); in PetscLogNestedCreatePerfNodes()
369 PetscInt global_id = tree[tree_node].id; in PetscLogNestedCreatePerfNodes()
382 *tree_p = tree; in PetscLogNestedCreatePerfNodes()
394 PetscNestedEventTree tree; in PETSC_PRAGMA_DIAGNOSTIC_IGNORED_END() local
401 tree.comm = comm; in PETSC_PRAGMA_DIAGNOSTIC_IGNORED_END()
402 tree.global_events = global_events; in PETSC_PRAGMA_DIAGNOSTIC_IGNORED_END()
403 tree.perf = perf; in PETSC_PRAGMA_DIAGNOSTIC_IGNORED_END()
404 tree.nodes = nodes; in PETSC_PRAGMA_DIAGNOSTIC_IGNORED_END()
407 PetscCall(PetscLogHandlerView_Nested_XML(nested, &tree, viewer)); in PETSC_PRAGMA_DIAGNOSTIC_IGNORED_END()
409 PetscCall(PetscLogHandlerView_Nested_Flamegraph(nested, &tree, viewer)); in PETSC_PRAGMA_DIAGNOSTIC_IGNORED_END()
412 PetscCall(PetscFree(tree.nodes)); in PETSC_PRAGMA_DIAGNOSTIC_IGNORED_END()
413 PetscCall(PetscFree(tree.perf)); in PETSC_PRAGMA_DIAGNOSTIC_IGNORED_END()