binius_field

Module byte_iteration

Source

Structs§

Traits§

  • Callback for byte iteration. We can’t return different types from the iterate_bytes and Fn traits don’t support associated types that’s why we use a callback with a generic function.
  • Scalars collection abstraction. This trait is used to abstract over different types of collections of field elements.

Functions§

  • Returns if we can iterate over bytes, each representing 8 1-bit values.
  • Create a lookup table for partial sums of 8 consequent elements with coefficients corresponding to bits in a byte. The lookup table has the following structure: [ partial_sum_chunk_0_7_byte_0, partial_sum_chunk_0_7_byte_1, …, partial_sum_chunk_0_7_byte_255, partial_sum_chunk_8_15_byte_0, partial_sum_chunk_8_15_byte_1, …, partial_sum_chunk_8_15_byte_255, … ]
  • Returns true if T implements SequentialBytes trait. Use a hack that exploits that array copying is optimized for the Copy types. Unfortunately there is no more proper way to perform this check this in Rust at runtime.
  • Iterate over bytes of a slice of the packed values. The method panics if the packed field doesn’t support byte iteration, so use can_iterate_bytes to check it.