Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
niconiconi committed Sep 10, 2024
1 parent 7d7db86 commit c50bdb4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions arith/src/extension_field/gf2_128x8/avx256.rs
Original file line number Diff line number Diff line change
Expand Up @@ -475,13 +475,13 @@ impl SimdField for AVX256GF2_128x8 {
fn pack_size() -> usize {
8
}

fn pack(base_vec: &[Self::Scalar]) -> Self {
debug_assert!(base_vec.len() == 8);
let base_vec_array: [Self::Scalar; 8] = base_vec.try_into().unwrap();
unsafe { transmute(base_vec_array) }
}

fn unpack(&self) -> Vec<Self::Scalar> {
let ret = unsafe { transmute::<[__m256i; 4], [Self::Scalar; 8]>(self.data) };
ret.to_vec()
Expand Down
4 changes: 2 additions & 2 deletions arith/src/field/m31/m31_avx256.rs
Original file line number Diff line number Diff line change
Expand Up @@ -282,13 +282,13 @@ impl SimdField for AVXM31 {
fn pack_size() -> usize {
M31_PACK_SIZE
}

fn pack(base_vec: &[Self::Scalar]) -> Self {
debug_assert_eq!(base_vec.len(), M31_PACK_SIZE);
let ret: [Self::Scalar; M31_PACK_SIZE] = base_vec.try_into().unwrap();
unsafe { transmute(ret) }
}

fn unpack(&self) -> Vec<Self::Scalar> {
let ret = unsafe { transmute::<[__m256i; 2], [Self::Scalar; M31_PACK_SIZE]>(self.v) };
ret.to_vec()
Expand Down

0 comments on commit c50bdb4

Please sign in to comment.