how to decide when a type is good to do complex FFT or not.
cosurgi opened this issue · 2 comments
Following this comment I'd like to open an issue to track this problem. Basically it comes from the fact that boost::is_complex
does not recognize Boost complex 128, MPFR, MPFI, cpp_bin/dec_float family of types, but only the standard std::complex
.
While the target is to recognize at least these types:
std::complex<float>
std::complex<double>
std::complex<long double>
boost::multiprecision::complex128
complex_adaptor<boost::multiprecision::cpp_bin_float_*>
complex_adaptor<boost::multiprecision::cpp_dec_float_*>
boost::multiprecision::mpc_complex*
complex_adaptor<boost::multiprecision::mpfi_float_*>
it seems apparently that the problem lies on the side of Boost.Multiprecision, not on the side of Boost.Math. Because it's the job of Boost.Multiprecision to make sure that the complex type, provided by Boost.Multiprecision is recognized.
So I guess we will need to open a PR to Boost.Multiprecision, by either changing is_complex
(I suppose that is undesirable for backward compatibility reasons) or by supplementing a new recognizer of complex type somewhere in the namespace of complex_adaptor
. Maybe call it is_boost_complex
or something like that. And then provide a specialization for this recognizer under declaration of every complex type or maybe every type which can be complexified, like I did here.
This is still a good question.