liberasurecode  1.6.2
Erasure Code API library
Data Structures | Macros | Typedefs | Functions | Variables
liberasurecode_rs_vand.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include "erasurecode.h"
#include "erasurecode_backend.h"
#include "erasurecode_helpers.h"
#include "erasurecode_helpers_ext.h"

Go to the source code of this file.

Data Structures

struct  liberasurecode_rs_vand_descriptor
 

Macros

#define LIBERASURECODE_RS_VAND_LIB_MAJOR   1
 
#define LIBERASURECODE_RS_VAND_LIB_MINOR   0
 
#define LIBERASURECODE_RS_VAND_LIB_REV   0
 
#define LIBERASURECODE_RS_VAND_LIB_VER_STR   "1.0"
 
#define LIBERASURECODE_RS_VAND_LIB_NAME   "liberasurecode_rs_vand"
 
#define LIBERASURECODE_RS_VAND_SO_NAME   "liberasurecode_rs_vand.so.1"
 

Typedefs

typedef int(* liberasurecode_rs_vand_encode_func) (int *, char **, char **, int, int, int)
 
typedef int(* liberasurecode_rs_vand_decode_func) (int *, char **, char **, int, int, int *, int, int)
 
typedef int(* liberasurecode_rs_vand_reconstruct_func) (int *, char **, char **, int, int, int *, int, int)
 
typedef void(* init_liberasurecode_rs_vand_func) (int, int)
 
typedef void(* deinit_liberasurecode_rs_vand_func) ()
 
typedef void(* free_systematic_matrix_func) (int *)
 
typedef int *(* make_systematic_matrix_func) (int, int)
 

Functions

static int liberasurecode_rs_vand_encode (void *desc, char **data, char **parity, int blocksize)
 
static int liberasurecode_rs_vand_decode (void *desc, char **data, char **parity, int *missing_idxs, int blocksize)
 
static int liberasurecode_rs_vand_reconstruct (void *desc, char **data, char **parity, int *missing_idxs, int destination_idx, int blocksize)
 
static int liberasurecode_rs_vand_min_fragments (void *desc, int *missing_idxs, int *fragments_to_exclude, int *fragments_needed)
 
static void * liberasurecode_rs_vand_init (struct ec_backend_args *args, void *backend_sohandle)
 
static int liberasurecode_rs_vand_element_size (void *desc)
 Return the element-size, which is the number of bits stored on a given device, per codeword. More...
 
static int liberasurecode_rs_vand_exit (void *desc)
 
static bool liberasurecode_rs_vand_is_compatible_with (uint32_t version)
 

Variables

struct ec_backend_op_stubs liberasurecode_rs_vand_ops
 
struct ec_backend liberasurecode_rs_vand
 
struct ec_backend_common backend_liberasurecode_rs_vand
 
struct ec_backend_op_stubs liberasurecode_rs_vand_op_stubs
 

Macro Definition Documentation

◆ LIBERASURECODE_RS_VAND_LIB_MAJOR

#define LIBERASURECODE_RS_VAND_LIB_MAJOR   1

Definition at line 35 of file liberasurecode_rs_vand.c.

◆ LIBERASURECODE_RS_VAND_LIB_MINOR

#define LIBERASURECODE_RS_VAND_LIB_MINOR   0

Definition at line 36 of file liberasurecode_rs_vand.c.

◆ LIBERASURECODE_RS_VAND_LIB_NAME

#define LIBERASURECODE_RS_VAND_LIB_NAME   "liberasurecode_rs_vand"

Definition at line 39 of file liberasurecode_rs_vand.c.

◆ LIBERASURECODE_RS_VAND_LIB_REV

#define LIBERASURECODE_RS_VAND_LIB_REV   0

Definition at line 37 of file liberasurecode_rs_vand.c.

◆ LIBERASURECODE_RS_VAND_LIB_VER_STR

#define LIBERASURECODE_RS_VAND_LIB_VER_STR   "1.0"

Definition at line 38 of file liberasurecode_rs_vand.c.

◆ LIBERASURECODE_RS_VAND_SO_NAME

#define LIBERASURECODE_RS_VAND_SO_NAME   "liberasurecode_rs_vand.so.1"

Definition at line 43 of file liberasurecode_rs_vand.c.

Typedef Documentation

◆ deinit_liberasurecode_rs_vand_func

typedef void(* deinit_liberasurecode_rs_vand_func) ()

Definition at line 55 of file liberasurecode_rs_vand.c.

◆ free_systematic_matrix_func

typedef void(* free_systematic_matrix_func) (int *)

Definition at line 56 of file liberasurecode_rs_vand.c.

◆ init_liberasurecode_rs_vand_func

typedef void(* init_liberasurecode_rs_vand_func) (int, int)

Definition at line 54 of file liberasurecode_rs_vand.c.

◆ liberasurecode_rs_vand_decode_func

typedef int(* liberasurecode_rs_vand_decode_func) (int *, char **, char **, int, int, int *, int, int)

Definition at line 52 of file liberasurecode_rs_vand.c.

◆ liberasurecode_rs_vand_encode_func

typedef int(* liberasurecode_rs_vand_encode_func) (int *, char **, char **, int, int, int)

Definition at line 51 of file liberasurecode_rs_vand.c.

◆ liberasurecode_rs_vand_reconstruct_func

typedef int(* liberasurecode_rs_vand_reconstruct_func) (int *, char **, char **, int, int, int *, int, int)

Definition at line 53 of file liberasurecode_rs_vand.c.

◆ make_systematic_matrix_func

typedef int*(* make_systematic_matrix_func) (int, int)

Definition at line 57 of file liberasurecode_rs_vand.c.

Function Documentation

◆ liberasurecode_rs_vand_decode()

