Crate guff_matrix[][src]

Expand description

Fast SIMD matrix multiplication for finite fields

This crate implements two things:

  1. Fast SIMD-based multiplication of vectors of finite field elements (GF(28) with the polynomial 0x11b)

  2. A (cache-friendly) matrix multiplication routine based on achieving 100% utilisation of the above

This crate supports x86_64 and Arm (v7, v8) with NEON extensions.

The matrix multiplication routine is heavily geared towards use in implementing Reed-Solomon or Information Dispersal Algorithm error-correcting codes.

For x86_64 and Armv8 (Aarch64), building requires no extra options:

cargo build

It seems that on armv7 platforms, the rust build system is unable to detect the availability of target_feature = "neon". As a result, I’ve added “neon” as a build feature instead. Select it with:

RUSTFLAGS="-C target-cpu=native" cargo build --features neon

Software Simulation Feature

I’ve implemented a pure Rust version of the matrix multiplication code. It uses the same basic idea as the optimised versions, although for clarity, it works a byte at a time instead of simulating SIMD multiplication on 8 or 16 bytes at a time.

Modules

x86_64-specific SIMD

Functions