-
Notifications
You must be signed in to change notification settings - Fork 157
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
fix: compilation problems for Apple Silicon M1 #743
fix: compilation problems for Apple Silicon M1 #743
Conversation
@@ -160,7 +160,10 @@ predicate_result matrixCompare(const Eigen::DenseBase<Derived1>& val, | |||
// only accept them. Does someone know a clean way to do that in C++? | |||
// | |||
template <typename Container, | |||
typename Enable = typename Container::const_iterator> | |||
typename CbeginDefined = | |||
std::decay_t<decltype(*cbegin(std::declval<Container>()))>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two things surprise me here:
- I would expect
cbegin
to be only accessible viastd::cbegin
, not in isolation. - If this is only used for SFINAE, I do not understand why the
std::decay_t
is needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, you're right, the std::decay_t
should not be used.
For the first point, I will change to *std::cbegin
then, I suppose ?
// right on slab | ||
ray3 = {{0, 1, -2}, {0, 0, 1}}; | ||
BOOST_CHECK(!bb3.intersect(ray3)); | ||
// right on slab - temporarily removed, fails with double precision |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From the PR description, you probably meant single precision.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, actually this is correct, on M1 with double precision, this fails ... all these tests have initially been written by @paulgessinger in float precision, but when introducing ActsScalar
a ton of them started to fail due to boundary conditions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be followed up in an issue & fixed.
Codecov Report
@@ Coverage Diff @@
## master #743 +/- ##
=======================================
Coverage 48.86% 48.86%
=======================================
Files 325 325
Lines 16682 16682
Branches 7791 7791
=======================================
Hits 8151 8151
Misses 3061 3061
Partials 5470 5470 Continue to review full report at Codecov.
|
This PR fixes the compilation on Apple M1 with:
The
FloatComparison
needed a stricterEnable
template definition, as theSTL
like frontend and theEigen
like frontend could not be resolved.Also, it revealed another
UnitTest
in theBoundingBoxTests
that is not stable infloat
(@paulgessinger - we should tackle that, there are still several tests not running, i.e. commented out).