Skip to content

Commit 33de59f

Browse files
Shnatselvstroebel
authored andcommitted
Roll back to last working configuration; something must be wrong with the stores
1 parent 7e055be commit 33de59f

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/avx2/fdct.rs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -457,10 +457,13 @@ fn fdct_avx2_internal(data: &mut [i16; 64]) {
457457
let ymm6 = _mm256_permute2x128_si256(ymm0, ymm4, 0x31); // ymm6=data4_5
458458
let ymm7 = _mm256_permute2x128_si256(ymm2, ymm4, 0x21); // ymm7=data6_7
459459

460-
avx_store(ymm3, &mut data[0..16].try_into().unwrap());
461-
avx_store(ymm5, &mut data[16..32].try_into().unwrap());
462-
avx_store(ymm6, &mut data[32..48].try_into().unwrap());
463-
avx_store(ymm7, &mut data[48..64].try_into().unwrap());
460+
unsafe {
461+
let out_data = core::mem::transmute::<*mut i16, *mut __m256i>(data.as_mut_ptr());
462+
_mm256_storeu_si256(out_data, ymm3);
463+
_mm256_storeu_si256(out_data.add(1), ymm5);
464+
_mm256_storeu_si256(out_data.add(2), ymm6);
465+
_mm256_storeu_si256(out_data.add(3), ymm7);
466+
}
464467
}
465468

466469
/// Safe wrapper for an unaligned AVX load

0 commit comments

Comments
 (0)