TrioCFD 1.9.8
TrioCFD documentation
Loading...
Searching...
No Matches
Perf_counters::Impl Class Reference

Public Types

using clock = std::chrono::high_resolution_clock
using time_point = std::chrono::time_point<clock>
using duration = std::chrono::duration<double>

Public Member Functions

time_point now ()
 Impl ()
 ~Impl ()
void create_custom_counter_impl (std::string counter_description, int counter_level, std::string counter_family, bool is_comm, bool is_gpu)
void begin_count_impl (const STD_COUNTERS &std_cnt, int counter_lvl)
void begin_count_impl (const std::string &custom_count_name, int counter_lvl)
void end_count_impl (const STD_COUNTERS &std_cnt, int count_increment, long int quantity_increment)
 End the count of a counter and update the counter values.
void end_count_impl (const std::string &custom_count_name, int count_increment, long int quantity_increment)
 End the count of a counter and update the counter values.
void stop_counters_impl ()
 Stop all counters, has to be called on every processor simultaneously.
void restart_counters_impl ()
 Restart all counters, has to be called on every processor simultaneously.
void reset_counters_impl ()
void set_time_steps_elapsed_impl (int time_step_elapsed)
double get_computation_time_impl ()
double get_total_time_impl (const STD_COUNTERS &name)
double get_total_time_impl (const std::string &name)
double get_time_since_last_open_impl (const STD_COUNTERS &name)
double get_time_since_last_open_impl (const std::string &name)
void start_timeloop_impl ()
void end_timeloop_impl ()
void start_time_step_impl ()
void end_time_step_impl (long int tstep)
 Compute for each counter open during a time step avg_time_per_step_, min_time_per_step_, max_time_per_step_ and sd_time_per_step_.
int get_last_opened_counter_level_impl () const
void print_TU_files_impl (const std::string &message)
void start_gpu_timer_impl ()
void stop_gpu_timer_impl ()
double compute_gpu_time_impl ()
bool is_gpu_verbose_on_impl () const
void set_gpu_verbose_impl (bool on)
bool get_init_device_impl () const
void set_init_device_impl (bool init)
bool get_gpu_timer_impl () const
void add_to_gpu_timer_counter_impl (int to_add=1)
int get_gpu_timer_counter_impl () const
bool get_use_gpu_impl () const
bool get_gpu_fence_impl () const
void set_gpu_fence_impl (bool fence)
bool running_impl (const STD_COUNTERS name)
void record_nb_elem_impl (trustIdType nb_elem)

Detailed Description

@Brief declare all standard counters of TRUST inside an array

Definition at line 263 of file Perf_counters.cpp.

Member Typedef Documentation

◆ clock

using Perf_counters::Impl::clock = std::chrono::high_resolution_clock

Definition at line 266 of file Perf_counters.cpp.

◆ duration

using Perf_counters::Impl::duration = std::chrono::duration<double>

Definition at line 268 of file Perf_counters.cpp.

◆ time_point

using Perf_counters::Impl::time_point = std::chrono::time_point<clock>

Definition at line 267 of file Perf_counters.cpp.

Constructor & Destructor Documentation

◆ Impl()

Perf_counters::Impl::Impl ( )

Definition at line 351 of file Perf_counters.cpp.

◆ ~Impl()

Perf_counters::Impl::~Impl ( )
default

Member Function Documentation

◆ add_to_gpu_timer_counter_impl()

void Perf_counters::Impl::add_to_gpu_timer_counter_impl ( int to_add = 1)

Definition at line 1901 of file Perf_counters.cpp.

◆ begin_count_impl() [1/2]

void Perf_counters::Impl::begin_count_impl ( const std::string & custom_count_name,
int counter_lvl )
Parameters
custom_count_namekey of the map (custom_counter_map_str_to_counter_) of the custom counter you try to close
counter_lvl

Definition at line 1563 of file Perf_counters.cpp.

◆ begin_count_impl() [2/2]

void Perf_counters::Impl::begin_count_impl ( const STD_COUNTERS & std_cnt,
int counter_lvl )

Definition at line 1545 of file Perf_counters.cpp.

◆ compute_gpu_time_impl()

double Perf_counters::Impl::compute_gpu_time_impl ( )

Definition at line 1874 of file Perf_counters.cpp.

◆ create_custom_counter_impl()

void Perf_counters::Impl::create_custom_counter_impl ( std::string counter_description,
int counter_level,
std::string counter_family,
bool is_comm,
bool is_gpu )

Definition at line 1533 of file Perf_counters.cpp.

◆ end_count_impl() [1/2]

void Perf_counters::Impl::end_count_impl ( const std::string & custom_count_name,
int count_increment,
long int quantity_increment )

End the count of a counter and update the counter values.

Parameters
cis the custom counter to end the count
count_incrementis the count increment. If not specified, then it is equal to 1
quantity_incrementis the increment of custom variable quantity. If not specified, it is set to 0.

Definition at line 1602 of file Perf_counters.cpp.

◆ end_count_impl() [2/2]

void Perf_counters::Impl::end_count_impl ( const STD_COUNTERS & std_cnt,
int count_increment,
long int quantity_increment )

End the count of a counter and update the counter values.

Parameters
cis the counter to end the count
count_incrementis the count increment. If not specified, then it is equal to 1
quantity_incrementis the increment of custom variable quantity. If not specified, it is set to 0.

Definition at line 1582 of file Perf_counters.cpp.

