Skip to content

Namespace yade, fix #57

Janek Kozicki requested to merge namespaceYade into master

This MR fixes #57 (closed). In order to add support for different precision compilation settings first I had to fix this namespace problem. I already mentioned this before. The point is that the mathematical functions will need to be templatized in order to call correct versions for

  • double
  • long double
  • boost::float128_t
  • boost::multiprecision::mpfr_float_backend<2000> (if you want 2000 bits of precision :)

And the only way to do that is to be 100% sure that we will not run into such name collisions as in #57 (closed). So namespace yade is the safest solution to this problem.

In this MR I have simply added this namespace to 400 files. Plus I had to do some other minimal modifications to get this to work, like change a little the REGISTER_SERIALIZABLE and YADE_PLUGIN macros, to get them to work inside the namespace.

I have tested this MR very extensively, also tested again on all examples (hence small improvements in the script to launch all examples). And on different compilations settings, but for this MR to work (for example) without OpenMP it has to be connected with my separate MR !280 (merged).

I will help with any rebase conflict which might happen with !272 (closed). In fact I already have a branch namespaceYade rebased on parallelExperiments, so no need to worry about this one.

Now onwards to custom precision settings. I don't know what challenges are in front of me on this path. Thankfully -Wfloat-conversion warnings is already merged into master. And it will help me a great deal with that goal.

Edited by Janek Kozicki

Merge request reports