Class GF256
java.lang.Object
org.apache.hadoop.io.erasurecode.rawcoder.util.GF256
A GaloisField utility class only caring of 256 fields for efficiency. Some
of the codes are borrowed from ISA-L implementation (C or ASM codes).
-
Method Summary
Modifier and TypeMethodDescriptionstatic byte[]gfBase()static bytegfInv(byte a) static voidgfInvertMatrix(byte[] inMatrix, byte[] outMatrix, int n) Invert a matrix assuming it's invertible.static byte[]static bytegfMul(byte a, byte b) static byte[][]gfMulTab()Get the big GF multiply table so utilize it efficiently.static voidgfVectMulInit(byte c, byte[] tbl, int offset) Ported from Intel ISA-L library.
-
Method Details
-
gfBase
public static byte[] gfBase() -
gfLogBase
public static byte[] gfLogBase() -
gfMulTab
public static byte[][] gfMulTab()Get the big GF multiply table so utilize it efficiently.- Returns:
- the big GF multiply table
-
gfMul
public static byte gfMul(byte a, byte b) -
gfInv
public static byte gfInv(byte a) -
gfInvertMatrix
public static void gfInvertMatrix(byte[] inMatrix, byte[] outMatrix, int n) Invert a matrix assuming it's invertible. Ported from Intel ISA-L library.- Parameters:
inMatrix- inMatrix.outMatrix- outMatrix.n- n
-
gfVectMulInit
public static void gfVectMulInit(byte c, byte[] tbl, int offset) Ported from Intel ISA-L library. Calculates const table gftbl in GF(2^8) from single input A gftbl(A) = {A{00}, A{01}, A{02}, ... , A{0f} }, {A{00}, A{10}, A{20}, ... , A{f0} } -- from ISA-L implementation.- Parameters:
c- c.tbl- tbl.offset- offset.
-