Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
cosurgi opened this issue Jul 23, 2021 · 2 comments
Open

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

cosurgi opened this issue Jul 23, 2021 · 2 comments

Comments

@cosurgi
Copy link
Collaborator

cosurgi commented Jul 23, 2021

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.

@Lagrang3
Copy link
Collaborator

This is still a good question.

@cosurgi
Copy link
Collaborator Author

cosurgi commented Aug 31, 2021

This is still a good question.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants