x10bd_a1w_f gets the callback computational mode from a configuration data structure for the NAG AD Library as created by a prior call to
x10aa_a1w_f.
x10bd_a1w_f gets, when the symbolic computational mode is being used, the callback computational mode from the configuration data object as created by
x10aa_a1w_f and passed to a user-supplied procedure argument (callback) of a NAG AD Library routine. This mode is then used to determine the form of computation that is required to be performed by the symbolic callback for which the mode has been set and obtained. The full set of computational modes for symbolic callbacks currently supplied are:
nagad_primal,
nagad_dstate,
nagad_dparam and
nagad_dall. Within a user-supplied callback, different forms of computation are expected at different times. These are: the primal calculation of the callback (
nagad_primal); the derivatives of the primal calculation with respect to real-valued input arguments (
nagad_dstate); the derivatives of the primal calculation with respect to any user-supplied real-valued input data, e.g., in the argument ruser (
nagad_dparam); and, in combining
nagad_dstate and
nagad_dparam, derivatives of the primal calculation with respect to all active input arguments (
nagad_dall).
Note that in the case where the
algorithmic computation mode is being used and the primal callback operation involves only standard operations and intrinsic functions then the callback computational mode is not relevant and no companion callback need be supplied. When the
symbolic computational mode is being used the callback computational mode must be interrogated to determine the form of operation required, even when this is to be performed using operator overloading rather than via companion callbacks (see
Section 10 in
c05ay_a1w_f).
The initialization by
x10aa_a1w_f and destruction by
x10ab_a1w_f mark the beginning and the end of the life of the handle. During this time the handle must only be modified by NAG AD Library routines. Working with a handle which has not been properly initialized is potentially very dangerous as it may cause unpredictable behaviour.
After the handle has been initialized, two routines are provided to set or get the callback computational mode to determine the form of computation to be performed by a supplied procedure argument. If, for example, a callback needs to know the computational mode in order to provide differentials appropriately,
x10bd_a1w_f will return the current computational mode as stored in the
ad_handle.
When all AD computation is completed, the handle must be destroyed by
x10ab_a1w_f.
None.
If on entry
${\mathbf{ifail}}=0$ or
$-1$, explanatory error messages are output on the current error message unit (as defined by
x04aaf).
Not applicable.
None.
See examples for computational routines in the NAG AD Library, for example,
Section 10 in
c05ay_a1w_f.