Trait fletcher::FletcherAccumulator [−][src]
pub trait FletcherAccumulator: Sized + Copy + Default + From<Self::InputType> + Add + From<<Self as Add>::Output> + AddAssign + BitAnd + From<<Self as BitAnd>::Output> + BitOr + From<<Self as BitOr>::Output> + Shl<u16> + From<<Self as Shl<u16>>::Output> + Shr<u16> + From<<Self as Shr<u16>>::Output> + PartialEq {
type InputType: Copy;
const MAX_CHUNK_SIZE: usize;
const BIT_MASK: Self;
const SHIFT_AMOUNT: u16;
}
Expand description
Base set of values and
Associated Types
Associated Constants
const MAX_CHUNK_SIZE: usize
const MAX_CHUNK_SIZE: usize
The maximum summations that can happen before accumulator overflows. This can be determined by putting the maximum word value into the algorithm and counting the number of words can be added before an overflow occurs.
Bit masking pattern to use in the reduce step. This should
mask out the least significant half of the value, i.e. 0x00ff
for
16 bit values
const SHIFT_AMOUNT: u16
const SHIFT_AMOUNT: u16
The number of bit spaces needed to shift the most significant half of the value into the least significant half of the value. This is typically half the bit width of the type, i.e. 8 for 16 bit values