commit c99c30247c2b453eba671dcdef40c139fd6af67b
parent 0e1e19ff04f8c1eaf1ce399aad6dad7cbd8f1d3e
Author: d.levin256@gmail.com <d.levin256@gmail.com>
Date: Tue, 8 Nov 2016 05:52:57 +0300
window.hpp: convert constants to T
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/kfr/dsp/window.hpp b/include/kfr/dsp/window.hpp
@@ -255,7 +255,7 @@ struct expression_hamming : input_expression
template <size_t N>
CMT_INLINE vec<T, N> operator()(cinput_t cinput, size_t index, vec_t<T, N> y) const
{
- return alpha - (1.0 - alpha) * (cos(c_pi<T, 2> * linspace(cinput, index, y)));
+ return alpha - (T(1.0) - alpha) * (cos(c_pi<T, 2> * linspace(cinput, index, y)));
}
size_t size() const { return m_size; }
@@ -395,7 +395,7 @@ struct expression_gaussian : input_expression
template <size_t N>
CMT_INLINE vec<T, N> operator()(cinput_t cinput, size_t index, vec_t<T, N> y) const
{
- return exp(-0.5 * sqr(alpha * linspace(cinput, index, y)));
+ return exp(T(-0.5) * sqr(alpha * linspace(cinput, index, y)));
}
size_t size() const { return m_size; }