GF256 (Apache Hadoop Common 3.5.0 API)
Description: declaration: package: org.apache.hadoop.io.erasurecode.rawcoder.util, class: GF256

Package org.apache.hadoop.io.erasurecode.rawcoder.util

# Class GF256

java.lang.Object
org.apache.hadoop.io.erasurecode.rawcoder.util.GF256

@Private public final class GF256 extends Object
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 Type
  Method
  Description
  `static byte[]`
  `gfBase()`
  `static byte`
  `gfInv(byte a)`
  `static void`
  `gfInvertMatrix(byte[] inMatrix, byte[] outMatrix, int n)`
  Invert a matrix assuming it's invertible.
  `static byte[]`
  `gfLogBase()`
  `static byte`
  `gfMul(byte a, byte b)`
  `static byte[][]`
  `gfMulTab()`
  Get the big GF multiply table so utilize it efficiently.
  `static void`
  `gfVectMulInit(byte c, byte[] tbl, int offset)`
  Ported from Intel ISA-L library.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## 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.