Skip to content

Instantly share code, notes, and snippets.

@dan-zheng
Last active January 4, 2020 19:47
Show Gist options
  • Save dan-zheng/0e28c41dd0734fa6d3644e6ed0a9c16f to your computer and use it in GitHub Desktop.
Save dan-zheng/0e28c41dd0734fa6d3644e6ed0a9c16f to your computer and use it in GitHub Desktop.

Revisions

  1. dan-zheng revised this gist Nov 26, 2019. No changes.
  2. dan-zheng revised this gist Nov 26, 2019. No changes.
  3. dan-zheng revised this gist Oct 25, 2019. 1 changed file with 0 additions and 0 deletions.
    Binary file added retrodiff.png
    Loading
    Sorry, something went wrong. Reload?
    Sorry, we cannot display this file.
    Sorry, this file is invalid so it cannot be displayed.
  4. dan-zheng created this gist Oct 25, 2019.
    9 changes: 9 additions & 0 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    Retroactive derivative registration: register derivatives for functions in other modules.

    Previously:
    * If module A defines `func foo`, then its derivatives must be in the same module.

    With retroactive derivative registration:
    * If module A defines `func foo`;
    * And if module B imports module A and defines `@differentiating(foo) func derivativeFoo`:
    * Then module C can import modules A and B and differentiate `func foo` (e.g. via differentiation APIs).