/build/sourc...sa_l_rs_lrc.c(3)
π¦ isa_l_rs_lrc.c(3) β a liberasurecode manual page π¦
bestie, welcome to the liberasurecode manual page for /build/source/src/backends/isa-l/isa_l_rs_lrc.c. yes, that whole path is the NAME vibe. no cap, we are getting into the backend details π
πΈ NAME πΈ
/build/source/src/backends/isa-l/isa_l_rs_lrc.c
β¨ SYNOPSIS β¨
okay so first, the includes, exactly like this:
#include <stdlib.h>
#include 'erasurecode_backend.h'
#include 'erasurecode_helpers.h'
#include 'isa_l_common.h'
π§ Macros
#define ISA_L_RS_LRC_LIB_MAJOR 1#define ISA_L_RS_LRC_LIB_MINOR 0#define ISA_L_RS_LRC_LIB_REV 0#define ISA_L_RS_LRC_LIB_VER_STR '1.0'#define ISA_L_RS_LRC_LIB_NAME 'isa_l_rs_vand'#define ISA_L_RS_LRC_SO_NAME 'libisal' LIBERASURECODE_SO_SUFFIX '.so.2'
π¦ Functions
static int gen_encoding_matrix (isa_l_descriptor *desc, int m, int k)
static void * isa_l_rs_lrc_init (struct ec_backend_args *args, void *backend_sohandle)
static int isa_l_rs_lrc_check_reconstruct_fragments (void *desc, int *missing_idxs, int destination_idx)
static bool isa_l_rs_lrc_is_compatible_with (uint32_t version)
static unsigned char * get_lrc_inverse_rows (int k, int m, int min_range, int max_range, int missing_local_parity, unsigned char *decode_inverse, unsigned char *encode_matrix, struct ec_bm *missing_bm, gf_mul_func gf_mul)
static unsigned char * isa_l_lrc_get_decode_matrix (int k, int m, unsigned local_parity, unsigned char *encode_matrix, struct ec_bm *missing_bm, int *used_idxs, int *use_combined_parity)
static int isa_l_lrc_decode (void *desc, char **data, char **parity, int *missing_idxs, int blocksize)
static unsigned char * isa_l_lrc_get_reconstruct_matrix (int k, int m, unsigned local_parity, int destination_idx, unsigned char *encode_matrix, struct ec_bm *missing_bm, int *used_idxs, int *min_col, int *max_col, int *mx_size, int *missing_local_parity, int *use_combined_parity)
static int isa_l_lrc_reconstruct (void *desc, char **data, char **parity, int *missing_idxs, int destination_idx, int blocksize)
__attribute__ ((visibility('internal')))
π Variables
struct ec_backend_common backend_isa_l_rs_lrcstatic struct ec_backend_op_stubs isa_l_rs_lrc_op_stubs
π Macro Definition Documentation π
π ISA_L_RS_LRC_LIB_MAJOR
#define ISA_L_RS_LRC_LIB_MAJOR 1
Definition at line 34 of file isa_l_rs_lrc.c.
Referenced by __attribute__().
π ISA_L_RS_LRC_LIB_MINOR
#define ISA_L_RS_LRC_LIB_MINOR 0
Definition at line 35 of file isa_l_rs_lrc.c.
Referenced by __attribute__().
π ISA_L_RS_LRC_LIB_NAME
#define ISA_L_RS_LRC_LIB_NAME 'isa_l_rs_vand'
Definition at line 38 of file isa_l_rs_lrc.c.
Referenced by __attribute__().
π ISA_L_RS_LRC_LIB_REV
#define ISA_L_RS_LRC_LIB_REV 0
Definition at line 36 of file isa_l_rs_lrc.c.
Referenced by __attribute__().
π ISA_L_RS_LRC_LIB_VER_STR
#define ISA_L_RS_LRC_LIB_VER_STR '1.0'
Definition at line 37 of file isa_l_rs_lrc.c.
Referenced by __attribute__().
π ISA_L_RS_LRC_SO_NAME
#define ISA_L_RS_LRC_SO_NAME 'libisal' LIBERASURECODE_SO_SUFFIX '.so.2'
Definition at line 42 of file isa_l_rs_lrc.c.
Referenced by __attribute__().
π¦ Function Documentation π¦
π
__attribute__ ((visibility('internal')))
__attribute__ ((visibility('internal')))
Definition at line 866 of file isa_l_rs_lrc.c.
References backend_isa_l_rs_lrc, ISA_L_RS_LRC_LIB_MAJOR, ISA_L_RS_LRC_LIB_MINOR, ISA_L_RS_LRC_LIB_NAME, ISA_L_RS_LRC_LIB_REV, ISA_L_RS_LRC_LIB_VER_STR, isa_l_rs_lrc_op_stubs, and ISA_L_RS_LRC_SO_NAME.
π¦ gen_encoding_matrix
int gen_encoding_matrix (isa_l_descriptor * desc, int m, int k) [static]
Should never happen as it's a proper Vandermonde matrix, but belt & bracers...
Now we're ready to build the encoding matrix: inv(A') * A. Save some multiplies by going straight to I for the start.
Definition at line 48 of file isa_l_rs_lrc.c.
Referenced by isa_l_rs_lrc_init().
π¦ get_lrc_inverse_rows
unsigned char * get_lrc_inverse_rows (int k, int m, int min_range, int max_range, int missing_local_parity, unsigned char * decode_inverse, unsigned char * encode_matrix, struct ec_bm * missing_bm, gf_mul_func gf_mul) [static]
Definition at line 301 of file isa_l_rs_lrc.c.
Referenced by isa_l_lrc_decode(), and isa_l_lrc_reconstruct().
π¦ isa_l_lrc_decode
int isa_l_lrc_decode (void * desc, char ** data, char ** parity, int * missing_idxs, int blocksize) [static]
Definition at line 459 of file isa_l_rs_lrc.c.
References get_lrc_inverse_rows(), and isa_l_lrc_get_decode_matrix().
π¦ isa_l_lrc_get_decode_matrix
unsigned char * isa_l_lrc_get_decode_matrix (int k, int m, unsigned local_parity, unsigned char * encode_matrix, struct ec_bm * missing_bm, int * used_idxs, int * use_combined_parity) [static]
Definition at line 383 of file isa_l_rs_lrc.c.
Referenced by isa_l_lrc_decode(), and isa_l_lrc_get_reconstruct_matrix().
π¦ isa_l_lrc_get_reconstruct_matrix
unsigned char * isa_l_lrc_get_reconstruct_matrix (int k, int m, unsigned local_parity, int destination_idx, unsigned char * encode_matrix, struct ec_bm * missing_bm, int * used_idxs, int * min_col, int * max_col, int * mx_size, int * missing_local_parity, int * use_combined_parity) [static]
Definition at line 595 of file isa_l_rs_lrc.c.
References isa_l_lrc_get_decode_matrix().
Referenced by isa_l_lrc_reconstruct().
π¦ isa_l_lrc_reconstruct
int isa_l_lrc_reconstruct (void * desc, char ** data, char ** parity, int * missing_idxs, int destination_idx, int blocksize) [static]
- Get available elements and compute the inverse of their corresponding rows.
- Get the row needed to reconstruct
- Fill in the available elements
- Copy pointer of buffer to reconstruct
- Do the reconstruction
Definition at line 689 of file isa_l_rs_lrc.c.
References get_lrc_inverse_rows(), and isa_l_lrc_get_reconstruct_matrix().
π¦ isa_l_rs_lrc_check_reconstruct_fragments
int isa_l_rs_lrc_check_reconstruct_fragments (void * desc, int * missing_idxs, int destination_idx) [static]
Definition at line 229 of file isa_l_rs_lrc.c.
π¦ isa_l_rs_lrc_init
void * isa_l_rs_lrc_init (struct ec_backend_args * args, void * backend_sohandle) [static]
Generate the tables for encoding
Definition at line 124 of file isa_l_rs_lrc.c.
References gen_encoding_matrix().
π¦ isa_l_rs_lrc_is_compatible_with
bool isa_l_rs_lrc_is_compatible_with (uint32_t version) [static]
Definition at line 297 of file isa_l_rs_lrc.c.
References backend_isa_l_rs_lrc.
π Variable Documentation π
π backend_isa_l_rs_lrc
struct ec_backend_common backend_isa_l_rs_lrc
Definition at line 46 of file isa_l_rs_lrc.c.
Referenced by __attribute__(), and isa_l_rs_lrc_is_compatible_with().
π isa_l_rs_lrc_op_stubs
struct ec_backend_op_stubs isa_l_rs_lrc_op_stubs [static]
Initial value:
= {
.INIT = isa_l_rs_lrc_init,
.EXIT = isa_l_exit,
.ISSYSTEMATIC = 1,
.ENCODE = isa_l_encode,
.DECODE = isa_l_lrc_decode,
.FRAGSNEEDED = isa_l_min_fragments,
.RECONSTRUCT = isa_l_lrc_reconstruct,
.ELEMENTSIZE = isa_l_element_size,
.ISCOMPATIBLEWITH = isa_l_rs_lrc_is_compatible_with,
.GETMETADATASIZE = get_backend_metadata_size_zero,
.GETENCODEOFFSET = get_encode_offset_zero,
.CHECKRECONSTRUCTFRAGMENTS = isa_l_rs_lrc_check_reconstruct_fragments,
}
Definition at line 851 of file isa_l_rs_lrc.c.
Referenced by __attribute__().
π Author π
Generated automatically by Doxygen for liberasurecode from the source code.
π«Ά okay bestie, that's the whole page. the footer says Version1.8.0, datedTue Jan 1 1980 00:00, with the page path/build/sourc...sa_l_rs_lrc.c(3). slay, we preserved every line number, reference, macro, signature, and the Doxygen author note π β¨
π¦ where this page comes from
- nixpkgs unstable: liberasurecode 1.8.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms