liberasurecode 1.8.0
Erasure Code API library
Loading...
Searching...
No Matches
Functions
isa_l_common.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"
#include "isa_l_common.h"

Go to the source code of this file.

Functions

 __attribute__ ((visibility("internal")))
 Return the element-size, which is the number of bits stored on a given device, per codeword.
 
static unsigned char * isa_l_get_decode_matrix (int k, int m, unsigned char *encode_matrix, int *missing_idxs)
 
static unsigned char * get_inverse_rows (int k, int m, unsigned char *decode_inverse, unsigned char *encode_matrix, int *missing_idxs, gf_mul_func gf_mul)
 

Function Documentation

◆ __attribute__()

__attribute__ ( (visibility("internal"))  )

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

Compute a size aligned to the number of data and the underlying wordsize of the EC algorithm.

Return total fragment length (on-disk, on-wire)

Deallocate memory buffer if it's not NULL.

Allocate a zero-ed buffer of a specific size.

This is always 8 in ISA-L

Returns the size in bits!

Parameters
sizeinteger size in bytes of buffer to allocate
Returns
pointer to start of allocated buffer or NULL on error

This methods returns NULL so that you can free and reset a buffer using a single line as follows:

my_ptr = check_and_free_buffer(my_ptr);

Returns
NULL
Parameters
buf- pointer to fragment buffer
Returns
fragment size on disk
Parameters
instance- ec_backend_t instance (to extract args)
data_len- integer length of data in bytes
Returns
integer data length aligned with wordsize of EC algorithm

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

Generate ISA-L encoding matrix Note that this is an abstract func from each backend

Generate the tables for encoding

Definition at line 39 of file isa_l_common.c.

◆ get_inverse_rows()

static unsigned char * get_inverse_rows ( int  k,
int  m,
unsigned char *  decode_inverse,
unsigned char *  encode_matrix,
int *  missing_idxs,
gf_mul_func  gf_mul 
)
static

Definition at line 84 of file isa_l_common.c.

◆ isa_l_get_decode_matrix()

static unsigned char * isa_l_get_decode_matrix ( int  k,
int  m,
unsigned char *  encode_matrix,
int *  missing_idxs 
)
static

Definition at line 55 of file isa_l_common.c.