Expand description
Low-level building blocks for Reed-Solomon encoding/decoding.
This is an advanced module which is not needed for simple usage or basic usage.
This module is relevant if you want to
- use
rate
module and need anEngine
to use with it. - create your own
Engine
. - understand/benchmark/test at low level.
§Engines
An Engine
is an implementation of basic low-level algorithms
needed for Reed-Solomon encoding/decoding.
Naive
- Simple reference implementation.
NoSimd
- Basic optimized engine without SIMD so that it works on all CPUs.
DefaultEngine
- Default engine which is used when no specific engine is given.
- Currently just alias to
NoSimd
.
§Benchmarks
- These benchmarks are from
cargo bench engine
with 3.4 GHz i5-3570K (Ivy Bridge, 3rd gen.). - Shards are 1024 bytes.
Modules§
Structs§
- Naive
- Simple reference implementation of
Engine
. - NoSimd
- Optimized
Engine
without SIMD. - Shards
RefMut - Mutable reference to shard array implemented as flat byte array.
Constants§
- CANTOR_
BASIS - TODO
- GF_BITS
- Size of Galois field element
GfElement
in bits. - GF_
MODULUS GF_ORDER - 1
- GF_
ORDER - Galois field order, i.e. number of elements.
- GF_
POLYNOMIAL - Galois field polynomial.
Traits§
- Engine
- Implementation of basic low-level algorithms needed for Reed-Solomon encoding/decoding.
Functions§
- add_mod
- Some kind of addition.
- checked_
next_ multiple_ of - Returns smallest value that is greater than or equal to
a
and multiple ofb
, orNone
ifb
is zero or operation would overflow. - sub_mod
- Some kind of subtraction.
Type Aliases§
- Default
Engine - Default
Engine
, currently just alias toNoSimd
. - GfElement
- Galois field element.