Skip to main content

ButterflyField

Trait ButterflyField 

Source
pub trait ButterflyField: TowerLevel {
    // Required method
    fn butterfly<const INVERSE: bool>(lo: &mut [Self], hi: &mut [Self], t: Self);
}
Expand description

A field the additive transform has a butterfly kernel for.

Every tower level implements this, so the bound admits exactly what the transform did. The supertrait is sealed, so no type outside the field crate can gain an implementation.

What differs between levels is how much of the twiddle’s structure the kernel can use.

Required Methods§

Source

fn butterfly<const INVERSE: bool>(lo: &mut [Self], hi: &mut [Self], t: Self)

Send (lo, hi) to (lo + t*hi, lo + (t + 1)*hi), element by element.

Setting the flag applies the inverse of that map instead.

Callers outside a transform may use this as a standalone kernel over two runs.

§Panics

Panics if the two runs have different lengths.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl ButterflyField for BinaryField2

Source§

fn butterfly<const INVERSE: bool>(lo: &mut [Self], hi: &mut [Self], t: Self)

Source§

impl ButterflyField for BinaryField4

Source§

fn butterfly<const INVERSE: bool>(lo: &mut [Self], hi: &mut [Self], t: Self)

Source§

impl ButterflyField for BinaryField8

Source§

fn butterfly<const INVERSE: bool>(lo: &mut [Self], hi: &mut [Self], t: Self)

Source§

impl ButterflyField for BinaryField16

Source§

fn butterfly<const INVERSE: bool>(lo: &mut [Self], hi: &mut [Self], t: Self)

Source§

impl ButterflyField for BinaryField32

Source§

fn butterfly<const INVERSE: bool>(lo: &mut [Self], hi: &mut [Self], t: Self)

Source§

impl ButterflyField for BinaryField64

Source§

fn butterfly<const INVERSE: bool>(lo: &mut [Self], hi: &mut [Self], t: Self)

Source§

impl ButterflyField for BinaryField128

Source§

fn butterfly<const INVERSE: bool>(lo: &mut [Self], hi: &mut [Self], t: Self)

Source§

impl ButterflyField for Gf2

Source§

fn butterfly<const INVERSE: bool>(lo: &mut [Self], hi: &mut [Self], t: Self)

Source§

impl ButterflyField for Ghash128

Source§

fn butterfly<const INVERSE: bool>(lo: &mut [Self], hi: &mut [Self], t: Self)

Source§

impl ButterflyField for Poly64

Source§

fn butterfly<const INVERSE: bool>(lo: &mut [Self], hi: &mut [Self], t: Self)

Implementors§