Maintain thread timing statistics and automatically choose the optimum number of threads.
More...
#include <Thread.h>
|
| AutoThreadCount (int minThreads=1, int minStats=3, const char *name=0, FILE *fpLog=stdout) |
|
Maintain thread timing statistics and automatically choose the optimum number of threads.
AutoThreadCount::AutoThreadCount |
( |
int |
minThreads = 1 , |
|
|
int |
minStats = 3 , |
|
|
const char * |
name = 0 , |
|
|
FILE * |
fpLog = stdout |
|
) |
| |
- Parameters
-
minThreads | minimum number of threads to try |
minStats | minimum number of tries for each thread count |
name | if given, print debug messages & stats with that header |
fpLog | debug logging stream |
template<typename Callable , typename... Args>
void threadLaunch |
( |
AutoThreadCount * |
, |
|
|
Callable * |
, |
|
|
size_t |
, |
|
|
Args... |
args |
|
) |
| |
|
friend |
Same as threadLaunch(int nThreads, Callable* func, size_t nJobs, Args... args) but with nThreads automatically adjusted over multiple runs using an AutoThreadCount object If the AutoThreadCount pointer is null, as many threads as processors will be launched
The documentation for this class was generated from the following file: