commit cfe345829f43ac15c54805036264cca78829ccd8
parent c0ee34aeb6429cf8a5a630d049dea479d610cdd9
Author: [email protected] <[email protected]>
Date: Wed, 7 Sep 2016 18:58:59 +0300
Add idft function
Diffstat:
1 file changed, 10 insertions(+), 0 deletions(-)
diff --git a/include/kfr/dft/cache.hpp b/include/kfr/dft/cache.hpp
@@ -96,4 +96,14 @@ univector<complex<T>> dft(const univector<complex<T>, Tag>& input)
dft->execute(output, input, temp);
return output;
}
+
+template <typename T, size_t Tag>
+univector<complex<T>> idft(const univector<complex<T>, Tag>& input)
+{
+ dft_plan_ptr<T> dft = dft_cache::instance().get(ctype<T>, input.size());
+ univector<T> output(input.size());
+ univector<u8> temp(dft->temp_size);
+ dft->execute(output, input, temp, ctrue);
+ return output;
+}
}