| Prev | Next |  |  |  |  |  | multi_atomic_time |

Timing Test for Multi-Threaded User Atomic Calculation
Syntax
`ok = multi_atomic_time(
time_out, test_time, num_threads, num_itr
)`
Thread
It is assumed that this function is called by thread zero in sequential mode; i.e., not in_parallel .
time_out
This argument has prototype `
double& time_out
` Its input value of the argument does not matter. Upon return it is the number of wall clock seconds used by multi_atomic_run .
test_time
This argument has prototype `
double test_time
` and is the minimum amount of wall clock time that the test should take. The number of repeats for the test will be increased until this time is reached. The reported `time_out` is the total wall clock time divided by the number of repeats.
num_threads
This argument has prototype `
size_t num_threads
` It specifies the number of threads that are available for this test. If it is zero, the test is run without the multi-threading environment and `
1 == thread_alloc::num_threads()
` If it is non-zero, the test is run with the multi-threading and `
num_threads = thread_alloc::num_threads()
`
num_solve
This specifies the number of square roots that will be solved for.
ok
The return value has prototype `
bool ok
` If it is true, `harmonic_time` passed the correctness test and `multi_atomic_time` did not detect an error. Otherwise it is false.

Input File: example/multi_thread/multi_atomic.cpp