-
Notifications
You must be signed in to change notification settings - Fork 70
Benchmark the physics DLL #1701
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
Conversation
benchmarks/dynamic_frame.cpp
Outdated
@@ -85,14 +85,16 @@ void FillLinearTrajectory(Position<F> const& initial, | |||
} | |||
|
|||
// This code is derived from Plugin::RenderTrajectory. | |||
std::vector<std::pair<Position<ICRFJ2000Equator>, | |||
Position<ICRFJ2000Equator>>> ApplyDynamicFrame( | |||
std::vector<std::pair<Position<ksp_plugin::Barycentric>, |
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'd invest in a using ksp_plugin::Barycentric
. This would massively reduce the amount of reformatting.
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.
Done.
benchmarks/ephemeris.cpp
Outdated
Instant const& t, | ||
Ephemeris<ICRFJ2000Equator>& ephemeris); | ||
using Flow = void( | ||
not_null<DiscreteTrajectory<ksp_plugin::Barycentric>*> const trajectory, |
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 here.
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.
Done.
@@ -32,11 +35,13 @@ class SolarSystem final { | |||
// format for SolarSystemFile protocol buffers. | |||
SolarSystem( | |||
std::experimental::filesystem::path const& gravity_model_filename, | |||
std::experimental::filesystem::path const& initial_state_filename); | |||
std::experimental::filesystem::path const& initial_state_filename, | |||
bool ignore_frame = false); |
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'd prefer to avoid the defaulted parameter by having both a 2- and a 3-argument constructor, one delegating to the other.
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.
As discussed, leaving as-is.
@@ -84,6 +84,10 @@ class SolarSystemFactory : not_constructible { | |||
AllBodiesAndOblateness, | |||
}; | |||
|
|||
template<typename Frame> |
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.
It's odd/tasteless that only this method is parameterized by the Frame. Shouldn't the entire class be templated?
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.
The other methods really should return an ICRFJ2000Equator system, ignore_frame is a bit of a hack that I'd like to keep in one place.
retest this please |
retest this please (we need to do something about the flakiness induced by races when copying the DLL...) |
No description provided.