◆ end_time_step_impl()

void Perf_counters::Impl::end_time_step_impl ( long int tstep)

Compute for each counter open during a time step avg_time_per_step_, min_time_per_step_, max_time_per_step_ and sd_time_per_step_.

Called at the end of each time step, and only then

Parameters
tstepnumber of time steps elapsed since the start of the computation

Nota : if the counter is called before the time step loop, it is not accounted for in the computation.

< stop_counters already updated c->tim_ts_

Definition at line 1780 of file Perf_counters.cpp.

◆ end_timeloop_impl()

void Perf_counters::Impl::end_timeloop_impl ( )

Definition at line 1741 of file Perf_counters.cpp.

◆ get_computation_time_impl()

double Perf_counters::Impl::get_computation_time_impl ( )

Definition at line 1686 of file Perf_counters.cpp.

◆ get_gpu_fence_impl()

bool Perf_counters::Impl::get_gpu_fence_impl ( ) const
inline

Definition at line 306 of file Perf_counters.cpp.

◆ get_gpu_timer_counter_impl()

int Perf_counters::Impl::get_gpu_timer_counter_impl ( ) const

Definition at line 1905 of file Perf_counters.cpp.

◆ get_gpu_timer_impl()

bool Perf_counters::Impl::get_gpu_timer_impl ( ) const

Definition at line 1897 of file Perf_counters.cpp.

◆ get_init_device_impl()

bool Perf_counters::Impl::get_init_device_impl ( ) const

Definition at line 1889 of file Perf_counters.cpp.

◆ get_last_opened_counter_level_impl()

int Perf_counters::Impl::get_last_opened_counter_level_impl ( ) const

Definition at line 1831 of file Perf_counters.cpp.

◆ get_time_since_last_open_impl() [1/2]

double Perf_counters::Impl::get_time_since_last_open_impl ( const std::string & name)

Definition at line 1724 of file Perf_counters.cpp.

◆ get_time_since_last_open_impl() [2/2]

double Perf_counters::Impl::get_time_since_last_open_impl ( const STD_COUNTERS & name)

Definition at line 1714 of file Perf_counters.cpp.

◆ get_total_time_impl() [1/2]

double Perf_counters::Impl::get_total_time_impl ( const std::string & name)

Definition at line 1705 of file Perf_counters.cpp.

◆ get_total_time_impl() [2/2]

double Perf_counters::Impl::get_total_time_impl ( const STD_COUNTERS & name)

Definition at line 1696 of file Perf_counters.cpp.

◆ get_use_gpu_impl()

bool Perf_counters::Impl::get_use_gpu_impl ( ) const
inline

Definition at line 305 of file Perf_counters.cpp.

◆ is_gpu_verbose_on_impl()

bool Perf_counters::Impl::is_gpu_verbose_on_impl ( ) const

Definition at line 1881 of file Perf_counters.cpp.

◆ now()

time_point Perf_counters::Impl::now ( )
inline

Definition at line 269 of file Perf_counters.cpp.

◆ print_TU_files_impl()

void Perf_counters::Impl::print_TU_files_impl ( const std::string & message)

Definition at line 1838 of file Perf_counters.cpp.

◆ record_nb_elem_impl()

void Perf_counters::Impl::record_nb_elem_impl ( trustIdType nb_elem)
inline

Definition at line 309 of file Perf_counters.cpp.

◆ reset_counters_impl()

void Perf_counters::Impl::reset_counters_impl ( )

Definition at line 1664 of file Perf_counters.cpp.

◆ restart_counters_impl()

void Perf_counters::Impl::restart_counters_impl ( )

Restart all counters, has to be called on every processor simultaneously.

Definition at line 1644 of file Perf_counters.cpp.

◆ running_impl()

bool Perf_counters::Impl::running_impl ( const STD_COUNTERS name)
inline

Definition at line 308 of file Perf_counters.cpp.

◆ set_gpu_fence_impl()

void Perf_counters::Impl::set_gpu_fence_impl ( bool fence)
inline

Definition at line 307 of file Perf_counters.cpp.

◆ set_gpu_verbose_impl()

void Perf_counters::Impl::set_gpu_verbose_impl ( bool on)

Definition at line 1885 of file Perf_counters.cpp.

◆ set_init_device_impl()

void Perf_counters::Impl::set_init_device_impl ( bool init)

Definition at line 1893 of file Perf_counters.cpp.

◆ set_time_steps_elapsed_impl()

void Perf_counters::Impl::set_time_steps_elapsed_impl ( int time_step_elapsed)

Definition at line 1679 of file Perf_counters.cpp.

◆ start_gpu_timer_impl()

void Perf_counters::Impl::start_gpu_timer_impl ( )

Definition at line 1859 of file Perf_counters.cpp.

◆ start_time_step_impl()

void Perf_counters::Impl::start_time_step_impl ( )

Definition at line 1748 of file Perf_counters.cpp.

◆ start_timeloop_impl()

void Perf_counters::Impl::start_timeloop_impl ( )

Definition at line 1734 of file Perf_counters.cpp.

◆ stop_counters_impl()

void Perf_counters::Impl::stop_counters_impl ( )

Stop all counters, has to be called on every processor simultaneously.

Definition at line 1618 of file Perf_counters.cpp.

◆ stop_gpu_timer_impl()

void Perf_counters::Impl::stop_gpu_timer_impl ( )

Definition at line 1867 of file Perf_counters.cpp.


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