# include <cppad/utility/speed_test.hpp>
rate_vec = speed_test(test, size_vec, time_min)
speed_testfunction executes a speed test for various sized problems and reports the rate of execution.
speed_testautomatically determines how many times to repeat the section of the test that we wish to time.
speed_testfunction. This file is included by
cppad/cppad.hppand it can also be included separately with out the rest of the
Vectorto denote a simple vector class with elements of type
testis a function with the syntax
and its return value is
It specifies the size for this test.
It specifies the number of times to repeat the test.
This vector determines the size for each of the tests problems.
const Vector& size_vec
It specifies the minimum amount of time in seconds that the
testroutine should take. The
testis increased until this amount of execution time is reached.
We use @(@ n @)@ to denote its size which is the same as the vector
size_vec. For @(@ i = 0 , \ldots , n-1 @)@,
is the ratio of
repeatdivided by time in seconds for the problem with size
gettimeofdayfunction, it will be used to measure time. Otherwise, time is measured by the difference in
in the context of the standard(double) clock() / (double) CLOCKS_PER_SEC