Skip to content

Commit

Permalink
chore: add avx acceleration to poseidon hash function
Browse files Browse the repository at this point in the history
  • Loading branch information
ibmp33 committed Nov 18, 2023
1 parent 7d3d076 commit 99c56a0
Show file tree
Hide file tree
Showing 7 changed files with 1,299 additions and 262 deletions.
4 changes: 4 additions & 0 deletions algebraic/src/arch/x86_64/avx2_field_gl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ impl Avx2GoldilocksField {
pub fn square(&self) -> Avx2GoldilocksField {
Self::new(unsafe { square(self.get()) })
}
#[inline]
pub fn reduce(x: __m256i, y: __m256i) -> Avx2GoldilocksField {
Self::new(unsafe {reduce128((x,y))})
}
}

unsafe impl PackedField for Avx2GoldilocksField {
Expand Down
Loading

0 comments on commit 99c56a0

Please sign in to comment.