Changeset 379


Ignore:
Timestamp:
Dec 14, 2012 7:35:37 AM (6 years ago)
Author:
kulshres
Message:

include advance branching in manual and --help text for configure

Signed-off-by: Kshitij Kulshreshtha <kshitij@…>

Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/ADOL-C/doc/adolc-manual.tex

    r370 r379  
    660660without any differentiation can be tested
    661661for correctness.
     662
     663A generalization of this concept for more than two branches, e.g.,
     664akin to a \texttt{switch} statement or a cascade of \texttt{if...else if}, may be done by enabling
     665\textsf{ADOLC\_ADVANCED\_BRANCHING} and performing selection on
     666elements of an \texttt{advector} with active indices.
    662667%
    663668%++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
     
    829834of {\sf tssize}$*${\sf keep} {\sf revreal}s if called with the
    830835option {\sf keep} $>$ 0. Here
    831 the type {\sf revreal} is defined as {\sf double} or {\sf float} in
    832 the header file \verb=<adolc/usrparms.h>=. The latter choice halves the storage
     836the type {\sf revreal} is defined as {\sf double} or {\sf float}. The latter choice halves the storage
    833837requirement for the sequential data set, which stays in core if
    834838its length is less than {\sf TBUFSIZE} bytes and is otherwise written
     
    856860\begin{description}
    857861\item[{\sf OBUFSIZE}, {\sf LBUFSIZE}, {\sf VBUFSIZE}{\rm :}] These integer determines the length of
    858 in\-ter\-nal buf\-fers (default: 65$\,$536). If the buffers are large enough to accommodate all
     862in\-ter\-nal buf\-fers (default: 524$\,$288). If the buffers are large enough to accommodate all
    859863required data, any file access is avoided unless {\sf trace\_off}
    860864is called with a positive argument. This desirable situation can
     
    863867to {\sf malloc}, so that setting it unnecessarily large may have no
    864868ill effects, unless the operating system prohibits or penalizes large
    865 array allocations.
     869array allocations. It is however recommended to leave the values in
     870\texttt{<adolc/usrparms.h>} unchanged and set them using the
     871\texttt{.adolcrc} file in the current working directory at runtime.
    866872
    867873\item[{\sf TBUFSIZE}{\rm :}] This integer determines the length of the
    868 in\-ter\-nal buf\-fer for a taylor stack (default: 65$\,$536).
     874in\-ter\-nal buf\-fer for a taylor stack (default: 524$\,$288).
    869875
    870876\item[{\sf TBUFNUM}{\rm :}] This integer determines the maximal number of taylor stacks (default: 32).
    871 
    872 \item[{\sf locint}{\rm :}] The range of the integer type
    873 {\sf locint} determines how many {\sf adouble}s can be simultaneously
    874 alive (default: {\sf unsigned int}).  In extreme cases when there are more than $2^{32}$ {\sf adouble}s
    875 alive at any one time, the type {\sf locint} must be changed to
    876  {\sf unsigned long}.
    877 
    878 \item[{\sf revreal}{\rm :}] The choice of this floating-point type
    879 trades accuracy with storage for reverse sweeps (default: {\sf double}). While functions
    880 and their derivatives are always evaluated in double precision
    881 during forward sweeps, gradients and other adjoint vectors are obtained
    882 with the precision determined by the type {\sf revreal}. The less
    883 accurate choice {\sf revreal} = {\sf float} nearly halves the
    884 storage requirement during reverse sweeps.
    885877
    886878\item[{\sf fint}{\rm :}] The integer data type used by Fortran callable versions of functions.
     
    911903\item[{\sf ADOLC\_EPS}{\rm :}] For testing on small numbers to avoid overflows (default: 10E-20).
    912904
    913 \item[{\sf ATRIG\_ERF}{\rm :}] By removing the comment signs
    914 the overloaded versions of the inverse hyperbolic functions and
    915 the error function are enabled (default: undefined).
    916 
    917905\item[{\sf DIAG\_OUT}{\rm :}] File identifier used as standard output for ADOL-C diagnostics (default: stdout).
     906\end{description}
     907
     908The following types and options may be set using the command-line
     909options of the \texttt{./configure} script.
     910
     911\begin{description}
     912\item[{\sf locint}{\rm :}] The range of the integer type
     913{\sf locint} determines how many {\sf adouble}s can be simultaneously
     914alive (default: {\sf unsigned int}).  In extreme cases when there are more than $2^{32}$ {\sf adouble}s
     915alive at any one time, the type {\sf locint} must be changed to
     916 {\sf unsigned long}. This can be done by passing
     917 \texttt{--enable-ulong} to \texttt{./configure}.
     918
     919\item[{\sf revreal}{\rm :}] The choice of this floating-point type
     920trades accuracy with storage for reverse sweeps (default: {\sf double}). While functions
     921and their derivatives are always evaluated in double precision
     922during forward sweeps, gradients and other adjoint vectors are obtained
     923with the precision determined by the type {\sf revreal}. The less
     924accurate choice {\sf revreal} = {\sf float} nearly halves the
     925storage requirement during reverse sweeps. This can be done by passing
     926\texttt{--disable-double} to \texttt{./configure}.
     927
     928\item[{\sf ATRIG\_ERF}{\rm :}] The overloaded versions of the inverse
     929  hyperbolic functions and the error function are enabled (default:
     930  undefined) by passing \texttt{--enable-atrig-erf}
     931  to \texttt{./configure}
    918932
    919933\item[{\sf ADOLC\_USE\_CALLOC}{\rm :}] Selects the memory allocation routine
    920934  used by ADOL-C. {\sf Malloc} will be used if this variable is
    921935  undefined. {\sf ADOLC\_USE\_CALLOC} is defined by default to avoid incorrect
    922   result caused by uninitialized memory.
     936  result caused by uninitialized memory. It can be set undefined by
     937  passing \texttt{--disable-use-calloc} to \texttt{./configure}.
     938
     939\item[{\sf ADOLC\_ADVANCED\_BRANCHING}{\rm :}] Enables routines
     940  required for automatic branch selection (default: disabled). The
     941  boolean valued comparison operators with two \texttt{adouble} type
     942  arguments will not return boolean values anymore and may not be used
     943  in branch control statements (\texttt{if}, \texttt{while}, \texttt{for}
     944  etc.). Instead conditional assignments using \texttt{condassign} or
     945  selection operations on elements of \texttt{advector} type should be
     946  used. Enabling this option and rewriting the function evaluation
     947  using \texttt{condassign} or selections of \texttt{advector}
     948  elements will prevent the need for retracing the function at branch
     949  switches. This can be enabled by passing
     950  \texttt{--enable-advanced-branching} to \texttt{./configure}.
    923951\end{description}
    924952%
  • trunk/configure

    r377 r379  
    14641464  --enable-advanced-branching
    14651465                          enable advanced branching operations to reduce
    1466                           retaping [default=no]
     1466                          retaping [default=no]. The boolean valued comparison
     1467                          operators with two adouble arguments will not return
     1468                          boolean results but the active results may be used
     1469                          to automatically switch branches in conjunction with
     1470                          condassign or advector (see manual).
    14671471
    14681472  --enable-debug          enable ADOL-C debug mode [default=no]
  • trunk/configure.ac

    r375 r379  
    159159AC_MSG_CHECKING(whether to enable advanced branching operations)
    160160AC_ARG_ENABLE(advanced-branching, [AS_HELP_STRING([--enable-advanced-branching],
    161   [enable advanced branching operations to reduce retaping [default=no]])],
     161  [enable advanced branching operations to reduce retaping [default=no].
     162The boolean valued comparison operators with two adouble arguments will
     163not return boolean results but the active results may be used to automatically
     164switch branches in conjunction with condassign or advector (see manual).])],
    162165  [use_advbranch=$enableval],[use_advbranch=no])
    163166AC_MSG_RESULT($use_advbranch)
Note: See TracChangeset for help on using the changeset viewer.