square_transpose

Function square_transpose 

Source
pub fn square_transpose<P: PackedField>(log_n: usize, elems: &mut [P])
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.

§Preconditions

  • log_n must be at most P::LOG_WIDTH.
  • elems.len() must be a power of two and at least 2^log_n.