Fast Methods for Cosmological Simulations
FastSim serves as a tool for quick N-body simulations in modified gravity.
Catch::BenchmarkLooper Class Reference

#include <catch.hpp>

Collaboration diagram for Catch::BenchmarkLooper:

Public Member Functions

 BenchmarkLooper (StringRef name)
 
 operator bool ()
 
void increment ()
 
void reportStart ()
 
auto needsMoreIterations () -> bool
 

Static Private Member Functions

static auto getResolution () -> uint64_t
 

Private Attributes

std::string m_name
 
std::size_t m_count = 0
 
std::size_t m_iterationsToRun = 1
 
uint64_t m_resolution
 
Timer m_timer
 

Detailed Description

Definition at line 2109 of file catch.hpp.

Constructor & Destructor Documentation

Catch::BenchmarkLooper::BenchmarkLooper ( StringRef  name)
inline

Definition at line 2120 of file catch.hpp.

References Catch::Timer::start().

2121  : m_name( name ),
2123  {
2124  reportStart();
2125  m_timer.start();
2126  }
std::string m_name
Definition: catch.hpp:2111
static auto getResolution() -> uint64_t
name
Definition: setup.py:39

Member Function Documentation

static auto Catch::BenchmarkLooper::getResolution ( ) -> uint64_t
staticprivate
void Catch::BenchmarkLooper::increment ( )
inline

Definition at line 2134 of file catch.hpp.

2134  {
2135  ++m_count;
2136  }
std::size_t m_count
Definition: catch.hpp:2112
auto Catch::BenchmarkLooper::needsMoreIterations ( ) -> bool
Catch::BenchmarkLooper::operator bool ( )
inlineexplicit

Definition at line 2128 of file catch.hpp.

2128  {
2129  if( m_count < m_iterationsToRun )
2130  return true;
2131  return needsMoreIterations();
2132  }
auto needsMoreIterations() -> bool
std::size_t m_count
Definition: catch.hpp:2112
std::size_t m_iterationsToRun
Definition: catch.hpp:2113
void Catch::BenchmarkLooper::reportStart ( )

Member Data Documentation

std::size_t Catch::BenchmarkLooper::m_count = 0
private

Definition at line 2112 of file catch.hpp.

std::size_t Catch::BenchmarkLooper::m_iterationsToRun = 1
private

Definition at line 2113 of file catch.hpp.

std::string Catch::BenchmarkLooper::m_name
private

Definition at line 2111 of file catch.hpp.

uint64_t Catch::BenchmarkLooper::m_resolution
private

Definition at line 2114 of file catch.hpp.

Timer Catch::BenchmarkLooper::m_timer
private

Definition at line 2115 of file catch.hpp.


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