static int liberasurecode_rs_vand_decode ( void *  desc,
char **  data,
char **  parity,
int *  missing_idxs,
int  blocksize 
)
static

◆ liberasurecode_rs_vand_element_size()

static int liberasurecode_rs_vand_element_size ( void *  desc)
static

Return the element-size, which is the number of bits stored on a given device, per codeword.

For Vandermonde, this is 'w'. For somthing like cauchy, this is packetsize * w.

Returns the size in bits!

Definition at line 262 of file liberasurecode_rs_vand.c.

References liberasurecode_rs_vand_descriptor::w.

◆ liberasurecode_rs_vand_encode()

static int liberasurecode_rs_vand_encode ( void *  desc,
char **  data,
char **  parity,
int  blocksize 
)
static

◆ liberasurecode_rs_vand_exit()

static int liberasurecode_rs_vand_exit ( void *  desc)
static

◆ liberasurecode_rs_vand_init()

static void* liberasurecode_rs_vand_init ( struct ec_backend_args *  args,
void *  backend_sohandle 
)
static

◆ liberasurecode_rs_vand_is_compatible_with()

static bool liberasurecode_rs_vand_is_compatible_with ( uint32_t  version)
static

Definition at line 288 of file liberasurecode_rs_vand.c.

References backend_liberasurecode_rs_vand.

◆ liberasurecode_rs_vand_min_fragments()

static int liberasurecode_rs_vand_min_fragments ( void *  desc,
int *  missing_idxs,
int *  fragments_to_exclude,
int *  fragments_needed 
)
static

◆ liberasurecode_rs_vand_reconstruct()

static int liberasurecode_rs_vand_reconstruct ( void *  desc,
char **  data,
char **  parity,
int *  missing_idxs,
int  destination_idx,
int  blocksize 
)
static

Variable Documentation

◆ backend_liberasurecode_rs_vand

struct ec_backend_common backend_liberasurecode_rs_vand
Initial value:

Definition at line 49 of file liberasurecode_rs_vand.c.

Referenced by liberasurecode_rs_vand_is_compatible_with().

◆ liberasurecode_rs_vand

struct ec_backend liberasurecode_rs_vand

Definition at line 48 of file liberasurecode_rs_vand.c.

◆ liberasurecode_rs_vand_op_stubs

struct ec_backend_op_stubs liberasurecode_rs_vand_op_stubs
Initial value:
= {
.GETMETADATASIZE = get_backend_metadata_size_zero,
.GETENCODEOFFSET = get_encode_offset_zero,
}

Definition at line 292 of file liberasurecode_rs_vand.c.

◆ liberasurecode_rs_vand_ops

struct ec_backend_op_stubs liberasurecode_rs_vand_ops

Definition at line 47 of file liberasurecode_rs_vand.c.

liberasurecode_rs_vand_min_fragments
static int liberasurecode_rs_vand_min_fragments(void *desc, int *missing_idxs, int *fragments_to_exclude, int *fragments_needed)
Definition: liberasurecode_rs_vand.c:121
liberasurecode_rs_vand_encode
static int liberasurecode_rs_vand_encode(void *desc, char **data, char **parity, int blocksize)
Definition: liberasurecode_rs_vand.c:83
LIBERASURECODE_RS_VAND_LIB_MAJOR
#define LIBERASURECODE_RS_VAND_LIB_MAJOR
Definition: liberasurecode_rs_vand.c:35
LIBERASURECODE_RS_VAND_LIB_MINOR
#define LIBERASURECODE_RS_VAND_LIB_MINOR
Definition: liberasurecode_rs_vand.c:36
LIBERASURECODE_RS_VAND_LIB_VER_STR
#define LIBERASURECODE_RS_VAND_LIB_VER_STR
Definition: liberasurecode_rs_vand.c:38
LIBERASURECODE_RS_VAND_LIB_NAME
#define LIBERASURECODE_RS_VAND_LIB_NAME
Definition: liberasurecode_rs_vand.c:39
liberasurecode_rs_vand_reconstruct
static int liberasurecode_rs_vand_reconstruct(void *desc, char **data, char **parity, int *missing_idxs, int destination_idx, int blocksize)
Definition: liberasurecode_rs_vand.c:108
liberasurecode_rs_vand_is_compatible_with
static bool liberasurecode_rs_vand_is_compatible_with(uint32_t version)
Definition: liberasurecode_rs_vand.c:288
liberasurecode_rs_vand_op_stubs
struct ec_backend_op_stubs liberasurecode_rs_vand_op_stubs
Definition: liberasurecode_rs_vand.c:292
LIBERASURECODE_RS_VAND_SO_NAME
#define LIBERASURECODE_RS_VAND_SO_NAME
Definition: liberasurecode_rs_vand.c:43
liberasurecode_rs_vand_element_size
static int liberasurecode_rs_vand_element_size(void *desc)
Return the element-size, which is the number of bits stored on a given device, per codeword.
Definition: liberasurecode_rs_vand.c:262
liberasurecode_rs_vand_init
static void * liberasurecode_rs_vand_init(struct ec_backend_args *args, void *backend_sohandle)
Definition: liberasurecode_rs_vand.c:148
liberasurecode_rs_vand_exit
static int liberasurecode_rs_vand_exit(void *desc)
Definition: liberasurecode_rs_vand.c:271
liberasurecode_rs_vand_decode
static int liberasurecode_rs_vand_decode(void *desc, char **data, char **parity, int *missing_idxs, int blocksize)
Definition: liberasurecode_rs_vand.c:95
LIBERASURECODE_RS_VAND_LIB_REV
#define LIBERASURECODE_RS_VAND_LIB_REV
Definition: liberasurecode_rs_vand.c:37