binius_field::transpose

Function square_transpose

source
pub fn square_transpose<P: PackedField>(
    log_n: usize,
    elems: &mut [P],
) -> Result<(), Error>
Expand description

Transpose square blocks of elements within packed field elements in place.

The input elements are interpreted as a rectangular matrix with height n = 2^n in row-major order. This matrix is interpreted as a vector of square matrices of field elements, and each square matrix is transposed in-place.

ยงArguments

  • log_n: The base-2 logarithm of the dimension of the n x n square matrix. Must be less than or equal to the base-2 logarithm of the packing width.
  • elems: The packed field elements, length is a power-of-two multiple of 1 << log_n.