|
FEAT 3
Finite Element Analysis Toolbox
|
Stop-Watch class. More...
#include <stop_watch.hpp>
Public Member Functions | |
| double | elapsed () const |
| Returns the total elapsed time in seconds. More... | |
| long long | elapsed_micros () const |
| Returns the total elapsed time in micro-seconds. More... | |
| String | elapsed_string (TimeFormat format=TimeFormat::s_m) const |
| Return the time elapsed in the stop-watch. More... | |
| String | percent_of (const StopWatch &total_watch, const String &prefix=" [", const String &postfix="% ]") const |
| Returns the formatted percentage that this stop watch elapsed time relative to another total runtime stop watch. More... | |
| void | reset () |
| Resets the elapsed time. More... | |
| bool | running () const |
Returns true if the stop-watch is currently running. More... | |
| void | start () |
| Starts the stop-watch. More... | |
| void | stop () |
| Stops the stop-watch and increments elapsed time. More... | |
Private Attributes | |
| long long | _micros |
| bool | _running |
| TimeStamp | _start_time |
| TimeStamp | _stop_time |
Stop-Watch class.
This class implements an incremental stop-watch.
Definition at line 20 of file stop_watch.hpp.
|
inline |
Definition at line 29 of file stop_watch.hpp.
|
inline |
Returns the total elapsed time in seconds.
Definition at line 70 of file stop_watch.hpp.
References elapsed_micros().
Referenced by FEAT::Control::Domain::VoxelDomainControl< DomainLevel_ >::create_hierarchy(), FEAT::Global::PMDCDSCMatrix< Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, dim_, 1 >, MirrorV_, MirrorP_ >, Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, 1, dim_ >, MirrorP_, MirrorV_ > >::format_timings(), percent_of(), FEAT::Solver::AmaVanka< Matrix_, Filter_ >::time_apply(), FEAT::Solver::Vanka< LAFEM::SaddlePointMatrix< MatrixA_, MatrixB_, MatrixD_ >, Filter_ >::time_apply(), FEAT::Solver::AmaVanka< Matrix_, Filter_ >::time_init_numeric(), FEAT::Solver::Vanka< LAFEM::SaddlePointMatrix< MatrixA_, MatrixB_, MatrixD_ >, Filter_ >::time_init_numeric(), FEAT::Solver::AmaVanka< Matrix_, Filter_ >::time_init_symbolic(), and FEAT::Solver::Vanka< LAFEM::SaddlePointMatrix< MatrixA_, MatrixB_, MatrixD_ >, Filter_ >::time_init_symbolic().
|
inline |
Returns the total elapsed time in micro-seconds.
Definition at line 76 of file stop_watch.hpp.
References FEAT::TimeStamp::elapsed_micros().
Referenced by elapsed(), and elapsed_string().
|
inline |
Return the time elapsed in the stop-watch.
See TimeStamp::format_micros() for more information about the formatting options.
| [in] | format | Specifies the output string format to be used. |
h:mm:ss.nnn. Definition at line 98 of file stop_watch.hpp.
References elapsed_micros(), and FEAT::TimeStamp::format_micros().
|
inline |
Returns the formatted percentage that this stop watch elapsed time relative to another total runtime stop watch.
| [in] | total_watch | The stop watch that represents the total runtime |
| [in] | prefix | The prefix string |
| [in] | postfix | The postfix string |
Definition at line 117 of file stop_watch.hpp.
References elapsed(), and FEAT::stringify_fp_fix().
|
inline |
Resets the elapsed time.
Definition at line 36 of file stop_watch.hpp.
Referenced by FEAT::Global::PMDCDSCMatrix< Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, dim_, 1 >, MirrorV_, MirrorP_ >, Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, 1, dim_ >, MirrorP_, MirrorV_ > >::reset_timings(), FEAT::Solver::AmaVanka< Matrix_, Filter_ >::reset_timings(), and FEAT::Solver::Vanka< LAFEM::SaddlePointMatrix< MatrixA_, MatrixB_, MatrixD_ >, Filter_ >::reset_timings().
|
inline |
Returns true if the stop-watch is currently running.
Definition at line 64 of file stop_watch.hpp.
|
inline |
Starts the stop-watch.
Definition at line 43 of file stop_watch.hpp.
References FEAT::TimeStamp::stamp().
Referenced by FEAT::Global::PMDCDSCMatrix< Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, dim_, 1 >, MirrorV_, MirrorP_ >, Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, 1, dim_ >, MirrorP_, MirrorV_ > >::_apply(), FEAT::Solver::AmaVanka< Matrix_, Filter_ >::apply(), FEAT::Global::PMDCDSCMatrix< Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, dim_, 1 >, MirrorV_, MirrorP_ >, Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, 1, dim_ >, MirrorP_, MirrorV_ > >::apply(), FEAT::Control::Domain::VoxelDomainControl< DomainLevel_ >::create_base_mesh_2d(), FEAT::Control::Domain::VoxelDomainControl< DomainLevel_ >::create_base_mesh_3d(), FEAT::Control::Domain::VoxelDomainControl< DomainLevel_ >::create_hierarchy(), FEAT::Control::Domain::VoxelDomainControl< DomainLevel_ >::create_voxel_map(), FEAT::Control::Domain::VoxelDomainControl< DomainLevel_ >::create_voxel_map_from_chart(), FEAT::Control::Domain::VoxelDomainControl< DomainLevel_ >::create_voxel_map_from_lambda(), FEAT::Control::Domain::VoxelDomainControl< DomainLevel_ >::create_voxel_map_from_off(), FEAT::Global::PMDCDSCMatrix< Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, dim_, 1 >, MirrorV_, MirrorP_ >, Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, 1, dim_ >, MirrorP_, MirrorV_ > >::init_numeric(), FEAT::Solver::AmaVanka< Matrix_, Filter_ >::init_numeric(), FEAT::Solver::Vanka< LAFEM::SaddlePointMatrix< MatrixA_, MatrixB_, MatrixD_ >, Filter_ >::init_numeric(), FEAT::Solver::VoxelAmaVanka< Matrix_, Filter_, pol_threading_, macro_type_ >::init_numeric(), FEAT::Global::PMDCDSCMatrix< Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, dim_, 1 >, MirrorV_, MirrorP_ >, Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, 1, dim_ >, MirrorP_, MirrorV_ > >::init_symbolic(), FEAT::Solver::AmaVanka< Matrix_, Filter_ >::init_symbolic(), FEAT::Solver::Vanka< LAFEM::SaddlePointMatrix< MatrixA_, MatrixB_, MatrixD_ >, Filter_ >::init_symbolic(), FEAT::Solver::VoxelAmaVanka< Matrix_, Filter_, pol_threading_, macro_type_ >::init_symbolic(), and FEAT::Control::Domain::VoxelDomainControl< DomainLevel_ >::read_voxel_map().
|
inline |
Stops the stop-watch and increments elapsed time.
Definition at line 51 of file stop_watch.hpp.
References FEAT::TimeStamp::elapsed_micros(), and FEAT::TimeStamp::stamp().
Referenced by FEAT::Global::PMDCDSCMatrix< Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, dim_, 1 >, MirrorV_, MirrorP_ >, Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, 1, dim_ >, MirrorP_, MirrorV_ > >::_apply(), FEAT::Solver::AmaVanka< Matrix_, Filter_ >::apply(), FEAT::Global::PMDCDSCMatrix< Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, dim_, 1 >, MirrorV_, MirrorP_ >, Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, 1, dim_ >, MirrorP_, MirrorV_ > >::apply(), FEAT::Control::Domain::VoxelDomainControl< DomainLevel_ >::create_base_mesh_2d(), FEAT::Control::Domain::VoxelDomainControl< DomainLevel_ >::create_base_mesh_3d(), FEAT::Control::Domain::VoxelDomainControl< DomainLevel_ >::create_hierarchy(), FEAT::Control::Domain::VoxelDomainControl< DomainLevel_ >::create_voxel_map(), FEAT::Control::Domain::VoxelDomainControl< DomainLevel_ >::create_voxel_map_from_chart(), FEAT::Control::Domain::VoxelDomainControl< DomainLevel_ >::create_voxel_map_from_lambda(), FEAT::Control::Domain::VoxelDomainControl< DomainLevel_ >::create_voxel_map_from_off(), FEAT::Global::PMDCDSCMatrix< Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, dim_, 1 >, MirrorV_, MirrorP_ >, Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, 1, dim_ >, MirrorP_, MirrorV_ > >::init_numeric(), FEAT::Solver::AmaVanka< Matrix_, Filter_ >::init_numeric(), FEAT::Solver::Vanka< LAFEM::SaddlePointMatrix< MatrixA_, MatrixB_, MatrixD_ >, Filter_ >::init_numeric(), FEAT::Solver::VoxelAmaVanka< Matrix_, Filter_, pol_threading_, macro_type_ >::init_numeric(), FEAT::Global::PMDCDSCMatrix< Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, dim_, 1 >, MirrorV_, MirrorP_ >, Global::Matrix< LAFEM::SparseMatrixBCSR< DT_, IT_, 1, dim_ >, MirrorP_, MirrorV_ > >::init_symbolic(), FEAT::Solver::AmaVanka< Matrix_, Filter_ >::init_symbolic(), FEAT::Solver::Vanka< LAFEM::SaddlePointMatrix< MatrixA_, MatrixB_, MatrixD_ >, Filter_ >::init_symbolic(), FEAT::Solver::VoxelAmaVanka< Matrix_, Filter_, pol_threading_, macro_type_ >::init_symbolic(), and FEAT::Control::Domain::VoxelDomainControl< DomainLevel_ >::read_voxel_map().
|
private |
Definition at line 26 of file stop_watch.hpp.
|
private |
Definition at line 25 of file stop_watch.hpp.
|
private |
Definition at line 23 of file stop_watch.hpp.
|
private |
Definition at line 24 of file stop_watch.hpp.