#
# all timings are given as milliseconds per path, with enough
# paths used (hopefully) to get +/- 5% accuracy

# the testcase has 80 initial forward rates, and computes 80 deltas,
# the sensitivities to those 80 initial rates.  The hand-coded 
# adjoint code also computes 80 vegas, the sensitivity to the 80 
# initial volatilities.
#
# the test code first checks that all four methods give the same
# values for the deltas, and then times how long they each take.
 
# hc-b  -- hand-coded backward (reverse mode, adjoint)
# hc-f  -- hand-coded forward  (forward mode, pathwise sensitivity)
# BAD   -- FADBAD++ backward   (reverse mode, adjoint)
# FAD   -- FADBAD++ forward    (forward mode, pathwise sensitivity)
# hyb-b -- hybrid backward     (reverse mode, adjoint)
# hyb-f -- hybrid forward      (forward mode, pathwise sensitivity)
#
#
#  execution time on Athlon-64 using gcc 4.0.2
#   val  hc-b  hc-f   BAD   FAD  hyb-b hyb-f
#  0.17  0.25  0.66  5.50  2.98  0.35  0.70


#  execution time on Pentium 4 using gcc 4.0.2
#   val  hc-b  hc-f   BAD   FAD  hyb-b hyb-f
#  0.41  0.52  1.18  6.28  4.67  0.72  1.25
#  0.41  0.51  1.17  6.09  4.58  0.71  1.22

#  execution time on Pentium 4 using gcc 4.1.2
#  0.37  0.47  0.97  6.20  4.30  0.65  1.01


#  execution time on Pentium 4 using icc 9.0
#   val  hc-b  hc-f   BAD   FAD  hyb-b hyb-f
#  0.10  0.19  0.53  4.90  5.00  0.35  0.63
#  0.10  0.19  0.52  4.90  5.05  0.35  0.63


CC = icc
CFLAGS = -I${HOME}/FADBAD++  -O0
CFLAGS = -I${HOME}/FADBAD++  -fast -fno-alias

CC = g++
CFLAGS = -I${HOME}/FADBAD++  -D_DEBUG
CFLAGS = -I${HOME}/FADBAD++  -O0
CFLAGS = -I${HOME}/FADBAD++  -O3 -funroll-loops -ffast-math
CFLAGS = -I${HOME}/FADBAD++  -O3 -funroll-loops

#
# linker options
#

LOPTS = -lm

#
# executable
#


testlinadj:		       testlinadj.cpp
	   ${CC} ${CFLAGS} -o $@ $@.cpp ${LOPTS}

