BoostGSoC21 / math

Boost.org math module
http://boost.org/libs/math
Boost Software License 1.0
0 stars 1 forks source link

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

Open cosurgi opened 3 years ago

cosurgi commented 3 years ago

Issue https://github.com/BoostGSoC21/math/issues/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 commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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.