diff --git a/crates/prover/src/core/backend/simd/very_packed_m31.rs b/crates/prover/src/core/backend/simd/very_packed_m31.rs index e7617b020..781212d6f 100644 --- a/crates/prover/src/core/backend/simd/very_packed_m31.rs +++ b/crates/prover/src/core/backend/simd/very_packed_m31.rs @@ -7,7 +7,7 @@ use super::cm31::PackedCM31; use super::m31::{PackedM31, N_LANES}; use super::qm31::PackedQM31; use crate::core::fields::cm31::CM31; -use crate::core::fields::m31::{pow2147483645, M31}; +use crate::core::fields::m31::M31; use crate::core::fields::qm31::QM31; use crate::core::fields::FieldExpOps; @@ -246,9 +246,8 @@ impl One for Vectorized { impl FieldExpOps for Vectorized { fn inverse(&self) -> Self { - Vectorized::from_fn(|i| { - assert!(!self.0[i].is_zero(), "0 has no inverse"); - pow2147483645(self.0[i]) - }) + let mut dst = [A::zero(); N]; + A::batch_inverse(&self.0, &mut dst); + dst.into() } }