PandA-2024.02
Macros | Functions
cpu_time.hpp File Reference

Include a set of utilities used to manage CPU time measures. More...

#include "config_HAVE_OPENMP.hpp"
#include <sys/times.h>
#include "dbgPrintHelper.hpp"
#include <unistd.h>
Include dependency graph for cpu_time.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define TIMES_TICKS_PER_SEC   60
 
#define START_TIME(time_var)   time_var = p_cpu_time()
 Macro used to store the start time into time_var. More...
 
#define STOP_TIME(time_var)   time_var = p_cpu_time() - (time_var)
 Macro used to store the elapsed time into time_var. More...
 
#define START_WTIME(time_var)   time_var = p_cpu_wtime()
 Macro used to store the start time into time_var. More...
 
#define STOP_WTIME(time_var)   time_var = p_cpu_wtime() - (time_var)
 Macro used to store the elapsed time into time_var. More...
 

Functions

long int p_cpu_time ()
 return a long which represents the elapsed processor time in milliseconds since some constant reference More...
 
std::string print_cpu_time (long int t)
 massage a long which represents a time interval in milliseconds, into a string suitable for output More...
 
void dump_exec_time (const std::string &thing, long et)
 
long int p_cpu_wtime ()
 return a long which represents the elapsed wall processor time in milliseconds since some constant reference More...
 

Detailed Description

Include a set of utilities used to manage CPU time measures.

Author
Fabrizio Ferrandi fabri.nosp@m.zio..nosp@m.ferra.nosp@m.ndi@.nosp@m.polim.nosp@m.i.it $Revision$ $Date$ Last modified by $Author$

Definition in file cpu_time.hpp.

Macro Definition Documentation

◆ START_TIME

#define START_TIME (   time_var)    time_var = p_cpu_time()

◆ START_WTIME

#define START_WTIME (   time_var)    time_var = p_cpu_wtime()

Macro used to store the start time into time_var.

Definition at line 152 of file cpu_time.hpp.

◆ STOP_TIME

#define STOP_TIME (   time_var)    time_var = p_cpu_time() - (time_var)

◆ STOP_WTIME

#define STOP_WTIME (   time_var)    time_var = p_cpu_wtime() - (time_var)

Macro used to store the elapsed time into time_var.

Definition at line 155 of file cpu_time.hpp.

◆ TIMES_TICKS_PER_SEC

#define TIMES_TICKS_PER_SEC   60

Definition at line 71 of file cpu_time.hpp.

Referenced by p_cpu_time().

Function Documentation

◆ dump_exec_time()

void dump_exec_time ( const std::string &  thing,
long  et 
)
inline

Definition at line 126 of file cpu_time.hpp.

References INDENT_OUT_MEX, and print_cpu_time().

Referenced by CompilerWrapper::CompileFile(), CompilerWrapper::FillTreeManager(), and main().

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

◆ p_cpu_time()

long int p_cpu_time ( )
inline

return a long which represents the elapsed processor time in milliseconds since some constant reference

Definition at line 78 of file cpu_time.hpp.

References times(), and TIMES_TICKS_PER_SEC.

Referenced by p_cpu_wtime().

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

◆ p_cpu_wtime()

long int p_cpu_wtime ( )
inline

return a long which represents the elapsed wall processor time in milliseconds since some constant reference

Definition at line 142 of file cpu_time.hpp.

References p_cpu_time().

Here is the call graph for this function:

◆ print_cpu_time()

std::string print_cpu_time ( long int  t)
inline

Generated on Mon Feb 12 2024 13:03:34 for PandA-2024.02 by doxygen 1.8.13