liberasurecode  1.6.1
Erasure Code API library
Macros | Functions | Variables
rs_galois.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

Go to the source code of this file.

Macros

#define PRIM_POLY   0x1100b
 
#define FIELD_SIZE   (1 << 16)
 
#define GROUP_SIZE   (FIELD_SIZE - 1)
 

Functions

void rs_galois_init_tables ()
 
void rs_galois_deinit_tables ()
 
int rs_galois_mult (int x, int y)
 
int rs_galois_div (int x, int y)
 
int rs_galois_inverse (int x)
 

Variables

int * log_table = NULL
 
int * ilog_table = NULL
 
int * ilog_table_begin = NULL
 

Macro Definition Documentation

◆ FIELD_SIZE

#define FIELD_SIZE   (1 << 16)

Definition at line 41 of file rs_galois.c.

◆ GROUP_SIZE

#define GROUP_SIZE   (FIELD_SIZE - 1)

Definition at line 42 of file rs_galois.c.

◆ PRIM_POLY

#define PRIM_POLY   0x1100b

Definition at line 40 of file rs_galois.c.

Function Documentation

◆ rs_galois_deinit_tables()

void rs_galois_deinit_tables ( )

Definition at line 68 of file rs_galois.c.

References ilog_table_begin, and log_table.

Referenced by deinit_liberasurecode_rs_vand().

◆ rs_galois_div()

int rs_galois_div ( int  x,
int  y 
)

Definition at line 85 of file rs_galois.c.

References ilog_table, and log_table.

Referenced by rs_galois_inverse().

◆ rs_galois_init_tables()

void rs_galois_init_tables ( )

Definition at line 48 of file rs_galois.c.

References FIELD_SIZE, GROUP_SIZE, ilog_table, ilog_table_begin, log_table, and PRIM_POLY.

Referenced by init_liberasurecode_rs_vand().

◆ rs_galois_inverse()

int rs_galois_inverse ( int  x)

Definition at line 98 of file rs_galois.c.

References rs_galois_div().

Referenced by gaussj_inversion(), and make_systematic_matrix().

◆ rs_galois_mult()

int rs_galois_mult ( int  x,
int  y 
)

Variable Documentation

◆ ilog_table

int* ilog_table = NULL

Definition at line 45 of file rs_galois.c.

Referenced by rs_galois_div(), rs_galois_init_tables(), and rs_galois_mult().

◆ ilog_table_begin

int* ilog_table_begin = NULL

Definition at line 46 of file rs_galois.c.

Referenced by rs_galois_deinit_tables(), and rs_galois_init_tables().

◆ log_table

int* log_table = NULL