liberasurecode 1.6.3
Erasure Code API library
|
#include <dlfcn.h>
#include <alg_sig.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
Go to the source code of this file.
Macros | |
#define | GALOIS_SINGLE_MULTIPLY "galois_single_multiply" |
#define | GALOIS_UNINIT "galois_uninit_field" |
Functions | |
galois_single_multiply_func | get_galois_multi_func (void *handle) |
void | stub_galois_uninit_field (int w) |
galois_uninit_field_func | get_galois_uninit_func (void *handle) |
void * | get_jerasure_sohandle () |
int | load_gf_functions (void *sohandle, struct jerasure_mult_routines *routines) |
static alg_sig_t * | init_alg_sig_w8 (void *jerasure_sohandle, int sig_len) |
static alg_sig_t * | init_alg_sig_w16 (void *jerasure_sohandle, int sig_len) |
alg_sig_t * | init_alg_sig (int sig_len, int gf_w) |
void | destroy_alg_sig (alg_sig_t *alg_sig_handle) |
static int | compute_w8_alg_sig_32 (alg_sig_t *alg_sig_handle, char *buf, int len, char *sig) |
static int | compute_w16_alg_sig_64 (alg_sig_t *alg_sig_handle, char *buf, int len, char *sig) |
static int | compute_w16_alg_sig_32 (alg_sig_t *alg_sig_handle, char *buf, int len, char *sig) |
static int | compute_alg_sig_32 (alg_sig_t *alg_sig_handle, char *buf, int len, char *sig) |
static int | compute_alg_sig_64 (alg_sig_t *alg_sig_handle, char *buf, int len, char *sig) |
int | compute_alg_sig (alg_sig_t *alg_sig_handle, char *buf, int len, char *sig) |
Variables | |
int | valid_gf_w [] = { 8, 16, -1 } |
int | valid_pairs [][2] = { { 8, 32}, {16, 32}, {16, 64}, {-1, -1} } |
int compute_alg_sig | ( | alg_sig_t * | alg_sig_handle, |
char * | buf, | ||
int | len, | ||
char * | sig | ||
) |
Definition at line 425 of file alg_sig.c.
References compute_alg_sig_32(), and compute_alg_sig_64().
|
static |
Definition at line 406 of file alg_sig.c.
References compute_w16_alg_sig_32(), and compute_w8_alg_sig_32().
Referenced by compute_alg_sig().
|
static |
Definition at line 417 of file alg_sig.c.
References compute_w16_alg_sig_64().
Referenced by compute_alg_sig().
|
static |
This is the loop to optimize. It is currently optimized enough : using Horner's alg., shortened mult. tables, and other tricks.
Definition at line 359 of file alg_sig.c.
Referenced by compute_alg_sig_32().
|
static |
This is the loop to optimize. It is currently optimized enough : using Horner's alg., shortened mult. tables, and other tricks.
Definition at line 304 of file alg_sig.c.
Referenced by compute_alg_sig_64().
|
static |
This is the loop to optimize. It is currently optimized enough : using Horner's alg., shortened mult. tables, and other tricks.
Definition at line 275 of file alg_sig.c.
Referenced by compute_alg_sig_32().
galois_single_multiply_func get_galois_multi_func | ( | void * | handle | ) |
Definition at line 36 of file alg_sig.c.
References GALOIS_SINGLE_MULTIPLY.
Referenced by load_gf_functions().
galois_uninit_field_func get_galois_uninit_func | ( | void * | handle | ) |
Definition at line 52 of file alg_sig.c.
References GALOIS_UNINIT.
Referenced by load_gf_functions().
void * get_jerasure_sohandle | ( | ) |
Definition at line 67 of file alg_sig.c.
Referenced by init_alg_sig().
alg_sig_t * init_alg_sig | ( | int | sig_len, |
int | gf_w | ||
) |
Definition at line 216 of file alg_sig.c.
References get_jerasure_sohandle(), init_alg_sig_w16(), init_alg_sig_w8(), and valid_pairs.
|
static |
Definition at line 153 of file alg_sig.c.
References load_gf_functions().
Referenced by init_alg_sig().
|
static |
Definition at line 96 of file alg_sig.c.
References load_gf_functions().
Referenced by init_alg_sig().
int load_gf_functions | ( | void * | sohandle, |
struct jerasure_mult_routines * | routines | ||
) |
It is possible that the underlying Jerasure implementation is old (pre-jerasure.org). If so, there is not an uninit function, so these tests will fail.
Since nothing is using alg_sig at the moment, we stub the uninit function to unblock the tests. Once we plug the internal GF functions into alg_sig, this can jsut go away.
Definition at line 72 of file alg_sig.c.
References get_galois_multi_func(), get_galois_uninit_func(), and stub_galois_uninit_field().
Referenced by init_alg_sig_w16(), and init_alg_sig_w8().
void stub_galois_uninit_field | ( | int | w | ) |
Definition at line 50 of file alg_sig.c.
Referenced by load_gf_functions().
int valid_pairs[][2] = { { 8, 32}, {16, 32}, {16, 64}, {-1, -1} } |
Definition at line 34 of file alg_sig.c.
Referenced by init_alg_sig().