Skip to content

Commit

Permalink
misc: Update docstring for Callback
Browse files Browse the repository at this point in the history
  • Loading branch information
ZoeLeibowitz committed Jan 5, 2024
1 parent 83c2b4f commit c87c1c4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions devito/ir/iet/nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -1110,7 +1110,15 @@ class Callback(Call):
The return type of the callback.
param_types : str or list of str
The return type for each argument of the callback.
Notes
-----
The reason Callback is an IET type rather than a SymPy type is
due to the fact that, when represented at the SymPy level, the IET
engine fails to bind the callback to a specific Call. Consequently,
errors occur during the creation of the call graph.
"""

def __init__(self, name, retval, param_types):

super().__init__(name=name)
Expand Down
2 changes: 1 addition & 1 deletion tests/test_iet.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def test_callback_cgen():
code0 = CGen().visit(foo0_arg)
assert str(code0) == '(void (*)(int))foo0'

# test nested calls with a Callback as an argument.
# Test nested calls with a Callback as an argument.
call = Call('foo1', [
Call('foo2', [foo0_arg])
])
Expand Down

0 comments on commit c87c1c4

Please sign in to comment.