From 8c35c8d4de621bf130865456c447815f9cb6f75c Mon Sep 17 00:00:00 2001 From: Christopher Taylor Date: Wed, 31 May 2017 01:20:17 -0700 Subject: [PATCH] Speed up decoder with new DIT-IFFT --- LeopardFF8.cpp | 26 +++++++++----------------- tests/benchmark.cpp | 4 ++-- 2 files changed, 11 insertions(+), 19 deletions(-) diff --git a/LeopardFF8.cpp b/LeopardFF8.cpp index 9fc1650..78ca61a 100644 --- a/LeopardFF8.cpp +++ b/LeopardFF8.cpp @@ -1345,23 +1345,14 @@ void ReedSolomonDecode( // work <- IFFT(work, n, 0) - const unsigned input_count = m + original_count; - unsigned mip_level = 0; - - for (unsigned width = 1; width < n; width <<= 1, ++mip_level) - { - const unsigned range = width << 1; - - for (unsigned j = width; j < n; j += range) - { - VectorIFFTButterfly( - buffer_bytes, - width, - work + j - width, - work + j, - FFTSkew[j - 1]); - } - } + IFFT_DIT( + buffer_bytes, + nullptr, + n, + work, + nullptr, + n, + FFTSkew - 1); // work <- FormalDerivative(work, n) @@ -1378,6 +1369,7 @@ void ReedSolomonDecode( // work <- FFT(work, n, 0) truncated to m + original_count + unsigned mip_level = LastNonzeroBit32(n); const unsigned output_count = m + original_count; for (unsigned width = (n >> 1); width > 0; width >>= 1, --mip_level) { diff --git a/tests/benchmark.cpp b/tests/benchmark.cpp index 7b05b05..aaf00d1 100644 --- a/tests/benchmark.cpp +++ b/tests/benchmark.cpp @@ -48,7 +48,7 @@ struct TestParameters unsigned original_count = 128; // under 65536 unsigned recovery_count = 128; // under 65536 - original_count #endif - unsigned buffer_bytes = 64; // multiple of 64 bytes + unsigned buffer_bytes = 64000; // multiple of 64 bytes unsigned loss_count = 32768; // some fraction of original_count unsigned seed = 2; bool multithreaded = true; @@ -399,7 +399,7 @@ static LEO_FORCE_INLINE void SIMDSafeFree(void* ptr) static bool BasicTest(const TestParameters& params) { - const unsigned kTrials = params.original_count > 8000 ? 1 : 100000; + const unsigned kTrials = params.original_count > 8000 ? 1 : 100; std::vector original_data(params.original_count);