SLAMflex SE
0.1.0
SLAMflex provides detection and tracking of dominant planes for smartphone devices. This plane can then be used to show AR content relative to the plane orientation. The detection of plane is performed in the field of view of the smartphone camera. In subsequent frames it is tracked. The interface returns the plane position and orientation.
|
#include <timer.h>
Public Member Functions | |
SimpleTimer (const std::string &description, const int &cycles_to_time=1, bool output=true, std::ostream &out=std::cout) | |
~SimpleTimer () | |
Destructor. Deletes the internal cvd_timer. More... | |
void | click () |
Begin or end a timing cycle. Automatically calls print() when cycles_to_time cycles are reached. More... | |
void | print () |
double | get_max () |
Calculate the max cycle time as double. More... | |
double | get_min () |
Calculate the min cycle time as double. More... | |
double | get_average () |
Calculate the average cycle time as double. More... | |
Private Attributes | |
bool | output_info |
double | max |
double | min |
double | average |
std::string | text |
int | period |
double | increment |
int | timings |
double | cumulative_time |
double | time_at_start_of_timing |
bool | timing_started |
cvd_timer * | internal_cvd_timer |
std::ostream & | sout |
std::deque< double > | time_buffer |
Provides a simple timer class which uses cvd_timer internally. Statistics (average, max and min cycle time) are kept and output for a number of timing cycles. Cycle times are stored in a std::deque<double> and statistics only calculated when the get or print functions are called.
|
inline |
Create a simple timer object.
description | A string description of what is being timed (used in output) |
cycles_to_time | How many cycles to time before the times are averaged and output (default 1). |
output | Whether or not to output timing information. Default is true. |
out | std::ostream to send output information to. Default std::cout. |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |