Toolchains - Parameters - Filters
Toolchain prepare-rm: Preprocessing for reverse mode differentiation
Transforms the code in reverse mode AD.
Parameters
Name | Default value | Filters | Description | Toolchains |
---|---|---|---|---|
a-zeros-function | 'a_zeros' | xsl/renice.xsl | Name of the zero adjoint function. | forward-ad, prepare-fm, prepare-rm, rename, reverse-ad, taylor-ad |
activityAnalysis | Controls if-then-else. | forward-ad, prepare-fm, prepare-rm, reverse-ad, taylor-ad, xaif | ||
adjoint-reductions | not($well-behaved) | xsl/renice.xsl | Whether to use adjred wrapper functions in adjoint code. | forward-ad, prepare-fm, prepare-rm, rename, reverse-ad, taylor-ad |
adjoint-subsasgn | not($well-behaved) | xsl/renice.xsl | Whether to use adjreshape wrapper functions in adjoint code. | forward-ad, prepare-fm, prepare-rm, rename, reverse-ad, taylor-ad |
avoid-vararg-functions | true() | xsl/renice.xsl | Whether to use push/pop/a_zeros functions without varargin. | forward-ad, prepare-fm, prepare-rm, rename, reverse-ad, taylor-ad |
comment-char | '%' | xsl/has-end.xsl, xsl/renice.xsl, xsl/to-source.xsl | Comment start character | basic-block-to-call, brackets-to-hvcat, for-insert-iteration-indexvar, forward-ad, hvcat-to-brackets, ind-to-subs, nested-to-sub-function, prepare-fm, prepare-rm, pretty-print, rename, reverse-ad, taylor-ad |
comment-spacer | ' ' | xsl/has-end.xsl, xsl/renice.xsl, xsl/to-source.xsl | Space to insert after comment start character | basic-block-to-call, brackets-to-hvcat, for-insert-iteration-indexvar, forward-ad, hvcat-to-brackets, ind-to-subs, nested-to-sub-function, prepare-fm, prepare-rm, pretty-print, rename, reverse-ad, taylor-ad |
comment-start | $comment-char | xsl/has-end.xsl, xsl/renice.xsl, xsl/to-source.xsl | Comment start text | basic-block-to-call, brackets-to-hvcat, for-insert-iteration-indexvar, forward-ad, hvcat-to-brackets, ind-to-subs, nested-to-sub-function, prepare-fm, prepare-rm, pretty-print, rename, reverse-ad, taylor-ad |
forward-deriv-function-prefix | $forward-deriv-prefix | xsl/has-end.xsl, xsl/replicate-funref-assignments.xsl, xsl/renice.xsl, xsl/to-source.xsl | the prefix for forward-ad derivative variables | basic-block-to-call, brackets-to-hvcat, for-insert-iteration-indexvar, forward-ad, hvcat-to-brackets, ind-to-subs, nested-to-sub-function, prepare-fm, prepare-rm, pretty-print, rename, reverse-ad, taylor-ad, xaif |
forward-deriv-variable-prefix | $forward-deriv-prefix | xsl/has-end.xsl, xsl/replicate-funref-assignments.xsl, xsl/renice.xsl, xsl/to-source.xsl | the prefix for forward-ad derivative variables | basic-block-to-call, brackets-to-hvcat, for-insert-iteration-indexvar, forward-ad, hvcat-to-brackets, ind-to-subs, nested-to-sub-function, prepare-fm, prepare-rm, pretty-print, rename, reverse-ad, taylor-ad, xaif |
indent-unit | ' ' | xsl/has-end.xsl, xsl/renice.xsl, xsl/to-source.xsl | Indentation unit | basic-block-to-call, brackets-to-hvcat, for-insert-iteration-indexvar, forward-ad, hvcat-to-brackets, ind-to-subs, nested-to-sub-function, prepare-fm, prepare-rm, pretty-print, rename, reverse-ad, taylor-ad |
input-file-name | $tl-input-file-name | xsl/has-end.xsl, xsl/renice.xsl, xsl/to-source.xsl | For informational purposes only. | basic-block-to-call, brackets-to-hvcat, for-insert-iteration-indexvar, forward-ad, hvcat-to-brackets, ind-to-subs, nested-to-sub-function, prepare-fm, prepare-rm, pretty-print, rename, reverse-ad, taylor-ad |
nocanonicalize | Controls if-then-else. | forward-ad, prepare-fm, prepare-rm, reverse-ad, taylor-ad, xaif | ||
output-directory | $tl-output-directory | xsl/has-end.xsl, xsl/renice.xsl, xsl/to-source.xsl | Only used when output-mode=split-all. | basic-block-to-call, brackets-to-hvcat, for-insert-iteration-indexvar, forward-ad, hvcat-to-brackets, ind-to-subs, nested-to-sub-function, prepare-fm, prepare-rm, pretty-print, rename, reverse-ad, taylor-ad |
output-file-path | $tl-output-file-path | xsl/has-end.xsl, xsl/renice.xsl, xsl/to-source.xsl | For informational purposes only. | basic-block-to-call, brackets-to-hvcat, for-insert-iteration-indexvar, forward-ad, hvcat-to-brackets, ind-to-subs, nested-to-sub-function, prepare-fm, prepare-rm, pretty-print, rename, reverse-ad, taylor-ad |
output-file-prefix | $tl-output-file-prefix | xsl/has-end.xsl, xsl/renice.xsl, xsl/to-source.xsl | Only used when output-mode=split-all. | basic-block-to-call, brackets-to-hvcat, for-insert-iteration-indexvar, forward-ad, hvcat-to-brackets, ind-to-subs, nested-to-sub-function, prepare-fm, prepare-rm, pretty-print, rename, reverse-ad, taylor-ad |
output-mode | 'plain' | xsl/has-end.xsl, xsl/renice.xsl, xsl/to-source.xsl | Set to split-all for one file per function. Otherwise all functions go to "stdout", or the file given with option -o. | basic-block-to-call, brackets-to-hvcat, for-insert-iteration-indexvar, forward-ad, hvcat-to-brackets, ind-to-subs, nested-to-sub-function, prepare-fm, prepare-rm, pretty-print, rename, reverse-ad, taylor-ad |
prefix | xsl/has-end.xsl, xsl/replicate-funref-assignments.xsl, xsl/renice.xsl, xsl/to-source.xsl | the prefix for both derivative variables and functions | basic-block-to-call, brackets-to-hvcat, for-insert-iteration-indexvar, forward-ad, hvcat-to-brackets, ind-to-subs, nested-to-sub-function, prepare-fm, prepare-rm, pretty-print, rename, reverse-ad, taylor-ad, xaif | |
rec-prefix | xsl/has-end.xsl, xsl/replicate-funref-assignments.xsl, xsl/renice.xsl, xsl/to-source.xsl | the prefix for the recording (forward) sweep version of a differentiated function | basic-block-to-call, brackets-to-hvcat, for-insert-iteration-indexvar, forward-ad, hvcat-to-brackets, ind-to-subs, nested-to-sub-function, prepare-fm, prepare-rm, pretty-print, rename, reverse-ad, taylor-ad, xaif | |
ret-prefix | xsl/has-end.xsl, xsl/replicate-funref-assignments.xsl, xsl/renice.xsl, xsl/to-source.xsl | the prefix for the return sweep version of a differentiated function | basic-block-to-call, brackets-to-hvcat, for-insert-iteration-indexvar, forward-ad, hvcat-to-brackets, ind-to-subs, nested-to-sub-function, prepare-fm, prepare-rm, pretty-print, rename, reverse-ad, taylor-ad, xaif | |
rev-prefix | xsl/has-end.xsl, xsl/replicate-funref-assignments.xsl, xsl/renice.xsl, xsl/to-source.xsl | the prefix for the adjoint (recording + return) version of a differentiated function | basic-block-to-call, brackets-to-hvcat, for-insert-iteration-indexvar, forward-ad, hvcat-to-brackets, ind-to-subs, nested-to-sub-function, prepare-fm, prepare-rm, pretty-print, rename, reverse-ad, taylor-ad, xaif | |
show-banner | 1 | xsl/has-end.xsl, xsl/renice.xsl, xsl/to-source.xsl | Insert transformation date into transformed file | basic-block-to-call, brackets-to-hvcat, for-insert-iteration-indexvar, forward-ad, hvcat-to-brackets, ind-to-subs, nested-to-sub-function, prepare-fm, prepare-rm, pretty-print, rename, reverse-ad, taylor-ad |
show-disclaimer | 1 | xsl/has-end.xsl, xsl/renice.xsl, xsl/to-source.xsl | Insert disclaimer into transformed file | basic-block-to-call, brackets-to-hvcat, for-insert-iteration-indexvar, forward-ad, hvcat-to-brackets, ind-to-subs, nested-to-sub-function, prepare-fm, prepare-rm, pretty-print, rename, reverse-ad, taylor-ad |
show-step-ids | 0 | xsl/has-end.xsl, xsl/renice.xsl, xsl/to-source.xsl | Show transformation step ids | basic-block-to-call, brackets-to-hvcat, for-insert-iteration-indexvar, forward-ad, hvcat-to-brackets, ind-to-subs, nested-to-sub-function, prepare-fm, prepare-rm, pretty-print, rename, reverse-ad, taylor-ad |
show-step-params | $show-steps | xsl/has-end.xsl, xsl/renice.xsl, xsl/to-source.xsl | Show transformation step parameters | basic-block-to-call, brackets-to-hvcat, for-insert-iteration-indexvar, forward-ad, hvcat-to-brackets, ind-to-subs, nested-to-sub-function, prepare-fm, prepare-rm, pretty-print, rename, reverse-ad, taylor-ad |
show-steps | 0 | xsl/has-end.xsl, xsl/renice.xsl, xsl/to-source.xsl | Show transformation steps | basic-block-to-call, brackets-to-hvcat, for-insert-iteration-indexvar, forward-ad, hvcat-to-brackets, ind-to-subs, nested-to-sub-function, prepare-fm, prepare-rm, pretty-print, rename, reverse-ad, taylor-ad |
source-line-numbers | 1 | xsl/lhs-lists.xsl, xsl/has-end.xsl, xsl/min-nargin.xsl, xsl/replicate-funref-assignments.xsl, xsl/renice.xsl, xsl/to-source.xsl | Include source line numbers in stmt. labels if set to 1. | basic-block-to-call, brackets-to-hvcat, for-insert-iteration-indexvar, forward-ad, hvcat-to-brackets, ind-to-subs, nested-to-sub-function, prepare-fm, prepare-rm, pretty-print, rename, reverse-ad, taylor-ad, xaif |
spook | contains($show-comments, 'spook') or $show-disclaimer = 0 or $show-authors = 0 | xsl/has-end.xsl, xsl/renice.xsl, xsl/to-source.xsl | codes anarchy Whitehouse Majic defense information warfare Tamil Tigers afsatcom Jet Taiwan insurgency Secure Border Initiative Facility Rule Psix Help Federal Aviation Administration | basic-block-to-call, brackets-to-hvcat, for-insert-iteration-indexvar, forward-ad, hvcat-to-brackets, ind-to-subs, nested-to-sub-function, prepare-fm, prepare-rm, pretty-print, rename, reverse-ad, taylor-ad |
tmp-mode | 'short' | xsl/has-end.xsl, xsl/which-to-canonicalize.xsl, xsl/canonicalize.xsl, xsl/canonicalize-outline-index-lhs.xsl, xsl/renice.xsl, xsl/to-source.xsl | How to name temporary variables. | basic-block-to-call, brackets-to-hvcat, for-insert-iteration-indexvar, forward-ad, hvcat-to-brackets, ind-to-subs, nested-to-sub-function, prepare-fm, prepare-rm, pretty-print, rename, reverse-ad, taylor-ad, xaif |
tmp-prefix | 'tmp' | xsl/has-end.xsl, xsl/which-to-canonicalize.xsl, xsl/canonicalize.xsl, xsl/canonicalize-outline-index-lhs.xsl, xsl/renice.xsl, xsl/to-source.xsl | Prefix of temporary variables. | basic-block-to-call, brackets-to-hvcat, for-insert-iteration-indexvar, forward-ad, hvcat-to-brackets, ind-to-subs, nested-to-sub-function, prepare-fm, prepare-rm, pretty-print, rename, reverse-ad, taylor-ad, xaif |
use-adjsum | not($well-behaved) | xsl/renice.xsl | Whether to use adjsum function for summing adjoints. | forward-ad, prepare-fm, prepare-rm, rename, reverse-ad, taylor-ad |
use-push-index | not($well-behaved) | xsl/renice.xsl | Whether to allow dynamic resize in subsasgn. | forward-ad, prepare-fm, prepare-rm, rename, reverse-ad, taylor-ad |
well-behaved | false() | xsl/renice.xsl | Whether the code is well-behaved: Trigger some optimisations. | forward-ad, prepare-fm, prepare-rm, rename, reverse-ad, taylor-ad |
Filter list
XSLT filter: xsl/directives.xsl
XSLT filter: xsl/preprocess.xsl
XSLT filter: xsl/brackets-to-hvcat.xsl
XSLT filter: xsl/classify-parameters.xsl
XSLT filter: xsl/ops-to-calls.xsl
XSLT filter: xsl/for-insert-iteration-indexvar.xsl
XSLT filter: xsl/add-tmp-vars-to-scope-graph.xsl
XSLT filter: xsl/add-tmp-vars-to-scope-graph1a.xsl
XSLT filter: xsl/add-tmp-vars-to-scope-graph2.xsl
XSLT filter: xsl/add-tmp-vars-to-scope-graph3.xsl
XSLT filter: xsl/rebin.xsl
XSLT filter: xsl/add-derivatives-to-bmfunc-cgnodes.xsl
XSLT filter: xsl/function-index.xsl
XSLT filter: xsl/loop-index.xsl
XSLT filter: xsl/assign-loops-to-breaks.xsl
XSLT filter: xsl/funrefs.xsl
XSLT filter: xsl/lhs-lists.xsl
Parameters: source-line-numbersXSLT filter: xsl/lhs-var-lists2.xsl
XSLT filter: xsl/lhs-var-lists3.xsl
XSLT filter: xsl/calls-and-arrays.xsl
XSLT filter: xsl/in-index.xsl
XSLT filter: xsl/principal-values.xsl
XSLT filter: xsl/has-end.xsl
Parameters: comment-char, comment-spacer, comment-start, forward-deriv-function-prefix, forward-deriv-variable-prefix, indent-unit, input-file-name, output-directory, output-file-path, output-file-prefix, output-mode, prefix, rec-prefix, ret-prefix, rev-prefix, show-banner, show-disclaimer, show-step-ids, show-step-params, show-steps, source-line-numbers, spook, tmp-mode, tmp-prefixXSLT filter: xsl/call-index.xsl
XSLT filter: xsl/ident-info.xsl
XSLT filter: xsl/structs2.xsl
XSLT filter: xsl/side-effects.xsl
XSLT filter: xsl/side-effects2.xsl
XSLT filter: xsl/recompute-directive.xsl
XSLT filter: xsl/directive-differentiate-condition.xsl
XSLT filter: xsl/directive-differentiate-expression.xsl
XSLT filter: xsl/lhs-lists.xsl
Parameters: source-line-numbersXSLT filter: xsl/lhs-var-lists2.xsl
XSLT filter: xsl/kill-parentheses.xsl
XSLT filter: xsl/analyse-new.xsl
XSLT filter: xsl/first-assignment-to-var.xsl
XSLT filter: xsl/pull-first-assignment-info.xsl
if activityAnalysis == "0"
XSLT filter: xsl/local-variables.xsl
XSLT filter: xsl/local-variables2.xsl
XSLT filter: xsl/initialize-variables.xsl
XSLT filter: xsl/initialize-for-variables.xsl
XSLT filter: xsl/signatures.xsl
XSLT filter: xsl/indeps.xsl
XSLT filter: xsl/min-nargin.xsl
Parameters: source-line-numbersif nocanonicalize == "1"
then:
else:
XSLT filter: xsl/which-to-canonicalize.xsl
Parameters: tmp-mode, tmp-prefixXSLT filter: xsl/number-canonicalized.xsl
XSLT filter: xsl/number-canonicalized2.xsl
XSLT filter: xsl/canonicalize.xsl
Parameters: tmp-mode, tmp-prefixXSLT filter: xsl/canonicalize-outline-index-lhs.xsl
Parameters: tmp-mode, tmp-prefix
XSLT filter: xsl/add-tmp-vars-to-scope-graph.xsl
XSLT filter: xsl/add-tmp-vars-to-scope-graph1a.xsl
XSLT filter: xsl/add-tmp-vars-to-scope-graph2.xsl
XSLT filter: xsl/add-tmp-vars-to-scope-graph3.xsl
XSLT filter: xsl/lhs-lists.xsl
Parameters: source-line-numbersXSLT filter: xsl/lhs-var-lists2.xsl
XSLT filter: xsl/parfor-analyse.xsl
XSLT filter: xsl/parfor-analyse2.xsl
XSLT filter: xsl/parfor-analyse3.xsl
XSLT filter: xsl/replicate-funref-assignments.xsl
Parameters: forward-deriv-function-prefix, forward-deriv-variable-prefix, prefix, rec-prefix, ret-prefix, rev-prefix, source-line-numbersXSLT filter: xsl/analyse-new.xsl
XSLT filter: xsl/first-assignment-to-var.xsl
XSLT filter: xsl/pull-first-assignment-info.xsl
XSLT filter: xsl/local-variables.xsl
XSLT filter: xsl/local-variables2.xsl
XSLT filter: xsl/linebreaks.xsl
XSLT filter: xsl/initialize-variables.xsl
XSLT filter: xsl/principal-values.xsl
XSLT filter: xsl/renice.xsl
Parameters: a-zeros-function, adjoint-reductions, adjoint-subsasgn, avoid-vararg-functions, comment-char, comment-spacer, comment-start, forward-deriv-function-prefix, forward-deriv-variable-prefix, indent-unit, input-file-name, output-directory, output-file-path, output-file-prefix, output-mode, prefix, rec-prefix, ret-prefix, rev-prefix, show-banner, show-disclaimer, show-step-ids, show-step-params, show-steps, source-line-numbers, spook, tmp-mode, tmp-prefix, use-adjsum, use-push-index, well-behavedXSLT filter: xsl/hvcat-to-brackets.xsl
XSLT filter: xsl/calls-to-ops.xsl
XSLT filter: xsl/to-source.xsl
Parameters: comment-char, comment-spacer, comment-start, forward-deriv-function-prefix, forward-deriv-variable-prefix, indent-unit, input-file-name, output-directory, output-file-path, output-file-prefix, output-mode, prefix, rec-prefix, ret-prefix, rev-prefix, show-banner, show-disclaimer, show-step-ids, show-step-params, show-steps, source-line-numbers, spook, tmp-mode, tmp-prefix