C++ Mathematical Expression Toolkit (ExprTk) release
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
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 43432 of file exprtk.hpp.

Constructor & Destructor Documentation

◆ timer()

exprtk::timer::timer ( )
inline

Definition at line 43464 of file exprtk.hpp.

43465 : in_use_(false)
43466 {
43467 start_time_.tv_sec = 0;
43468 start_time_.tv_usec = 0;
43469
43470 stop_time_.tv_sec = 0;
43471 stop_time_.tv_usec = 0;
43472 }
struct timeval stop_time_
Definition exprtk.hpp:43524
struct timeval start_time_
Definition exprtk.hpp:43523

References start_time_, and stop_time_.

Member Function Documentation

◆ in_use()

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

Definition at line 43509 of file exprtk.hpp.

43510 {
43511 return in_use_;
43512 }

References in_use_.

◆ start()

void exprtk::timer::start ( )
inline

◆ stop()

void exprtk::timer::stop ( )
inline

◆ time()

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

Definition at line 43502 of file exprtk.hpp.

43503 {
43504 return usec_time() * 0.000001;
43505 }
unsigned long long int usec_time() const
Definition exprtk.hpp:43486

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 43486 of file exprtk.hpp.

43487 {
43488 if (!in_use_)
43489 {
43490 if (stop_time_.tv_sec >= start_time_.tv_sec)
43491 {
43492 return 1000000LLU * static_cast<details::_uint64_t>(stop_time_.tv_sec - start_time_.tv_sec ) +
43493 static_cast<details::_uint64_t>(stop_time_.tv_usec - start_time_.tv_usec) ;
43494 }
43495 else
43496 return std::numeric_limits<details::_uint64_t>::max();
43497 }
43498 else
43499 return std::numeric_limits<details::_uint64_t>::max();
43500 }
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 43516 of file exprtk.hpp.

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

◆ start_time_

struct timeval exprtk::timer::start_time_
private

Definition at line 43523 of file exprtk.hpp.

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

◆ stop_time_

struct timeval exprtk::timer::stop_time_
private

Definition at line 43524 of file exprtk.hpp.

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


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