Commit d5a181d2 authored by Alexander Ryndin's avatar Alexander Ryndin
Browse files

add t-1 dependency and -O3

parent e12538ef
...@@ -28,17 +28,21 @@ int main () { ...@@ -28,17 +28,21 @@ int main () {
de_rwth_armin_modeling_autopilot_motion_motionPlanning motionPlanning; de_rwth_armin_modeling_autopilot_motion_motionPlanning motionPlanning;
motionPlanning.init(); motionPlanning.init();
const int N = 1000000; const int N = 1000000;
double _currentDirectionX = 0.0;
double _desiredDirectionX = 1.0;
std::cout << "running benchmark\n"; std::cout << "running benchmark\n";
Timer tmr; Timer tmr;
for (int i=0; i<N; i++) { for (int i=0; i<N; i++) {
motionPlanning.currentDirectionX = 0.0; motionPlanning.currentDirectionX = _currentDirectionX;
motionPlanning.currentDirectionY = 1.0; motionPlanning.currentDirectionY = 1.0;
motionPlanning.desiredDirectionX = 1.0; motionPlanning.desiredDirectionX = _desiredDirectionX;
motionPlanning.desiredDirectionY = 1.0; motionPlanning.desiredDirectionY = 1.0;
motionPlanning.signedDistanceToTrajectory = 0.15; motionPlanning.signedDistanceToTrajectory = 0.15;
motionPlanning.currentVelocity = 10.0; motionPlanning.currentVelocity = 10.0;
motionPlanning.desiredVelocity = 11.0; motionPlanning.desiredVelocity = 11.0;
motionPlanning.execute(); motionPlanning.execute();
_currentDirectionX = motionPlanning.steering;
_desiredDirectionX = motionPlanning.brakes;
} }
double t = tmr.elapsed(); double t = tmr.elapsed();
double avgDuration = t / N; double avgDuration = t / N;
......
...@@ -4,7 +4,7 @@ set OUTPUT_DIR=build ...@@ -4,7 +4,7 @@ set OUTPUT_DIR=build
if exist "%OUTPUT_DIR%" rmdir "%OUTPUT_DIR%" /s /q if exist "%OUTPUT_DIR%" rmdir "%OUTPUT_DIR%" /s /q
mkdir "%OUTPUT_DIR%" mkdir "%OUTPUT_DIR%"
g++ -I"%PATH_TO_JDK_HOME%\include" ^ g++ -O3 -I"%PATH_TO_JDK_HOME%\include" ^
-I"%PATH_TO_JDK_HOME%\include\win32" ^ -I"%PATH_TO_JDK_HOME%\include\win32" ^
-I"%PATH_TO_OCTAVE_HOME%\include\octave-4.2.1" ^ -I"%PATH_TO_OCTAVE_HOME%\include\octave-4.2.1" ^
-I"%PATH_TO_OCTAVE_HOME%\include\octave-4.2.1\octave" ^ -I"%PATH_TO_OCTAVE_HOME%\include\octave-4.2.1\octave" ^
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment