Motr  M0
parity_math_mt_ub.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include "lib/types.h"
#include "lib/assert.h"
#include "lib/memory.h"
#include "lib/thread.h"
#include "lib/arith.h"
#include "lib/ub.h"
#include "ut/ut.h"
#include "sns/matvec.h"
#include "sns/ls_solve.h"
#include "sns/parity_math.h"
Include dependency graph for parity_math_mt_ub.c:

Go to the source code of this file.

Data Structures

struct  tb_cfg
 

Macros

#define MAX_NUM_THREADS   30
 
#define KB(x)   ((x) * 1024)
 
#define MB(x)   (KB(x) * 1024)
 

Enumerations

enum  { UB_ITER = 1 }
 

Functions

static int ub_init (const char *opts M0_UNUSED)
 
void tb_cfg_init (struct tb_cfg *cfg, uint32_t data_count, uint32_t parity_count, uint32_t block_size, uint32_t th_num)
 
void tb_cfg_fini (struct tb_cfg *cfg)
 
static void unit_spoil (struct tb_cfg *cfg)
 
static void unit_compare (struct tb_cfg *cfg)
 
void tb_thread (struct tb_cfg *cfg)
 
static void ub_mt_test (uint32_t data_count, uint32_t parity_count, uint32_t block_size)
 
void ub_small_4K ()
 
void ub_medium_4K ()
 
void ub_large_4K ()
 
void ub_small_1M ()
 
void ub_medium_1M ()
 
void ub_large_1M ()
 
void ub_small_32K ()
 
void ub_medium_32K ()
 
void ub_large_32K ()
 
static void ub_small_4_2_4K (int iter)
 
static void ub_small_4_2_256K (int iter)
 
static void ub_small_4_2_1M (int iter)
 

Variables

static uint64_t seed = 42
 
struct m0_ub_set m0_parity_math_mt_ub
 

Macro Definition Documentation

◆ KB

#define KB (   x)    ((x) * 1024)

Definition at line 41 of file parity_math_mt_ub.c.

◆ MAX_NUM_THREADS

#define MAX_NUM_THREADS   30

Definition at line 40 of file parity_math_mt_ub.c.

◆ MB

#define MB (   x)    (KB(x) * 1024)

Definition at line 42 of file parity_math_mt_ub.c.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
UB_ITER 

Definition at line 299 of file parity_math_mt_ub.c.

Function Documentation

◆ tb_cfg_fini()

void tb_cfg_fini ( struct tb_cfg cfg)

Definition at line 115 of file parity_math_mt_ub.c.

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

◆ tb_cfg_init()

void tb_cfg_init ( struct tb_cfg cfg,
uint32_t  data_count,
uint32_t  parity_count,
uint32_t  block_size,
uint32_t  th_num 
)

Definition at line 64 of file parity_math_mt_ub.c.

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

◆ tb_thread()

void tb_thread ( struct tb_cfg cfg)

Definition at line 169 of file parity_math_mt_ub.c.

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

◆ ub_init()

static int ub_init ( const char *opts  M0_UNUSED)
static

Definition at line 59 of file parity_math_mt_ub.c.

◆ ub_large_1M()

void ub_large_1M ( )

Definition at line 271 of file parity_math_mt_ub.c.

Here is the call graph for this function:

◆ ub_large_32K()

void ub_large_32K ( )

Definition at line 283 of file parity_math_mt_ub.c.

Here is the call graph for this function:

◆ ub_large_4K()

void ub_large_4K ( )

Definition at line 259 of file parity_math_mt_ub.c.

Here is the call graph for this function:

◆ ub_medium_1M()

void ub_medium_1M ( )

Definition at line 267 of file parity_math_mt_ub.c.

Here is the call graph for this function:

◆ ub_medium_32K()

void ub_medium_32K ( )

Definition at line 279 of file parity_math_mt_ub.c.

Here is the call graph for this function:

◆ ub_medium_4K()

void ub_medium_4K ( )

Definition at line 255 of file parity_math_mt_ub.c.

Here is the call graph for this function:

◆ ub_mt_test()

static void ub_mt_test ( uint32_t  data_count,
uint32_t  parity_count,
uint32_t  block_size 
)
static

Definition at line 216 of file parity_math_mt_ub.c.

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

◆ ub_small_1M()

void ub_small_1M ( )

Definition at line 263 of file parity_math_mt_ub.c.

Here is the call graph for this function:

◆ ub_small_32K()

void ub_small_32K ( )

Definition at line 275 of file parity_math_mt_ub.c.

Here is the call graph for this function:

◆ ub_small_4_2_1M()

static void ub_small_4_2_1M ( int  iter)
static

Definition at line 295 of file parity_math_mt_ub.c.

Here is the call graph for this function:

◆ ub_small_4_2_256K()

static void ub_small_4_2_256K ( int  iter)
static

Definition at line 291 of file parity_math_mt_ub.c.

Here is the call graph for this function:

◆ ub_small_4_2_4K()

static void ub_small_4_2_4K ( int  iter)
static

Definition at line 287 of file parity_math_mt_ub.c.

Here is the call graph for this function:

◆ ub_small_4K()

void ub_small_4K ( )

Definition at line 251 of file parity_math_mt_ub.c.

Here is the call graph for this function:

◆ unit_compare()

static void unit_compare ( struct tb_cfg cfg)
static

Definition at line 152 of file parity_math_mt_ub.c.

Here is the caller graph for this function:

◆ unit_spoil()

static void unit_spoil ( struct tb_cfg cfg)
static

Definition at line 133 of file parity_math_mt_ub.c.

Here is the caller graph for this function:

Variable Documentation

◆ m0_parity_math_mt_ub

struct m0_ub_set m0_parity_math_mt_ub

Definition at line 301 of file parity_math_mt_ub.c.

◆ seed

uint64_t seed = 42
static

Definition at line 44 of file parity_math_mt_ub.c.