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

Add test for bsl_backend using boost::multiprecision::complex in real to complex transforms. #19

Open
cosurgi opened this issue Aug 6, 2021 · 4 comments

Comments

@cosurgi
Copy link
Collaborator

cosurgi commented Aug 6, 2021

Issue #18 is dealing only with boost::multiprecision::complex128 but we need to test the real to complex transforms also for types mpfr and cpp_bin_float.

The complex to complex transforms are tested in fft_ex05.cpp. Actually maybe this file should land in the test directory?

CC @Lagrang3 @ckormanyos

@Lagrang3
Copy link
Collaborator

I can add another example of real to complex using mpfr and cpp_bin_float types.
But will this be considered test or example? or both?

The current Jamfile under the test directory compiles the examples as if they were tests. To me this is not very elegant. Examples and tests are not the same thing, at least conceptually.

On the other hand I remember Christopher (@ckormanyos) mentioning that we shouldn't add dependencies. To my understanding he meant no dependencies in the tests. But maybe we could have an fft_examples suite just for examples where we could freely link against mpfr, or boost::whatever, or have an example specific for a c++17 feature (eg. polymorphic memory resources).

@cosurgi
Copy link
Collaborator Author

cosurgi commented Aug 31, 2021

Yes, it is not elegant, and I previously added some mess here. I'm sorry about that. Compiling examples is still necessary, because I remember at early stages, when PRs were going really fast I noticed that examples were being broken (some interface changes) and remained unfixed because they were not tested whether they still work.

So yes, fft_examples is a perfect solution to this problem.

About what dependencies are allowed where I am not sure. Maybe @ckormanyos has some idea? :)

@ckormanyos
Copy link
Member

ckormanyos commented Sep 1, 2021

what dependencies are allowed where I am not sure. Maybe @ckormanyos has some idea?

I think Boost.Math's standalone attributes pertain only to Math's include part, not to its examples and/or tests.

I also need to ask @mborland. Matt, when we develop for Math, and we want to retain the standalone attribute, can we add additional Boost-dependencies to examples and/or tests?

@mborland
Copy link

mborland commented Sep 2, 2021

Adding dependencies in examples and tests are fine, and generally needed to test all functionality. If any dependencies go into the include folder they need a guard for standalone.

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

4 participants