Motr  M0
common.h File Reference

Go to the source code of this file.

Macros

#define __MOTR_FD_UT_COMMON_H__
 

Enumerations

enum  layout_attr { la_N = 8, la_K = 2, la_S = 2 }
 
enum  tree_ut_attr {
  TUA_RACKS = 8, TUA_ENC = 7, TUA_CON = 2, TUA_DISKS = 82,
  TUA_ITER = 20, TUA_CHILD_NR_MAX = 13, TUA_MAX_POOL_WIDTH = 5000
}
 
enum  tree_type {
  TP_LEAF, TP_UNARY, TP_BINARY, TP_TERNARY,
  TP_QUATERNARY, TP_NR
}
 
enum  tree_gen_type { TG_DETERM, TG_RANDOM }
 
enum  tree_attr { TA_SYMM, TA_ASYMM }
 

Functions

 M0_BASSERT (TUA_CHILD_NR_MAX >=la_N+la_K+la_S &&TUA_MAX_POOL_WIDTH >=TUA_CHILD_NR_MAX)
 
M0_INTERNAL int fd_ut_tree_init (struct m0_fd_tree *tree, uint64_t tree_depth)
 
M0_INTERNAL void fd_ut_children_populate (uint64_t *child_nr, uint32_t length)
 
M0_INTERNAL void fd_ut_symm_tree_create (struct m0_fd_tree *tree, enum tree_gen_type tg_type, uint64_t *child_nr, uint64_t depth)
 
M0_INTERNAL int fd_ut_tree_level_populate (struct m0_fd_tree *tree, uint64_t children, uint16_t level, enum tree_attr ta)
 
M0_INTERNAL void fd_ut_symm_tree_get (struct m0_fd_tree *tree, uint64_t *children_nr)
 
M0_INTERNAL uint64_t fd_ut_random_cnt_get (uint64_t max_cnt)
 

Macro Definition Documentation

◆ __MOTR_FD_UT_COMMON_H__

#define __MOTR_FD_UT_COMMON_H__

Definition at line 26 of file common.h.

Enumeration Type Documentation

◆ layout_attr

Enumerator
la_N 
la_K 
la_S 

Definition at line 28 of file common.h.

◆ tree_attr

enum tree_attr
Enumerator
TA_SYMM 
TA_ASYMM 

Definition at line 68 of file common.h.

◆ tree_gen_type

Enumerator
TG_DETERM 
TG_RANDOM 

Definition at line 61 of file common.h.

◆ tree_type

enum tree_type
Enumerator
TP_LEAF 
TP_UNARY 
TP_BINARY 
TP_TERNARY 
TP_QUATERNARY 
TP_NR 

Definition at line 52 of file common.h.

◆ tree_ut_attr

Enumerator
TUA_RACKS 
TUA_ENC 
TUA_CON 
TUA_DISKS 
TUA_ITER 
TUA_CHILD_NR_MAX 
TUA_MAX_POOL_WIDTH 

Definition at line 34 of file common.h.

Function Documentation

◆ fd_ut_children_populate()

M0_INTERNAL void fd_ut_children_populate ( uint64_t *  child_nr,
uint32_t  length 
)

Definition at line 56 of file common.c.

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

◆ fd_ut_random_cnt_get()

M0_INTERNAL uint64_t fd_ut_random_cnt_get ( uint64_t  max_cnt)

Definition at line 159 of file common.c.

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

◆ fd_ut_symm_tree_create()

M0_INTERNAL void fd_ut_symm_tree_create ( struct m0_fd_tree tree,
enum tree_gen_type  tg_type,
uint64_t *  child_nr,
uint64_t  depth 
)

Definition at line 33 of file common.c.

Here is the call graph for this function:

◆ fd_ut_symm_tree_get()

M0_INTERNAL void fd_ut_symm_tree_get ( struct m0_fd_tree tree,
uint64_t *  children_nr 
)

Definition at line 130 of file common.c.

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

◆ fd_ut_tree_init()

M0_INTERNAL int fd_ut_tree_init ( struct m0_fd_tree tree,
uint64_t  tree_depth 
)

Definition at line 114 of file common.c.

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

◆ fd_ut_tree_level_populate()

M0_INTERNAL int fd_ut_tree_level_populate ( struct m0_fd_tree tree,
uint64_t  children,
uint16_t  level,
enum tree_attr  ta 
)

Definition at line 69 of file common.c.

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

◆ M0_BASSERT()

M0_BASSERT ( TUA_CHILD_NR_MAX >=la_N+la_K+la_S &&TUA_MAX_POOL_WIDTH >=  TUA_CHILD_NR_MAX)