![]() |
BitPunch McEliece
v0.0.4
|
Go to the source code of this file.
Functions | |
void | BPU_gf2MatFree (BPU_T_GF2_Matrix **m) |
Free dynamically or statically allocated matrix. More... | |
void | BPU_gf2VecFree (BPU_T_GF2_Vector **v) |
Free dynamically or statically allocated vector. More... | |
int | BPU_gf2MatMalloc (BPU_T_GF2_Matrix **m, int rows, int cols) |
int | BPU_gf2VecMalloc (BPU_T_GF2_Vector **v, int len) |
int | BPU_gf2VecResize (BPU_T_GF2_Vector *v, int len) |
BPU_gf2VecResize Resize vecor. More... | |
int | BPU_gf2VecMallocElements (BPU_T_GF2_Vector *v, int len) |
BPU_gf2VecMallocElements Malloc vector elements and set to zero. More... | |
void | BPU_gf2SparsePolyMalloc (BPU_T_GF2_Sparse_Poly *p, int weight) |
void | BPU_gf2SparsePolyFree (BPU_T_GF2_Sparse_Poly *p, int is_dyn) |
void | BPU_gf2SparseQcMatrixMalloc (BPU_T_GF2_Sparse_Qc_Matrix *v, int element_count, int element_size, int isVertical) |
void | BPU_gf2SparseQcMatrixFree (BPU_T_GF2_Sparse_Qc_Matrix *v, int is_dyn) |
void | BPU_gf2PolyFree (BPU_T_GF2_Poly *p, int is_dyn) |
int | BPU_gf2PolyMalloc (BPU_T_GF2_Poly *p, int len) |
int | BPU_gf2QcMatrixMalloc (BPU_T_GF2_QC_Matrix *v, int element_count, int element_size, int isVertical, int is_I_appended) |
void | BPU_gf2QcMatrixFree (BPU_T_GF2_QC_Matrix *v, int is_dyn) |
void BPU_gf2MatFree | ( | BPU_T_GF2_Matrix ** | m | ) |
Free dynamically or statically allocated matrix.
Free dynamically or statically allocated matrix GF2.
[out] | *m | address of matrix object |
Definition at line 29 of file gf2types.c.
int BPU_gf2MatMalloc | ( | BPU_T_GF2_Matrix ** | m, |
int | rows, | ||
int | cols | ||
) |
Allocate memory for matrix GF2. It also nulls new matrix. After work you have to free memory using call BPU_freeMatGF2
rows | rows |
cols | cols |
Definition at line 54 of file gf2types.c.
void BPU_gf2PolyFree | ( | BPU_T_GF2_Poly * | p, |
int | is_dyn | ||
) |
Free dynamically or statically allocated polynomial over GF2.
p | polynomial to free |
is_dyn | boolean param, if 0 do not free object self, else free also object |
Definition at line 187 of file gf2types.c.
int BPU_gf2PolyMalloc | ( | BPU_T_GF2_Poly * | p, |
int | len | ||
) |
Allocate memory for polynomial over GF2. Allocate memory, so after work it has to be freed by using call BPU_gf2PolyFree.
p | polynomial to allocate |
len | length of polynomial (length - 1 = degree of polynomial) |
Definition at line 195 of file gf2types.c.
void BPU_gf2QcMatrixFree | ( | BPU_T_GF2_QC_Matrix * | v, |
int | is_dyn | ||
) |
Free dynamically or statically allocated quasi-cyclic matrix over GF2.
v | quasi-cyclic matrix |
is_dyn | boolean param, if 0 do not free object self, else free also object |
Definition at line 251 of file gf2types.c.
int BPU_gf2QcMatrixMalloc | ( | BPU_T_GF2_QC_Matrix * | v, |
int | element_count, | ||
int | element_size, | ||
int | isVertical, | ||
int | is_I_appended | ||
) |
Allocate memory for quasi-cyclic matrix over GF2. Allocate memory, so after work it has to be freed by using call BPU_gf2QcMatrixFree.
v | quasi-cyclic matrix |
element_count | count of cyclic elements |
element_size | size of one cyclic element |
isVertical | boolean, if 1, elements are in vertical orientation, if 0 horizontal orientation |
is_I_appended | boolean, if 1, identity matrix is appended to the left, if 0, no identity matrix |
Definition at line 220 of file gf2types.c.
void BPU_gf2SparsePolyFree | ( | BPU_T_GF2_Sparse_Poly * | p, |
int | is_dyn | ||
) |
Free dynamically or statically allocated sparse polynomial over GF2.
p | sparse polynomial to free |
is_dyn | boolean param, if 0 do not free object self, else free also object |
Definition at line 147 of file gf2types.c.
void BPU_gf2SparsePolyMalloc | ( | BPU_T_GF2_Sparse_Poly * | p, |
int | weight | ||
) |
Allocate memory for sparse polynomial over GF2. Allocate memory, so after work it has to be freed by using call BPU_gf2SparsePolyFree.
p | sparse polynomial to allocate |
weight | weight of sparse polynomial |
Definition at line 140 of file gf2types.c.
void BPU_gf2SparseQcMatrixFree | ( | BPU_T_GF2_Sparse_Qc_Matrix * | v, |
int | is_dyn | ||
) |
Free dynamically or statically allocated sparse quasi-cyclic matrix over GF2.
v | sparse quasi-cyclic matrix |
is_dyn | boolean param, if 0 do not free object self, else free also object |
Definition at line 174 of file gf2types.c.
void BPU_gf2SparseQcMatrixMalloc | ( | BPU_T_GF2_Sparse_Qc_Matrix * | v, |
int | element_count, | ||
int | element_size, | ||
int | isVertical | ||
) |
Allocate memory for sparse quasi-cyclic matrix over GF2. Allocate memory, so after work it has to be freed by using call BPU_gf2SparseQcMatrixFree.
v | sparse quasi-cyclic matrix |
element_count | count of cyclic elements |
element_size | size of one cyclic element |
isVertical | boolean, if 1, elements are in vertical orientation, if 0 horizontal orientation |
Definition at line 154 of file gf2types.c.
void BPU_gf2VecFree | ( | BPU_T_GF2_Vector ** | v | ) |
Free dynamically or statically allocated vector.
Free dynamically or statically allocated vector GF2.
[out] | *m | address of vector object |
Definition at line 45 of file gf2types.c.
int BPU_gf2VecMalloc | ( | BPU_T_GF2_Vector ** | v, |
int | len | ||
) |
Allocate memory for vector GF2. It also null vector. After work you have to free memory using call BPU_freeVecGF2.
len | len of vector |
Definition at line 97 of file gf2types.c.
int BPU_gf2VecMallocElements | ( | BPU_T_GF2_Vector * | v, |
int | len | ||
) |
BPU_gf2VecMallocElements Malloc vector elements and set to zero.
v | |
len |
Definition at line 114 of file gf2types.c.
int BPU_gf2VecResize | ( | BPU_T_GF2_Vector * | v, |
int | len | ||
) |