Skip to content

Commit

Permalink
add note about empty function objects (#19)
Browse files Browse the repository at this point in the history
* document what to do for empty function objects

* add link to more complete description

* link to a specific comment, rather than the issue
  • Loading branch information
samuelpmishLLNL authored Sep 20, 2023
1 parent 99eb644 commit 020def4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions content/getting_started/Examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,10 @@ printf("dfdy = %f\n", dfdy);
// prints dfdy = 5.500000
```
> Note: if the member function belongs to a class or struct with no member variables,
it may be optimized away at the call site, which disrupts the argument ordering and
leads to an error. See: https://github.com/EnzymeAD/Enzyme/issues/1388#issuecomment-1728114457 for more information on a workaround.
A more general implementation of the wrapper function (that works with
different objects and argument types) is given below:
Expand Down

0 comments on commit 020def4

Please sign in to comment.