liberasurecode  1.6.1
Erasure Code API library
Data Structures | Macros | Typedefs | Functions | Variables
jerasure_rs_cauchy.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  jerasure_rs_cauchy_descriptor
 

Macros

#define JERASURE_RS_CAUCHY_LIB_MAJOR   2
 
#define JERASURE_RS_CAUCHY_LIB_MINOR   0
 
#define JERASURE_RS_CAUCHY_LIB_REV   0
 
#define JERASURE_RS_CAUCHY_LIB_VER_STR   "2.0"
 
#define JERASURE_RS_CAUCHY_LIB_NAME   "jerasure_rs_cauchy"
 
#define JERASURE_RS_CAUCHY_SO_NAME   "libJerasure.so.2"
 
#define PYECC_CAUCHY_PACKETSIZE   sizeof(long) * 128
 
#define DEFAULT_W   4
 

Typedefs

typedef int *(* cauchy_original_coding_matrix_func) (int, int, int)
 
typedef int *(* jerasure_matrix_to_bitmatrix_func) (int, int, int, int *)
 
typedef int **(* jerasure_smart_bitmatrix_to_schedule_func) (int, int, int, int *)
 
typedef void(* jerasure_bitmatrix_encode_func) (int, int, int, int *, char **, char **, int, int)
 
typedef int(* jerasure_bitmatrix_decode_func) (int, int, int, int *, int, int *, char **, char **, int, int)
 
typedef int *(* jerasure_erasures_to_erased_func) (int, int, int *)
 
typedef int(* jerasure_make_decoding_bitmatrix_func) (int, int, int, int *, int *, int *, int *)
 
typedef void(* jerasure_bitmatrix_dotprod_func) (int, int, int *, int *, int, char **, char **, int, int)
 
typedef void(* galois_uninit_field_func) (int)
 

Functions

static void free_rs_cauchy_desc (struct jerasure_rs_cauchy_descriptor *jerasure_desc)
 
static int jerasure_rs_cauchy_encode (void *desc, char **data, char **parity, int blocksize)
 
static int jerasure_rs_cauchy_decode (void *desc, char **data, char **parity, int *missing_idxs, int blocksize)
 
static int jerasure_rs_cauchy_reconstruct (void *desc, char **data, char **parity, int *missing_idxs, int destination_idx, int blocksize)
 
static int jerasure_rs_cauchy_min_fragments (void *desc, int *missing_idxs, int *fragments_to_exclude, int *fragments_needed)
 
static void * jerasure_rs_cauchy_init (struct ec_backend_args *args, void *backend_sohandle)
 
static int jerasure_rs_cauchy_element_size (void *desc)
 Return the element-size, which is the number of bits stored on a given device, per codeword. More...
 
static int jerasure_rs_cauchy_exit (void *desc)
 
static bool jerasure_rs_cauchy_is_compatible_with (uint32_t version)
 

Variables

struct ec_backend_op_stubs jerasure_rs_cauchy_ops
 
struct ec_backend jerasure_rs_cauchy
 
struct ec_backend_common backend_jerasure_rs_cauchy
 
struct ec_backend_op_stubs jerasure_rs_cauchy_op_stubs
 

Macro Definition Documentation

◆ DEFAULT_W

#define DEFAULT_W   4

Definition at line 237 of file jerasure_rs_cauchy.c.

◆ JERASURE_RS_CAUCHY_LIB_MAJOR

#define JERASURE_RS_CAUCHY_LIB_MAJOR   2

Definition at line 37 of file jerasure_rs_cauchy.c.

◆ JERASURE_RS_CAUCHY_LIB_MINOR

#define JERASURE_RS_CAUCHY_LIB_MINOR   0

Definition at line 38 of file jerasure_rs_cauchy.c.

◆ JERASURE_RS_CAUCHY_LIB_NAME

#define JERASURE_RS_CAUCHY_LIB_NAME   "jerasure_rs_cauchy"

Definition at line 41 of file jerasure_rs_cauchy.c.

◆ JERASURE_RS_CAUCHY_LIB_REV

#define JERASURE_RS_CAUCHY_LIB_REV   0

Definition at line 39 of file jerasure_rs_cauchy.c.

◆ JERASURE_RS_CAUCHY_LIB_VER_STR

#define JERASURE_RS_CAUCHY_LIB_VER_STR   "2.0"

Definition at line 40 of file jerasure_rs_cauchy.c.

◆ JERASURE_RS_CAUCHY_SO_NAME

#define JERASURE_RS_CAUCHY_SO_NAME   "libJerasure.so.2"

Definition at line 45 of file jerasure_rs_cauchy.c.

◆ PYECC_CAUCHY_PACKETSIZE

#define PYECC_CAUCHY_PACKETSIZE   sizeof(long) * 128

Definition at line 72 of file jerasure_rs_cauchy.c.

Typedef Documentation

◆ cauchy_original_coding_matrix_func

typedef int*(* cauchy_original_coding_matrix_func) (int, int, int)

Definition at line 53 of file jerasure_rs_cauchy.c.

◆ galois_uninit_field_func

typedef void(* galois_uninit_field_func) (int)

Definition at line 66 of file jerasure_rs_cauchy.c.

◆ jerasure_bitmatrix_decode_func

