Skip to content

Commit

Permalink
Statically ensure SIMD factor always matches expectations
Browse files Browse the repository at this point in the history
  • Loading branch information
nazar-pc committed Oct 11, 2023
1 parent 67944c1 commit 6ec3001
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions crates/subspace-proof-of-space/src/chiapos/table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ pub(super) fn compute_f1_simd<const K: u8>(
) -> [Y; COMPUTE_F1_SIMD_FACTOR] {
// Each element contains `K` desired bits of `partial_ys` in the final offset of eventual `ys`
// with the rest of bits being in undefined state
let pre_ys_bytes = Simd::from(seq!(N in 0..8 {
let pre_ys_bytes: Simd<_, COMPUTE_F1_SIMD_FACTOR> = Simd::from(seq!(N in 0..8 {
[
#(
{
Expand All @@ -212,7 +212,7 @@ pub(super) fn compute_f1_simd<const K: u8>(
)*
]
}));
let pre_ys_right_offset = Simd::from(seq!(N in 0..8 {
let pre_ys_right_offset: Simd<_, COMPUTE_F1_SIMD_FACTOR> = Simd::from(seq!(N in 0..8 {
[
#(
{
Expand Down Expand Up @@ -515,7 +515,7 @@ where
.array_chunks::<{ K as usize * COMPUTE_F1_SIMD_FACTOR / u8::BITS as usize }>()
.copied(),
) {
let xs = seq!(N in 0..8 {
let xs: [_; COMPUTE_F1_SIMD_FACTOR] = seq!(N in 0..8 {
[
#(
#[allow(clippy::erasing_op, clippy::identity_op)]
Expand Down Expand Up @@ -551,7 +551,7 @@ where
.array_chunks::<{ K as usize * COMPUTE_F1_SIMD_FACTOR / u8::BITS as usize }>()
.copied(),
) {
let xs = seq!(N in 0..8 {
let xs: [_; COMPUTE_F1_SIMD_FACTOR] = seq!(N in 0..8 {
[
#(
#[allow(clippy::erasing_op, clippy::identity_op)]
Expand Down

0 comments on commit 6ec3001

Please sign in to comment.