|
liberasurecode 1.8.0
Erasure Code API library
|
#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) |
| __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!
| size | integer size in bytes of buffer to allocate |
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);
| buf | - pointer to fragment buffer |
| instance | - ec_backend_t instance (to extract args) |
| data_len | - integer length of data in bytes |
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.
|
static |
Definition at line 84 of file isa_l_common.c.
|
static |
Definition at line 55 of file isa_l_common.c.