typedef int(* jerasure_bitmatrix_decode_func) (int, int, int, int *, int, int *, char **, char **, int, int)

Definition at line 59 of file jerasure_rs_cauchy.c.

◆ jerasure_bitmatrix_dotprod_func

typedef void(* jerasure_bitmatrix_dotprod_func) (int, int, int *, int *, int, char **, char **, int, int)

Definition at line 64 of file jerasure_rs_cauchy.c.

◆ jerasure_bitmatrix_encode_func

typedef void(* jerasure_bitmatrix_encode_func) (int, int, int, int *, char **, char **, int, int)

Definition at line 57 of file jerasure_rs_cauchy.c.

◆ jerasure_erasures_to_erased_func

typedef int*(* jerasure_erasures_to_erased_func) (int, int, int *)

Definition at line 61 of file jerasure_rs_cauchy.c.

◆ jerasure_make_decoding_bitmatrix_func

typedef int(* jerasure_make_decoding_bitmatrix_func) (int, int, int, int *, int *, int *, int *)

Definition at line 62 of file jerasure_rs_cauchy.c.

◆ jerasure_matrix_to_bitmatrix_func

typedef int*(* jerasure_matrix_to_bitmatrix_func) (int, int, int, int *)

Definition at line 54 of file jerasure_rs_cauchy.c.

◆ jerasure_smart_bitmatrix_to_schedule_func

typedef int**(* jerasure_smart_bitmatrix_to_schedule_func) (int, int, int, int *)

Definition at line 55 of file jerasure_rs_cauchy.c.

Function Documentation

◆ free_rs_cauchy_desc()

static void free_rs_cauchy_desc ( struct jerasure_rs_cauchy_descriptor jerasure_desc)
static

◆ jerasure_rs_cauchy_decode()

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

◆ jerasure_rs_cauchy_element_size()

static int jerasure_rs_cauchy_element_size ( void *  desc)
static

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


Returns the size in bits!

Definition at line 385 of file jerasure_rs_cauchy.c.

References PYECC_CAUCHY_PACKETSIZE, and jerasure_rs_cauchy_descriptor::w.

◆ jerasure_rs_cauchy_encode()

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

◆ jerasure_rs_cauchy_exit()

static int jerasure_rs_cauchy_exit ( void *  desc)
static

Definition at line 438 of file jerasure_rs_cauchy.c.

References free_rs_cauchy_desc().

◆ jerasure_rs_cauchy_init()

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

◆ jerasure_rs_cauchy_is_compatible_with()

static bool jerasure_rs_cauchy_is_compatible_with ( uint32_t  version)
static

Definition at line 450 of file jerasure_rs_cauchy.c.

References backend_jerasure_rs_cauchy.

◆ jerasure_rs_cauchy_min_fragments()

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

◆ jerasure_rs_cauchy_reconstruct()

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

Variable Documentation

◆ backend_jerasure_rs_cauchy

struct ec_backend_common backend_jerasure_rs_cauchy
Initial value:
= {
.id = EC_BACKEND_JERASURE_RS_CAUCHY,
.ec_backend_version = _VERSION(JERASURE_RS_CAUCHY_LIB_MAJOR,
}
#define JERASURE_RS_CAUCHY_LIB_MAJOR
#define JERASURE_RS_CAUCHY_LIB_NAME
#define JERASURE_RS_CAUCHY_LIB_VER_STR
#define JERASURE_RS_CAUCHY_SO_NAME
#define JERASURE_RS_CAUCHY_LIB_REV
struct ec_backend_op_stubs jerasure_rs_cauchy_op_stubs
#define JERASURE_RS_CAUCHY_LIB_MINOR

Definition at line 1 of file jerasure_rs_cauchy.c.

Referenced by jerasure_rs_cauchy_is_compatible_with().

◆ jerasure_rs_cauchy

struct ec_backend jerasure_rs_cauchy

Definition at line 1 of file jerasure_rs_cauchy.c.

◆ jerasure_rs_cauchy_op_stubs

struct ec_backend_op_stubs jerasure_rs_cauchy_op_stubs
Initial value:
= {
.GETMETADATASIZE = get_backend_metadata_size_zero,
.GETENCODEOFFSET = get_encode_offset_zero,
}
static int jerasure_rs_cauchy_element_size(void *desc)
Return the element-size, which is the number of bits stored on a given device, per codeword.
static bool jerasure_rs_cauchy_is_compatible_with(uint32_t version)
static int jerasure_rs_cauchy_exit(void *desc)
static void * jerasure_rs_cauchy_init(struct ec_backend_args *args, void *backend_sohandle)
static int jerasure_rs_cauchy_encode(void *desc, char **data, char **parity, int blocksize)
static int jerasure_rs_cauchy_decode(void *desc, char **data, char **parity, int *missing_idxs, int blocksize)
static int jerasure_rs_cauchy_min_fragments(void *desc, int *missing_idxs, int *fragments_to_exclude, int *fragments_needed)
static int jerasure_rs_cauchy_reconstruct(void *desc, char **data, char **parity, int *missing_idxs, int destination_idx, int blocksize)

Definition at line 450 of file jerasure_rs_cauchy.c.

◆ jerasure_rs_cauchy_ops

struct ec_backend_op_stubs jerasure_rs_cauchy_ops

Definition at line 1 of file jerasure_rs_cauchy.c.