]> https://gitweb.dealii.org/ - dealii.git/commit
Avoid boost functions that don't work on BSDs. 2270/head
authorDavid Wells <wellsd2@rpi.edu>
Sun, 28 Feb 2016 21:08:06 +0000 (16:08 -0500)
committerTimo Heister <timo.heister@gmail.com>
Mon, 29 Feb 2016 14:16:38 +0000 (09:16 -0500)
commitcda05ef61b41ef9bcd02373297fa72d096266062
tree29b6409a59a04ed269a5589d637362d1706c1324
parent83a67c5667c88525f583fed6c69edd7f887f1291
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.