18 #ifndef BPUT_GF2TYPES_H
19 #define BPUT_GF2TYPES_H
104 #define BPU_gf2MatNullRow(m_pointer, row) memset((void *) ((m_pointer)->elements[row]), 0, (m_pointer)->element_bit_size / 8 * (m_pointer)->elements_in_row)
111 #define BPU_gf2VecNull(v_pointer) memset((void *) ((v_pointer)->elements), 0, (v_pointer)->element_bit_size / 8 * (v_pointer)->elements_in_row)
243 #endif // BPUT_GF2TYPES_H
void BPU_gf2VecFree(BPU_T_GF2_Vector **v)
Free dynamically or statically allocated vector.
uint32_t weight
weight of polynomial
BPU_T_GF2_Sparse_Poly * matrices
all cyclic matrices of matrix
uint8_t isVertical
if 1, elements are in vertical orientation, if 0 horizontal orientation
uint32_t k
rows of whole matrix
uint16_t element_count
number of cyclic matrices
uint16_t elements_in_row
number of elements in one row
struct _BPU_T_GF2_Sparse_Qc_Matrix BPU_T_GF2_Sparse_Qc_Matrix
uint32_t element_size
size of cyclic matrix
uint8_t is_I_appended
if matrix has identity matrix on left
uint32_t * index
indexes of set coefficients. 0 is coefficient for x^0
void BPU_gf2MatFree(BPU_T_GF2_Matrix **m)
Free dynamically or statically allocated matrix.
BPU_T_GF2_Vector BPU_T_GF2_Poly
uint32_t k
rows of whole matrix
int BPU_gf2VecMallocElements(BPU_T_GF2_Vector *v, int len)
BPU_gf2VecMallocElements Malloc vector elements and set to zero.
uint32_t n
cols of whole matrix
uint8_t element_bit_size
element size, is sizeof(BPU_T_GF2) i.e. 64 bits
uint32_t element_size
size of cyclic matrix
BPU_T_GF2 * elements
all element of matrix
void BPU_gf2PolyFree(BPU_T_GF2_Poly *p, int is_dyn)
void BPU_gf2QcMatrixFree(BPU_T_GF2_QC_Matrix *v, int is_dyn)
struct _BPU_T_GF2_QC_Matrix BPU_T_GF2_QC_Matrix
uint16_t element_count
number of cyclic matrices
struct _BPU_T_GF2_Sparse_Poly BPU_T_GF2_Sparse_Poly
uint16_t elements_in_row
number of elements in one row
void BPU_gf2SparseQcMatrixFree(BPU_T_GF2_Sparse_Qc_Matrix *v, int is_dyn)
struct _BPU_T_GF2_Vector BPU_T_GF2_Vector
int BPU_gf2PolyMalloc(BPU_T_GF2_Poly *p, int len)
void BPU_gf2SparsePolyFree(BPU_T_GF2_Sparse_Poly *p, int is_dyn)
int BPU_gf2MatMalloc(BPU_T_GF2_Matrix **m, int rows, int cols)
struct _BPU_T_GF2_Matrix BPU_T_GF2_Matrix
BPU_T_GF2_Poly * matrices
all cyclic matrices of matrix
void BPU_gf2SparseQcMatrixMalloc(BPU_T_GF2_Sparse_Qc_Matrix *v, int element_count, int element_size, int isVertical)
int BPU_gf2VecResize(BPU_T_GF2_Vector *v, int len)
BPU_gf2VecResize Resize vecor.
uint8_t element_bit_size
element size, is sizeof(BPU_T_GF2) i.e. 64 bits
uint8_t isVertical
if 1, elements are in vertical orientation, if 0 horizontal orientation
int BPU_gf2QcMatrixMalloc(BPU_T_GF2_QC_Matrix *v, int element_count, int element_size, int isVertical, int is_I_appended)
void BPU_gf2SparsePolyMalloc(BPU_T_GF2_Sparse_Poly *p, int weight)
uint32_t n
cols of whole matrix
BPU_T_GF2 ** elements
all element of matrix
int BPU_gf2VecMalloc(BPU_T_GF2_Vector **v, int len)