-
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
Merged
Merged
Platform specific #if
s
#1966
Changes from 4 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
72da68e
platform specific #ifs
varunagrawal c00f663
other tests
varunagrawal 212c792
support Windows
varunagrawal d9106fd
add numeric header for std::accumulate
varunagrawal 41280d4
update tests that failed and add shonan averaging test
varunagrawal d4726cf
fix some regressions
varunagrawal cb2be68
fix test with better precision
varunagrawal 556ed9b
separate Windows regression for Shonan Averaging
varunagrawal 438bead
small cleanup
varunagrawal fbe4ad1
common Apple and Windows assertions
varunagrawal 62b0ed6
change from ifdef to if
varunagrawal File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -186,9 +186,18 @@ TEST(GaussianBayesNet, sample) { | |
std::mt19937_64 rng(4242); | ||
auto actual3 = gbn.sample(&rng); | ||
EXPECT_LONGS_EQUAL(2, actual.size()); | ||
// regression is not repeatable across platforms/versions :-( | ||
// EXPECT(assert_equal(Vector2(20.0129382, 40.0039798), actual[X(1)], 1e-5)); | ||
// EXPECT(assert_equal(Vector2(110.032083, 230.039811), actual[X(0)], 1e-5)); | ||
|
||
// regressions | ||
#ifdef __APPLE__ | ||
EXPECT(assert_equal(Vector2(20.0129382, 40.0039798), actual[X(1)], 1e-5)); | ||
dellaert marked this conversation as resolved.
Show resolved
Hide resolved
|
||
EXPECT(assert_equal(Vector2(110.032083, 230.039811), actual[X(0)], 1e-5)); | ||
#elif __linux__ | ||
EXPECT(assert_equal(Vector2(20.0129382, 40.0039798), actual[X(1)], 1e-5)); | ||
EXPECT(assert_equal(Vector2(110.032083, 230.039811), 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 commentThe reason will be displayed to describe this comment to others. Learn more. Same as Apple? |
||
EXPECT(assert_equal(Vector2(110.032083, 230.039811), actual[X(0)], 1e-5)); | ||
#endif | ||
} | ||
|
||
/* ************************************************************************* */ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.