Prev Next speed_main

Speed Test Main Program

Syntax
speed/package/package option seed

Purpose
A version of this program runs the correctness tests or the speed tests for one AD package identified by package.

package
The value package specifies the AD package that is used for the speed tests and is one of the following packages: adolc , cppad , fadbad , profile . In the special case where package is profile, the CppAD package is compiled and run with profiling to determine where it is spending most of its time.

option
It the argument option specifies which test to run and has the following possible values: correct , all , det_minor , det_lu , poly .

correct
If option is equal to correct, all of the correctness tests are run.

all
If option is equal to all, all of the speed tests are run.

det_lu
If option is equal to det_lu, the speed test for the gradient of the determinant using LU factorization tests is run. Each package defines a version of this speed test with the prototype
     void speed_det_lu(size_t 
size, size_t repeat)
The argument size is the number of rows and columns in the matrix. The argument repeat is the number of different matrices that the gradient is computed for. In addition, a test that speed_det_lu works correctly is defined with the prototype
     bool correct_det_lu(void)

det_minor
If option is equal to det_minor, the speed test for computing the gradient of the determinant using expansion by minors is run. Each package defines a version of this speed test with the prototype
     void speed_det_minor(size_t 
size, size_t repeat)
The argument size is the number of rows and columns in the matrix. The argument repeat is the number of different matrices that the gradient is computed for. In addition, a test that speed_det_minor works correctly is defined with the prototype
     bool correct_det_minor(void)

poly
If option is equal to poly, the speed test for computing the second derivative of a polynomial is run. Each package defined a version for this speed test with the prototype
     void speed_poly(size_t 
size, size_t repeat)
The argument size is the order of the polynomial (the number of coefficients in the polynomial). The argument repeat is the number of different argument values that the polynomial will be differentiated at. In addition, a test that speed_poly works correctly is defined with the prototype
     bool correct_poly(void)

seed
The random number simulator uniform_01 is initialized with the call
     uniform_01(
seed)
before any of the testing routines (listed above) are called.

Correctness Results
An output line is generated for each correctness test stating of the test passed or failed.

Speed Results
For each speed test, corresponds to three lines of output. The name of the package and test are printed on the first line, the vector of problem sizes are printed on the next line, and the rates corresponding to the different problem sizes are printed on the third line. The rate is the number of times per second that the calculation was repeated.
Input File: speed/main.cpp