Skip to content

Commit

Permalink
SIMD backend for poseidon252 merkle ops - CPU IMPL
Browse files Browse the repository at this point in the history
  • Loading branch information
shaharsamocha7 authored and ohad-starkware committed Nov 25, 2024
1 parent 6de095b commit 21af0b4
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions crates/prover/src/constraint_framework/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -243,25 +243,26 @@ impl<'a, F: Clone, EF: RelationEFTraitBound<F>, R: Relation<F, EF>> RelationEntr
}
}

#[macro_export]
macro_rules! relation {
($name:tt, $size:tt) => {
#[derive(Clone, Debug, PartialEq)]
pub struct $name(crate::constraint_framework::logup::LookupElements<$size>);
pub struct $name($crate::constraint_framework::logup::LookupElements<$size>);

#[allow(dead_code)]
impl $name {
pub fn dummy() -> Self {
Self(crate::constraint_framework::logup::LookupElements::dummy())
Self($crate::constraint_framework::logup::LookupElements::dummy())
}
pub fn draw(channel: &mut impl crate::core::channel::Channel) -> Self {
Self(crate::constraint_framework::logup::LookupElements::draw(
pub fn draw(channel: &mut impl $crate::core::channel::Channel) -> Self {
Self($crate::constraint_framework::logup::LookupElements::draw(
channel,
))
}
}

impl<F: Clone, EF: crate::constraint_framework::RelationEFTraitBound<F>>
crate::constraint_framework::Relation<F, EF> for $name
impl<F: Clone, EF: $crate::constraint_framework::RelationEFTraitBound<F>>
$crate::constraint_framework::Relation<F, EF> for $name
{
fn combine(&self, values: &[F]) -> EF {
values
Expand Down

0 comments on commit 21af0b4

Please sign in to comment.