From 94fcf82dd3aaf68481f0145338ec2f4b3d9941e6 Mon Sep 17 00:00:00 2001 From: doinachiroiu Date: Thu, 20 Aug 2020 08:21:32 +0000 Subject: [PATCH] Added comment on Nvalues[] and N purpose --- .../pffft/test_pffft_sandboxed.cc | 21 ++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/oss-internship-2020/pffft/test_pffft_sandboxed.cc b/oss-internship-2020/pffft/test_pffft_sandboxed.cc index e4b4602..e1b897e 100644 --- a/oss-internship-2020/pffft/test_pffft_sandboxed.cc +++ b/oss-internship-2020/pffft/test_pffft_sandboxed.cc @@ -62,6 +62,13 @@ void show_output(const char* name, int N, int cplx, float flops, float t0, int main(int argc, char* argv[]) { gflags::ParseCommandLineFlags(&argc, &argv, true); + /* + * Nvalues is a vector keeping the values by which iterates N, its value + * representing the input length. More concrete, N is the number of + * data points the caclulus is up to (determinating its accuracy). + * To show the performance of Fast-Fourier Transformations the program is + * testing for various values of N. + */ int Nvalues[] = {64, 96, 128, 160, 192, 256, 384, 5 * 96, 512, 5 * 128, 3 * 256, 800, 1024, 2048, 2400, 4096, 8192, 9 * 1024, @@ -118,10 +125,16 @@ int main(int argc, char* argv[]) { X[k] = 0; } - // FFTPack benchmark + /* + * FFTPack benchmark + */ { + /* + * SIMD_SZ == 4 (returning value of pffft_simd_size()) + */ int max_iter_ = - max_iter / 4; // SIMD_SZ == 4 (returning value of pffft_simd_size()) + max_iter / 4; + if (max_iter_ == 0) max_iter_ = 1; if (cplx) { api.cffti(N, wrk_.PtrBoth()).IgnoreError(); @@ -145,7 +158,9 @@ int main(int argc, char* argv[]) { show_output("FFTPack", N, cplx, flops, t0, t1, max_iter_); } - // PFFFT benchmark + /* + * PFFFT benchmark + */ { sapi::StatusOr s = api.pffft_new_setup(N, cplx ? PFFFT_COMPLEX : PFFFT_REAL);