\(\newcommand{\W}[1]{ \; #1 \; }\) \(\newcommand{\R}[1]{ {\rm #1} }\) \(\newcommand{\B}[1]{ {\bf #1} }\) \(\newcommand{\D}[2]{ \frac{\partial #1}{\partial #2} }\) \(\newcommand{\DD}[3]{ \frac{\partial^2 #1}{\partial #2 \partial #3} }\) \(\newcommand{\Dpow}[2]{ \frac{\partial^{#1}}{\partial {#2}^{#1}} }\) \(\newcommand{\dpow}[2]{ \frac{ {\rm d}^{#1}}{{\rm d}\, {#2}^{#1}} }\)
link_routines¶
View page sourcePackage Specific Speed Test Linking Routines¶
Syntax¶
Purpose¶
Each package defines a version of each link_name listed below. This is used by the speed_main program to run the corresponding speed and correctness tests.
Thread Save¶
The link_name routines may use static memory for setup and teardown and hence may not be thread safe.
link_name¶
The routine link_name in the syntax is one of the following:
Contents¶
Name |
Title |
---|---|
link_det_lu |
Speed Testing Gradient of Determinant Using Lu Factorization |
link_det_minor |
|
link_mat_mul |
|
link_ode |
|
link_poly |
|
link_sparse_hessian |
|
link_sparse_jacobian |
Namespace¶
These routines are in the global namespace, not the CppAD namespace.
available¶
The bool
return value available is true (false)
if the speed test name is (is not) available for this package.
job¶
This argument can be used to cache information that does not
depend on the function argument value without having the corresponding time
included in the test results.
This is expected to be important when the global option
onetape is true.
The const std::string&
argument job
has one of the following values:
setup¶
This is the first call with a new value for size and will not be used for timing. It can be used to setup information that should not be included in timing how long this routine takes.
run¶
This call will be used for timing how long this routine takes.
The previous call job was either setup
or run
and had the same value of size .
teardown¶
This is the last call with this value of size and will not be used for timing. It should be used to take down the setup; e.g., fee any memory that was allocated.
size¶
The size_t
argument size this is the size parameter for this
test. Larger sizes correspond to more computation per call.
repeat¶
If job is run
,
the size_t argument repeat is the number of
randomly chosen argument values that the test derivatives should be
evaluated for.
The value of repeat is always greater than or equal one
and all the link_
name output values are always calculated.
other_arguments¶
Each link function routine has specific specifications for size and their other arguments.