Generalise transpose

So that it also works with eg `u64`, not just with field elements.
This commit is contained in:
Matthias Goergens 2023-07-31 23:04:45 +08:00
parent 5b8740a729
commit 7537193d45

View File

@ -19,7 +19,7 @@ pub(crate) fn transpose_poly_values<F: Field>(polys: Vec<PolynomialValues<F>>) -
transpose(&poly_values)
}
pub fn transpose<F: Field>(matrix: &[Vec<F>]) -> Vec<Vec<F>> {
pub fn transpose<T: Send + Sync + Copy>(matrix: &[Vec<T>]) -> Vec<Vec<T>> {
let len = matrix[0].len();
(0..len)
.into_par_iter()