aboutsummaryrefslogtreecommitdiffstats
path: root/common/alcomplex.h
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2022-12-14 17:39:47 -0800
committerChris Robinson <[email protected]>2022-12-14 17:39:47 -0800
commitc40e1bc1ce4f43fed87508374679f82ed237d79d (patch)
tree3a596ae06129e1ddf6a55cd57f3931c36fabf883 /common/alcomplex.h
parent42090e93719748675384cc6ec9106fb39f869920 (diff)
Better handle span sources from iterators
Diffstat (limited to 'common/alcomplex.h')
-rw-r--r--common/alcomplex.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/common/alcomplex.h b/common/alcomplex.h
index a5126f39..794c3526 100644
--- a/common/alcomplex.h
+++ b/common/alcomplex.h
@@ -13,7 +13,7 @@
*/
template<typename Real>
std::enable_if_t<std::is_floating_point<Real>::value>
-complex_fft(const al::span<std::complex<Real>> buffer, const Real sign);
+complex_fft(const al::span<std::complex<Real>> buffer, const al::type_identity_t<Real> sign);
/**
* Calculate the frequency-domain response of the time-domain signal in the
@@ -22,7 +22,7 @@ complex_fft(const al::span<std::complex<Real>> buffer, const Real sign);
template<typename Real, size_t N>
std::enable_if_t<std::is_floating_point<Real>::value>
forward_fft(const al::span<std::complex<Real>,N> buffer)
-{ complex_fft(buffer.subspan(0), Real{-1}); }
+{ complex_fft(buffer.subspan(0), -1); }
/**
* Calculate the time-domain signal of the frequency-domain response in the
@@ -31,7 +31,7 @@ forward_fft(const al::span<std::complex<Real>,N> buffer)
template<typename Real, size_t N>
std::enable_if_t<std::is_floating_point<Real>::value>
inverse_fft(const al::span<std::complex<Real>,N> buffer)
-{ complex_fft(buffer.subspan(0), Real{1}); }
+{ complex_fft(buffer.subspan(0), 1); }
/**
* Calculate the complex helical sequence (discrete-time analytical signal) of