ADiMat Server | Interactive | Documentation | Downloads | Login

ADiMat Interactive

Toolchains - Parameters - Filters

Toolchain reverse-ad: Reverse mode differentiation

Transforms the code in reverse mode AD.

Parameters

NameDefault valueFiltersDescriptionToolchains
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
activityAnalysisControls if-then-else.forward-ad, prepare-fm, prepare-rm, reverse-ad, taylor-ad, xaif
adjoint-reductionsnot($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-subsasgnnot($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
allow-array-growthtrue()xsl/reverse-ad.xsl Whether the size of an array being assigned to is allowed to change. reverse-ad
avoid-vararg-functionstrue()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-charxsl/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-prefixxsl/has-end.xsl, xsl/replicate-funref-assignments.xsl, xsl/renice.xsl, xsl/tmp-resolve2.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-prefixxsl/has-end.xsl, xsl/replicate-funref-assignments.xsl, xsl/renice.xsl, xsl/tmp-resolve2.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-namexsl/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
no-missing-adjoint-args$well-behavedxsl/reverse-ad.xsl Whether to conditionally initialize adjoints of output parameters to zero. reverse-ad
nocanonicalizeControls if-then-else.forward-ad, prepare-fm, prepare-rm, reverse-ad, taylor-ad, xaif
output-directory$tl-output-directoryxsl/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-pathxsl/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-prefixxsl/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
prefixxsl/has-end.xsl, xsl/replicate-funref-assignments.xsl, xsl/renice.xsl, xsl/tmp-resolve2.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
print-stack-info0xsl/reverse-ad.xsl, xsl/insert-stack-info-calls.xsl Insert code printing the current size of the stack. 1: call info function between forward and reverse sweep. 2: call info function on entering and leaving each function. reverse-ad
rec-prefixxsl/has-end.xsl, xsl/replicate-funref-assignments.xsl, xsl/renice.xsl, xsl/tmp-resolve2.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-prefixxsl/has-end.xsl, xsl/replicate-funref-assignments.xsl, xsl/renice.xsl, xsl/tmp-resolve2.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-prefixxsl/has-end.xsl, xsl/replicate-funref-assignments.xsl, xsl/renice.xsl, xsl/tmp-resolve2.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-banner1xsl/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-disclaimer1xsl/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-ids0xsl/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-stepsxsl/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-steps0xsl/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-numbers1xsl/lhs-lists.xsl, xsl/has-end.xsl, xsl/min-nargin.xsl, xsl/replicate-funref-assignments.xsl, xsl/merge-following-reverseops.xsl, xsl/renice.xsl, xsl/tmp-resolve2.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
spookcontains($show-comments, 'spook') or $show-disclaimer = 0 or $show-authors = 0xsl/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
stack-info-functionxsl/reverse-ad.xsl, xsl/insert-stack-info-calls.xsl Name of the info function to be called when print-stack-info > 0. reverse-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/tmp-resolve2.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
tmpModeControls if-then-else.forward-ad, reverse-ad, taylor-ad
use-adjsumnot($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-indexnot($well-behaved)xsl/renice.xsl Whether to allow dynamic resize in subsasgn. forward-ad, prepare-fm, prepare-rm, rename, reverse-ad, taylor-ad
well-behavedfalse()xsl/reverse-ad.xsl, 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

  1. XSLT filter: xsl/directives.xsl

  2. XSLT filter: xsl/preprocess.xsl

  3. XSLT filter: xsl/brackets-to-hvcat.xsl

  4. XSLT filter: xsl/classify-parameters.xsl

  5. XSLT filter: xsl/ops-to-calls.xsl

  6. XSLT filter: xsl/for-insert-iteration-indexvar.xsl

  7. XSLT filter: xsl/add-tmp-vars-to-scope-graph.xsl

  8. XSLT filter: xsl/add-tmp-vars-to-scope-graph1a.xsl

  9. XSLT filter: xsl/add-tmp-vars-to-scope-graph2.xsl

  10. XSLT filter: xsl/add-tmp-vars-to-scope-graph3.xsl

  11. XSLT filter: xsl/rebin.xsl

  12. XSLT filter: xsl/add-derivatives-to-bmfunc-cgnodes.xsl

  13. XSLT filter: xsl/function-index.xsl

  14. XSLT filter: xsl/loop-index.xsl

  15. XSLT filter: xsl/assign-loops-to-breaks.xsl

  16. XSLT filter: xsl/funrefs.xsl

  17. XSLT filter: xsl/lhs-lists.xsl


    Parameters:
    source-line-numbers
  18. XSLT filter: xsl/lhs-var-lists2.xsl

  19. XSLT filter: xsl/lhs-var-lists3.xsl

  20. XSLT filter: xsl/calls-and-arrays.xsl

  21. XSLT filter: xsl/in-index.xsl

  22. XSLT filter: xsl/principal-values.xsl

  23. XSLT filter: xsl/principal-vars.xsl

  24. XSLT filter: xsl/reflexive-indices.xsl

  25. 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-prefix
  26. XSLT filter: xsl/call-index.xsl

  27. XSLT filter: xsl/ident-info.xsl

  28. XSLT filter: xsl/structs2.xsl

  29. XSLT filter: xsl/side-effects.xsl

  30. XSLT filter: xsl/side-effects2.xsl

  31. XSLT filter: xsl/recompute-directive.xsl

  32. XSLT filter: xsl/directive-differentiate-condition.xsl

  33. XSLT filter: xsl/directive-differentiate-expression.xsl

  34. XSLT filter: xsl/lhs-lists.xsl


    Parameters:
    source-line-numbers
  35. XSLT filter: xsl/lhs-var-lists2.xsl

  36. XSLT filter: xsl/kill-parentheses.xsl

  37. XSLT filter: xsl/analyse-new.xsl

  38. XSLT filter: xsl/first-assignment-to-var.xsl

  39. XSLT filter: xsl/pull-first-assignment-info.xsl

  40. if activityAnalysis == "0"

  41. XSLT filter: xsl/local-variables.xsl

  42. XSLT filter: xsl/local-variables2.xsl

  43. XSLT filter: xsl/initialize-variables.xsl

  44. XSLT filter: xsl/initialize-for-variables.xsl

  45. XSLT filter: xsl/signatures.xsl

  46. XSLT filter: xsl/indeps.xsl

  47. XSLT filter: xsl/min-nargin.xsl


    Parameters:
    source-line-numbers
  48. if nocanonicalize == "1"

  49. XSLT filter: xsl/add-tmp-vars-to-scope-graph.xsl

  50. XSLT filter: xsl/add-tmp-vars-to-scope-graph1a.xsl

  51. XSLT filter: xsl/add-tmp-vars-to-scope-graph2.xsl

  52. XSLT filter: xsl/add-tmp-vars-to-scope-graph3.xsl

  53. XSLT filter: xsl/lhs-lists.xsl


    Parameters:
    source-line-numbers
  54. XSLT filter: xsl/lhs-var-lists2.xsl

  55. XSLT filter: xsl/parfor-analyse.xsl

  56. XSLT filter: xsl/parfor-analyse2.xsl

  57. XSLT filter: xsl/parfor-analyse3.xsl

  58. 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-numbers
  59. XSLT filter: xsl/analyse-new.xsl

  60. XSLT filter: xsl/first-assignment-to-var.xsl

  61. XSLT filter: xsl/pull-first-assignment-info.xsl

  62. XSLT filter: xsl/local-variables.xsl

  63. XSLT filter: xsl/local-variables2.xsl

  64. XSLT filter: xsl/linebreaks.xsl

  65. XSLT filter: xsl/initialize-variables.xsl

  66. XSLT filter: xsl/principal-values.xsl

  67. XSLT filter: xsl/principal-vars.xsl

  68. XSLT filter: xsl/reflexive-indices.xsl

  69. XSLT filter: xsl/reverse-ad.xsl


    Parameters:
    allow-array-growth, no-missing-adjoint-args, well-behaved
  70. XSLT filter: xsl/remove-nested-statement-lists.xsl

  71. XSLT filter: xsl/function-index.xsl

  72. XSLT filter: xsl/merge-following-reverseops.xsl


    Parameters:
    source-line-numbers
  73. 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-behaved
  74. XSLT filter: xsl/insert-stack-info-calls.xsl


    Parameters:
    print-stack-info, stack-info-function
  75. XSLT filter: xsl/hvcat-to-brackets.xsl

  76. XSLT filter: xsl/calls-to-ops.xsl

  77. if tmpMode == "short-computed"

  78. 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