Monero
Loading...
Searching...
No Matches
cpu_power_test.cpp File Reference
#include <iostream>
#include <future>
#include <vector>
#include <sstream>
#include <chrono>
Include dependency graph for cpu_power_test.cpp:

Functions

static double calcPi (const size_t max_iter)
int main (int argc, const char **argv)

Variables

const char * descr

Function Documentation

◆ calcPi()

double calcPi ( const size_t max_iter)
static

◆ main()

int main ( int argc,
const char ** argv )

Variable Documentation

◆ descr

const char* descr
Initial value:
=
"This program prints the time (ms) needed to calculate a mathematical challenge. It's purpose \n\
is to be able to use the result to compare the CPU power available on the machine it's being executed \n\
and under the given circumstances, which can differ for the same machine. For example: \n\
The printed value will be different when using 2 of 2 cores, when there an another process \n\
running on one of the cores core, and when no other intense process running. \n\
\n\
The program expects a one argument: a numerical value of the threads to start the calculations on. \n\
\n\
Prints: \n\
Time to calculate a mathematical challenge in MILLISECONDS. \n\
\n\
Returns: \n\
0 on success, \n\
1 on a missing argument, \n\
2 on an incorrect format of the argument.\n"