Skip to content

Commit

Permalink
Update docs/src/opting_out_of_rules.md
Browse files Browse the repository at this point in the history
Co-authored-by: Miha Zgubic <[email protected]>
  • Loading branch information
oxinabox and mzgubic authored Jul 20, 2021
1 parent 819e56a commit b2bf4f7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/src/opting_out_of_rules.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ The Julia compiler will specialize based on inferring the return type of `rrule`
The body of this method doesn't matter, what matters is that it is a method-table.
A simple thing you can do with this is not support opting out.
To do this, filter all methods from the `rrule`/`frule` method table that also occur in the `no_frule`/`no_rrule` table.
This will thus avoid ever hitting an `rrule`/`frule` that returns `nothing` and thus makes your library error.
This will thus avoid ever hitting an `rrule`/`frule` that returns `nothing` (and thus prevents your library from erroring).
This is easily done, though it does mean ignoring the user's stated desire to opt out of the rule.

More complex you can use this to generate code that triggers your AD.
Expand Down

0 comments on commit b2bf4f7

Please sign in to comment.