HPCToolkit
binarytree.h File Reference
#include <stdbool.h>
#include "generic_val.h"
#include "mem_manager.h"
Include dependency graph for binarytree.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  binarytree_s
 

Macros

#define MAX_TREE_STR   65536
 
#define MAX_INDENTS   512
 
#define OPAQUE_TYPE   0
 

Typedefs

typedef struct binarytree_s binarytree_t
 

Functions

binarytree_tbinarytree_new (size_t size, mem_alloc m_alloc)
 
void binarytree_del (binarytree_t **root, mem_free m_free)
 
void * binarytree_rootval (binarytree_t *tree)
 
binarytree_tbinarytree_leftsubtree (binarytree_t *tree)
 
binarytree_tbinarytree_rightsubtree (binarytree_t *tree)
 
void binarytree_set_leftsubtree (binarytree_t *tree, binarytree_t *subtree)
 
void binarytree_set_rightsubtree (binarytree_t *tree, binarytree_t *subtree)
 
int binarytree_count (binarytree_t *node)
 
binarytree_tbinarytree_list_to_tree (binarytree_t **head, int count)
 
binarytree_tbinarytree_listify (binarytree_t *root)
 
binarytree_tbinarytree_listalloc (size_t elt_size, int num_elts, mem_alloc m_alloc)
 
binarytree_tbinarytree_find (binarytree_t *tree, val_cmp fn, void *val)
 
void binarytree_tostring (binarytree_t *root, val_tostr valtostr_fun, char valstr[], char treestr[])
 
void binarytree_tostring_indent (binarytree_t *tree, val_tostr tostr, char valstr[], char *indents, char treestr[])
 
int binarytree_height (binarytree_t *tree)
 
binarytree_tbinarytree_insert (binarytree_t *tree, val_cmp compare, binarytree_t *key)
 

Macro Definition Documentation

◆ MAX_INDENTS

#define MAX_INDENTS   512

Definition at line 84 of file binarytree.h.

◆ MAX_TREE_STR

#define MAX_TREE_STR   65536

Definition at line 83 of file binarytree.h.

◆ OPAQUE_TYPE

#define OPAQUE_TYPE   0

Definition at line 85 of file binarytree.h.

Typedef Documentation

◆ binarytree_t

typedef struct binarytree_s binarytree_t

Function Documentation

◆ binarytree_count()

int binarytree_count ( binarytree_t node)

Definition at line 204 of file binarytree.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ binarytree_del()

void binarytree_del ( binarytree_t **  root,
mem_free  m_free 
)

Definition at line 150 of file binarytree.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ binarytree_find()

binarytree_t* binarytree_find ( binarytree_t tree,
val_cmp  fn,
void *  val 
)

Definition at line 257 of file binarytree.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ binarytree_height()

int binarytree_height ( binarytree_t tree)

Definition at line 305 of file binarytree.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ binarytree_insert()

binarytree_t* binarytree_insert ( binarytree_t tree,
val_cmp  compare,
binarytree_t key 
)

Definition at line 316 of file binarytree.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ binarytree_leftsubtree()

binarytree_t* binarytree_leftsubtree ( binarytree_t tree)

Definition at line 171 of file binarytree.c.

Here is the caller graph for this function:

◆ binarytree_list_to_tree()

binarytree_t* binarytree_list_to_tree ( binarytree_t **  head,
int  count 
)

Definition at line 211 of file binarytree.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ binarytree_listalloc()

binarytree_t* binarytree_listalloc ( size_t  elt_size,
int  num_elts,
mem_alloc  m_alloc 
)

Definition at line 245 of file binarytree.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ binarytree_listify()

binarytree_t* binarytree_listify ( binarytree_t root)

Definition at line 237 of file binarytree.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ binarytree_new()

binarytree_t* binarytree_new ( size_t  size,
mem_alloc  m_alloc 
)

Definition at line 141 of file binarytree.c.

Here is the caller graph for this function:

◆ binarytree_rightsubtree()

binarytree_t* binarytree_rightsubtree ( binarytree_t tree)

Definition at line 179 of file binarytree.c.

Here is the caller graph for this function:

◆ binarytree_rootval()

void* binarytree_rootval ( binarytree_t tree)

Definition at line 163 of file binarytree.c.

Here is the caller graph for this function:

◆ binarytree_set_leftsubtree()

void binarytree_set_leftsubtree ( binarytree_t tree,
binarytree_t subtree 
)

Definition at line 186 of file binarytree.c.

Here is the caller graph for this function:

◆ binarytree_set_rightsubtree()

void binarytree_set_rightsubtree ( binarytree_t tree,
binarytree_t subtree 
)

Definition at line 195 of file binarytree.c.

Here is the caller graph for this function:

◆ binarytree_tostring()

void binarytree_tostring ( binarytree_t root,
val_tostr  valtostr_fun,
char  valstr[],
char  treestr[] 
)

Definition at line 271 of file binarytree.c.

Here is the call graph for this function:

◆ binarytree_tostring_indent()

void binarytree_tostring_indent ( binarytree_t tree,
val_tostr  tostr,
char  valstr[],
char *  indents,
char  treestr[] 
)

Definition at line 278 of file binarytree.c.

Here is the call graph for this function:
Here is the caller graph for this function: