mirror of
https://github.com/bolero-MURAKAMI/Sprout
synced 2025-08-03 12:49:50 +00:00
add C++14 constexpr fft/ifft
This commit is contained in:
parent
6a6fdd41ec
commit
07b5f69ebb
5 changed files with 205 additions and 4 deletions
|
@ -23,16 +23,26 @@ namespace sprout {
|
|||
|
||||
// 26.4.7, values:
|
||||
template<typename T>
|
||||
inline SPROUT_CONSTEXPR T
|
||||
inline SPROUT_CONSTEXPR T const&
|
||||
real(sprout::complex<T> const& x) {
|
||||
return x.real();
|
||||
}
|
||||
template<typename T>
|
||||
inline SPROUT_CONSTEXPR T
|
||||
inline SPROUT_CONSTEXPR T const&
|
||||
imag(sprout::complex<T> const& x) {
|
||||
return x.imag();
|
||||
}
|
||||
template<typename T>
|
||||
inline SPROUT_CXX14_CONSTEXPR T&
|
||||
real(sprout::complex<T>& x) {
|
||||
return x.real();
|
||||
}
|
||||
template<typename T>
|
||||
inline SPROUT_CXX14_CONSTEXPR T&
|
||||
imag(sprout::complex<T>& x) {
|
||||
return x.imag();
|
||||
}
|
||||
template<typename T>
|
||||
inline SPROUT_CONSTEXPR T
|
||||
abs(sprout::complex<T> const& x) {
|
||||
return sprout::sqrt(sprout::norm(x));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue