summaryrefslogtreecommitdiff
path: root/gr-fft/python/fft/fft_vcc.py
diff options
context:
space:
mode:
authormormj <34754695+mormj@users.noreply.github.com>2020-11-03 16:51:44 -0500
committerGitHub <noreply@github.com>2020-11-03 16:51:44 -0500
commited95e8d45cfc6cd3e026298dadf4d2e8f9f1c3b8 (patch)
treea15c82b2a2c2baa623434ad2c3a4c51416002082 /gr-fft/python/fft/fft_vcc.py
parent0f780e26d6545338b6c4a1b34405822a9a6ec706 (diff)
Move FFT functions and blocks to templates (#3903)
* fft: refactor fft classes as templates In order to reduce code duplication construct fft objects and blocks with template paramters. Separate forward and reverse as a template parameter Maintain the real fft block forward as r2c and reverse as r2c as well Co-authored-by: Andrej Rode <mail@andrejro.de>
Diffstat (limited to 'gr-fft/python/fft/fft_vcc.py')
-rw-r--r--gr-fft/python/fft/fft_vcc.py22
1 files changed, 22 insertions, 0 deletions
diff --git a/gr-fft/python/fft/fft_vcc.py b/gr-fft/python/fft/fft_vcc.py
new file mode 100644
index 0000000000..3f5dae91b0
--- /dev/null
+++ b/gr-fft/python/fft/fft_vcc.py
@@ -0,0 +1,22 @@
+#
+# Copyright 2020 Free Software Foundation, Inc.
+#
+# This file is part of GNU Radio
+#
+# SPDX-License-Identifier: GPL-3.0-or-later
+#
+#
+
+from . import fft_python as fft
+
+
+class fft_vcc():
+ def __new__(self, fft_size,
+ forward,
+ window,
+ shift=False,
+ nthreads=1):
+ if forward:
+ return fft.fft_vcc_fwd(fft_size, window, shift, nthreads)
+ else:
+ return fft.fft_vcc_rev(fft_size, window, shift, nthreads)