mCRL2
Loading...
Searching...
No Matches
benchmark_shared.h File Reference

Go to the source code of this file.

Functions

template<typename F >
void benchmark_threads (std::size_t number_of_threads, F f)
 Run the given function f on number_of_threads threads (including the main thread) and report the elapsed wall-clock time.
 
template<bool with_converter = false>
atermpp::aterm create_nested_function (const std::string &function_name, const std::string &leaf_name, std::size_t number_of_arguments, std::size_t depth)
 Create a nested function application f_depth. Where f_0 = c and f_i = f(f_i-1,...,f_i-1).
 
template<std::size_t N>
atermpp::aterm create_nested_function (const std::string &function_name, const std::string &leaf_name, std::size_t depth)
 Create a nested function application f_depth. Where f_0 = c and f_i = f(f_i-1,...,f_i-1). However, this function uses the fixed arity constructor of length N which should be faster.
 

Function Documentation

◆ benchmark_threads()

template<typename F >
void benchmark_threads ( std::size_t  number_of_threads,
F  f 
)

Run the given function f on number_of_threads threads (including the main thread) and report the elapsed wall-clock time.

Precondition
number_of_threads >= 1.

Definition at line 26 of file benchmark_shared.h.

◆ create_nested_function() [1/2]

template<std::size_t N>
atermpp::aterm create_nested_function ( const std::string &  function_name,
const std::string &  leaf_name,
std::size_t  depth 
)

Create a nested function application f_depth. Where f_0 = c and f_i = f(f_i-1,...,f_i-1). However, this function uses the fixed arity constructor of length N which should be faster.

Definition at line 97 of file benchmark_shared.h.

◆ create_nested_function() [2/2]

template<bool with_converter = false>
atermpp::aterm create_nested_function ( const std::string &  function_name,
const std::string &  leaf_name,
std::size_t  number_of_arguments,
std::size_t  depth 
)

Create a nested function application f_depth. Where f_0 = c and f_i = f(f_i-1,...,f_i-1).

Definition at line 57 of file benchmark_shared.h.