Prev Next

@(@\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}} }@)@
Speed Test Example and Template for a New Package

Purpose
CppAD has a set of speed tests that are used to compare AD packages. This section can be used as a starting point for linking a new package to he CppAD speed tests.

Files
Use the following command, in the distribution directory , to see which files link the example package xpackage to the speed tests:
    git grep -l xpackage

Template
Suppose your_package is the name of a package you want to add to the speed tests. If you are using a Unix system, executing the following commands in the distribution directory will use xpackage as a template for your package:
    cp -r speed/xpackage speed/
your_package
    for file in `ls speed/
your_package`
    do
        sed -i speed/
your_package/$file -e 's|xpackage|your_package|'
    done
where your_package has been replaced by the name of the new package.

Running Tests
To build the xpackage version of the tests, execute the following commands starting in the build directory :
    cd speed/xpackage
    make check_speed_xpackage VERBOSE=1
You can then run the corresponding speed tests with the following command
    ./speed_xpackage speed 
seed
where seed is a positive integer. See speed_main for more options.

Contents
Xpackage Speed: Gradient of Determinant by Minor Expansion
Xpackage Speed: Gradient of Determinant Using Lu Factorization
Xpackage Speed: Matrix Multiplication
Xpackage Speed: Ode
Xpackage Speed: Second Derivative of a Polynomial
Xpackage Speed: Sparse Hessian
Xpackage Speed: sparse_jacobian

Input File: speed/xpackage/speed_xpackage.omh