-
Notifications
You must be signed in to change notification settings - Fork 792
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
Platform specific #if
s
#1966
Platform specific #if
s
#1966
Conversation
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.
There’s something that I don’t understand I guess.
double discrete_sum = | ||
std::accumulate(discrete_samples.begin(), discrete_samples.end(), | ||
decltype(discrete_samples)::value_type(0)); | ||
#if __APPLE__ |
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.
I don’t see differences between these different paths??
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.
I am using the CI to understand the differences in the results since I can avoid instrumenting individual platform runs manually. I'll request a review when this is ready.
Based on our discussion, I found out that libstdc++ has an open bug that causes this difference in PRNG results. https://stackoverflow.com/a/45767223/1236990 |
EXPECT(assert_equal(Vector2(20.0070499, 39.9942591), actual[X(1)], 1e-5)); | ||
EXPECT(assert_equal(Vector2(109.976501, 229.990945), actual[X(0)], 1e-5)); | ||
#elif _WIN32 | ||
EXPECT(assert_equal(Vector2(20.0129382, 40.0039798), actual[X(1)], 1e-5)); |
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.
Same as Apple?
Adding
if
s for different platforms so that we can get regression tests running.I was recently bitten by a bug that wasn't checked because these tests were commented out.