C++ Mathematical Expression Toolkit (ExprTk) release
Loading...
Searching...
No Matches
exprtk::timer Class Reference

#include <exprtk.hpp>

Public Member Functions

 timer ()
void start ()
void stop ()
unsigned long long int usec_time () const
double time () const
bool in_use () const

Private Attributes

bool in_use_
struct timeval start_time_
struct timeval stop_time_

Detailed Description

Definition at line 44055 of file exprtk.hpp.

Constructor & Destructor Documentation

◆ timer()

exprtk::timer::timer ( )
inline

Definition at line 44087 of file exprtk.hpp.

44088 : in_use_(false)
44089 {
44090 start_time_.tv_sec = 0;
44091 start_time_.tv_usec = 0;
44092
44093 stop_time_.tv_sec = 0;
44094 stop_time_.tv_usec = 0;
44095 }
struct timeval stop_time_
Definition exprtk.hpp:44147
struct timeval start_time_
Definition exprtk.hpp:44146

References in_use_, start_time_, and stop_time_.

Member Function Documentation

◆ in_use()

bool exprtk::timer::in_use ( ) const
inline

Definition at line 44132 of file exprtk.hpp.

44133 {
44134 return in_use_;
44135 }

References in_use_.

◆ start()

◆ stop()

◆ time()

double exprtk::timer::time ( ) const
inline

Definition at line 44125 of file exprtk.hpp.

44126 {
44127 return usec_time() * 0.000001;
44128 }
unsigned long long int usec_time() const
Definition exprtk.hpp:44109

References usec_time().

Referenced by black_scholes_merton_model(), bsm_native(), function_call_benchmark01(), main(), perform_file_based_benchmark(), expression_processor< T >::process(), recursive_fibonacci_example(), run_expression_benchmark(), run_expression_benchmark(), run_exprtk_benchmark(), run_native_benchmark(), run_parse_benchmark(), run_threaded_benchmark(), sieve_of_eratosthenes(), sieve_of_eratosthenes_vectorized(), vector_rtc_overhead_analysis_01(), vector_rtc_overhead_analysis_02(), and vectorized_binomial_option_pricing_model().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ usec_time()

unsigned long long int exprtk::timer::usec_time ( ) const
inline

Definition at line 44109 of file exprtk.hpp.

44110 {
44111 if (!in_use_)
44112 {
44113 if (stop_time_.tv_sec >= start_time_.tv_sec)
44114 {
44115 return 1000000LLU * static_cast<details::_uint64_t>(stop_time_.tv_sec - start_time_.tv_sec ) +
44116 static_cast<details::_uint64_t>(stop_time_.tv_usec - start_time_.tv_usec) ;
44117 }
44118 else
44119 return std::numeric_limits<details::_uint64_t>::max();
44120 }
44121 else
44122 return std::numeric_limits<details::_uint64_t>::max();
44123 }
unsigned long long int _uint64_t
Definition exprtk.hpp:100

References in_use_, start_time_, and stop_time_.

Referenced by time().

Here is the caller graph for this function:

Member Data Documentation

◆ in_use_

bool exprtk::timer::in_use_
private

Definition at line 44139 of file exprtk.hpp.

Referenced by in_use(), start(), stop(), timer(), and usec_time().

◆ start_time_

struct timeval exprtk::timer::start_time_
private

Definition at line 44146 of file exprtk.hpp.

Referenced by start(), timer(), and usec_time().

◆ stop_time_

struct timeval exprtk::timer::stop_time_
private

Definition at line 44147 of file exprtk.hpp.

Referenced by stop(), timer(), and usec_time().


The documentation for this class was generated from the following file: