Class CodingLoopBase

java.lang.Object
com.reve.reed.solomon.coding.CodingLoopBase
All Implemented Interfaces:
CodingLoop
Direct Known Subclasses:
ByteInputOutputExpCodingLoop, ByteInputOutputTableCodingLoop, ByteOutputInputExpCodingLoop, ByteOutputInputTableCodingLoop, InputByteOutputExpCodingLoop, InputByteOutputTableCodingLoop, InputOutputByteExpCodingLoop, InputOutputByteTableCodingLoop, OutputByteInputExpCodingLoop, OutputByteInputTableCodingLoop, OutputInputByteExpCodingLoop, OutputInputByteTableCodingLoop

public abstract class CodingLoopBase extends Object implements CodingLoop
Common implementations for coding loops. Many of the coding loops do not have custom checkSomeShards() methods. The benchmark doesn't measure that method.
  • Field Summary

    Fields inherited from interface com.reve.reed.solomon.coding.CodingLoop

    ALL_CODING_LOOPS
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    checkSomeShards(byte[][] matrixRows, byte[][] inputs, int inputCount, byte[][] toCheck, int checkCount, int offset, int byteCount, byte[] tempBuffer)
    Multiplies a subset of rows from a coding matrix by a full set of input shards to produce some output shards, and checks that the the data is those shards matches what's expected.

    Methods inherited from class java.lang.Object

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

    Methods inherited from interface com.reve.reed.solomon.coding.CodingLoop

    codeSomeShards
  • Constructor Details

    • CodingLoopBase

      public CodingLoopBase()
  • Method Details

    • checkSomeShards

      public boolean checkSomeShards(byte[][] matrixRows, byte[][] inputs, int inputCount, byte[][] toCheck, int checkCount, int offset, int byteCount, byte[] tempBuffer)
      Description copied from interface: CodingLoop
      Multiplies a subset of rows from a coding matrix by a full set of input shards to produce some output shards, and checks that the the data is those shards matches what's expected.
      Specified by:
      checkSomeShards in interface CodingLoop
      Parameters:
      matrixRows - The rows from the matrix to use.
      inputs - An array of byte arrays, each of which is one input shard. The inputs array may have extra buffers after the ones that are used. They will be ignored. The number of inputs used is determined by the length of the each matrix row.
      inputCount - THe number of input byte arrays.
      toCheck - Byte arrays where the computed shards are stored. The outputs array may also have extra, unused, elements at the end. The number of outputs computed, and the number of matrix rows used, is determined by outputCount.
      checkCount - The number of outputs to compute.
      offset - The index in the inputs and output of the first byte to process.
      byteCount - The number of bytes to process.
      tempBuffer - A place to store temporary results. May be null.