]> https://gitweb.dealii.org/ - dealii.git/commit
Avoid boost functions that don't work on BSDs. 2262/head
authorDavid Wells <wellsd2@rpi.edu>
Sun, 28 Feb 2016 21:08:06 +0000 (16:08 -0500)
committerDavid Wells <wellsd2@rpi.edu>
Sun, 28 Feb 2016 21:25:06 +0000 (16:25 -0500)
commit2e7458353f50e77386a87053aed2ba8cdbbe2eda
tree0d10578db49488a75fe0b521fa4fa126470ba435
parent7538693d125a92d180c5e57f286b644fbfbbb1c7
Avoid boost functions that don't work on BSDs.

As was noted in issue #2261, the function boost::math::iround cannot be
used on some BSD variants due to the following compilation error:

In file included from /root/workspace/dealii/source/lac/lapack_full_matrix.cc:25:
In file included from /usr/local/include/boost/math/special_functions/round.hpp:15:
In file included from /usr/local/include/boost/math/special_functions/fpclassify.hpp:19:
In file included from /usr/local/include/boost/math/special_functions/math_fwd.hpp:26:
In file included from /usr/local/include/boost/math/special_functions/detail/round_fwd.hpp:12:
/usr/local/include/boost/math/tools/promotion.hpp:141:10: error: static_assert failed
"Sorry, but this platform does not have sufficient long double support for the special functions to be reliably implemented."
         BOOST_STATIC_ASSERT_MSG((0 == ::boost::is_same<type, long
         double>::value),
         "Sorry, but this platform does not have sufficient long double support for the special functions to be reliably implement ed.");
/usr/local/include/boost/static_assert.hpp:31:45: note: expanded from macro 'BOOST_STATIC_ASSERT_MSG'

Since we only use iround for clarity this is not hard to work around.

A note on the implementation: LAPACK functions can usually be run in two
different modes. In the first, they compute the optimal size of the work
array. In the second they actually execute the function. Therefore
all we need to do is make the work arrays one longer and we should still
get the same performance out of LAPACK without needing to worry about
any unforeseen roundoff issues.
source/lac/lapack_full_matrix.cc

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.