C++ Library Extensions 2022.12.09
To help learn modern C++ programming
stupid_experiment.cpp File Reference
#include <tpf_ncrnpr.hpp>
#include <tpf_output.hpp>
#include <tpf_chrono_random.hpp>
#include <future>
#include <atomic>
Include dependency graph for stupid_experiment.cpp:

Go to the source code of this file.

Typedefs

using big_int_t = long long
 

Functions

big_int_t single_thread_ncr_recursion (big_int_t n, big_int_t k)
 
big_int_t multiple_thread_ncr_recursion (big_int_t n, big_int_t k)
 
void examples_for_combination ()
 
void examples_for_single_vs_multithread_recursion ()
 
int main ()
 

Variables

constexpr int factor = 2
 
int max_thread_count
 
std::atomic< int > thread_count {0}
 

Typedef Documentation

◆ big_int_t

using big_int_t = long long

Definition at line 7 of file stupid_experiment.cpp.

Function Documentation

◆ examples_for_combination()

void examples_for_combination ( )

Definition at line 55 of file stupid_experiment.cpp.

Here is the call graph for this function:

◆ examples_for_single_vs_multithread_recursion()

void examples_for_single_vs_multithread_recursion ( )

Definition at line 71 of file stupid_experiment.cpp.

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

◆ main()

int main ( )

Definition at line 87 of file stupid_experiment.cpp.

Here is the call graph for this function:

◆ multiple_thread_ncr_recursion()

big_int_t multiple_thread_ncr_recursion ( big_int_t  n,
big_int_t  k 
)

Definition at line 28 of file stupid_experiment.cpp.

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

◆ single_thread_ncr_recursion()

big_int_t single_thread_ncr_recursion ( big_int_t  n,
big_int_t  k 
)

Definition at line 9 of file stupid_experiment.cpp.

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

Variable Documentation

◆ factor

constexpr int factor = 2
constexpr

Definition at line 22 of file stupid_experiment.cpp.

◆ max_thread_count

int max_thread_count
Initial value:
=
factor * std::thread::hardware_concurrency()
constexpr int factor

Definition at line 23 of file stupid_experiment.cpp.

◆ thread_count

std::atomic<int> thread_count {0}

Definition at line 26 of file stupid_experiment.cpp.