BoostGSoC21 / math

Boost.org math module

Home Page:http://boost.org/libs/math

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

how to decide when a type is good to do complex FFT or not.

cosurgi opened this issue · 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:

  1. std::complex<float>
  2. std::complex<double>
  3. std::complex<long double>
  4. boost::multiprecision::complex128
  5. complex_adaptor<boost::multiprecision::cpp_bin_float_*>
  6. complex_adaptor<boost::multiprecision::cpp_dec_float_*>
  7. boost::multiprecision::mpc_complex*
  8. 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.

This is still a good question.

yes. I linked to here in #16 as that's where most of the discussion happens.