From 58a34520fdbc6bbbf08c3557416ba8aadadaf54a Mon Sep 17 00:00:00 2001
From: Shahar Papini <43779613+spapinistarkware@users.noreply.github.com>
Date: Thu, 4 Apr 2024 16:24:46 +0300
Subject: [PATCH] WideFib test with AVX Backend (#492)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
This change is [](https://reviewable.io/reviews/starkware-libs/stwo/492)
---
src/commitment_scheme/blake2_hash.rs | 1 +
src/core/air/accumulation.rs | 15 +-
src/core/backend/avx512/blake2s.rs | 37 ++--
src/examples/wide_fibonacci/avx.rs | 182 ++++++++++++++++++
.../wide_fibonacci/constraint_eval.rs | 35 ++--
src/examples/wide_fibonacci/mod.rs | 10 +-
6 files changed, 236 insertions(+), 44 deletions(-)
create mode 100644 src/examples/wide_fibonacci/avx.rs
diff --git a/src/commitment_scheme/blake2_hash.rs b/src/commitment_scheme/blake2_hash.rs
index b530a083a..5bc8f26a5 100644
--- a/src/commitment_scheme/blake2_hash.rs
+++ b/src/commitment_scheme/blake2_hash.rs
@@ -3,6 +3,7 @@ use std::fmt;
use blake2::{Blake2s256, Digest};
// Wrapper for the blake2s hash type.
+#[repr(align(32))]
#[derive(Clone, Copy, PartialEq, Default, Eq)]
pub struct Blake2sHash([u8; 32]);
diff --git a/src/core/air/accumulation.rs b/src/core/air/accumulation.rs
index c66828469..c3d9be479 100644
--- a/src/core/air/accumulation.rs
+++ b/src/core/air/accumulation.rs
@@ -51,7 +51,7 @@ pub struct DomainEvaluationAccumulator {
/// Each `sub_accumulation` holds the sum over all columns i of that log_size, of
/// `evaluation_i * alpha^(N - 1 - i)`
/// where `N` is the total number of evaluations.
- sub_accumulations: Vec>,
+ sub_accumulations: Vec