1
0
Fork 0
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:
bolero-MURAKAMI 2014-04-18 11:34:28 +09:00
parent 6a6fdd41ec
commit 07b5f69ebb
5 changed files with 205 additions and 4 deletions

View file

@ -41,13 +41,19 @@ namespace sprout {
SPROUT_CONSTEXPR complex(complex<X> const& other) SPROUT_NOEXCEPT
: re_(other.real()), im_(other.imag())
{}
SPROUT_CONSTEXPR T real() const SPROUT_NOEXCEPT {
SPROUT_CONSTEXPR T const& real() const SPROUT_NOEXCEPT {
return re_;
}
SPROUT_CXX14_CONSTEXPR T& real() SPROUT_NOEXCEPT {
return re_;
}
SPROUT_CXX14_CONSTEXPR void real(T re) SPROUT_NOEXCEPT {
re_ = re;
}
SPROUT_CONSTEXPR T imag() const SPROUT_NOEXCEPT {
SPROUT_CONSTEXPR T const& imag() const SPROUT_NOEXCEPT {
return im_;
}
SPROUT_CXX14_CONSTEXPR T& imag() SPROUT_NOEXCEPT {
return im_;
}
SPROUT_CXX14_CONSTEXPR void imag(T im) SPROUT_NOEXCEPT {