aboutsummaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2023-10-10 07:01:51 -0700
committerChris Robinson <[email protected]>2023-10-10 07:01:51 -0700
commit9274190020659369ef0734d6314d9f89cce889b0 (patch)
treeb938ea84cda2eaa08991d14e3db3efe0d114f386 /common
parent4ef42544d8223060632d4f073b0fa4c059053619 (diff)
Fix array lookup index
Diffstat (limited to 'common')
-rw-r--r--common/pffft.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/common/pffft.cpp b/common/pffft.cpp
index 1ec7514a..c01c8988 100644
--- a/common/pffft.cpp
+++ b/common/pffft.cpp
@@ -1421,6 +1421,7 @@ PFFFT_Setup *pffft_new_setup(unsigned int N, pffft_transform_t transform)
if constexpr(SIMD_SZ > 1)
{
al::vector<float,16> e(2u*Ncvec*(SIMD_SZ-1));
+ std::fill(e.begin(), e.end(), 0.0f);
for(size_t k{0};k < s->Ncvec;++k)
{
const size_t i{k / SIMD_SZ};
@@ -1739,8 +1740,8 @@ NEVER_INLINE(void) pffft_real_preprocess(const size_t Ncvec, const v4sf *in, v4s
std::array<float,SIMD_SZ> Xr, Xi;
for(size_t k{0};k < SIMD_SZ;++k)
{
- Xr[k] = VEXTRACT0(in[4*k]);
- Xi[k] = VEXTRACT0(in[4*k + 1]);
+ Xr[k] = VEXTRACT0(in[2*k]);
+ Xi[k] = VEXTRACT0(in[2*k + 1]);
}
pffft_real_preprocess_4x4(in, e, out+1, true); // will write only 6 values