Skip to content
Snippets Groups Projects
Commit c5a41e2e authored by Frederik Hennig's avatar Frederik Hennig
Browse files

fixed generator script docs

parent f36a80dd
No related branches found
No related tags found
Loading
Pipeline #58415 passed
...@@ -67,7 +67,8 @@ With [`SfgComposer.include`][pystencilssfg.SfgComposer.include], the code genera ...@@ -67,7 +67,8 @@ With [`SfgComposer.include`][pystencilssfg.SfgComposer.include], the code genera
to include header files. to include header files.
```Python ```Python
with SourceFileGenerator(sfg_config) as sfg: with SourceFileGenerator(sfg_config) as ctx:
sfg = SfgComposer(ctx)
# ... # ...
sfg.include("<vector>") sfg.include("<vector>")
sfg.incldue("custom_header.h") sfg.incldue("custom_header.h")
...@@ -93,7 +94,8 @@ If required, use [`SfgComposer.kernel_namespace`][pystencilssfg.SfgComposer.kern ...@@ -93,7 +94,8 @@ If required, use [`SfgComposer.kernel_namespace`][pystencilssfg.SfgComposer.kern
to access other kernel namespaces than the default one. to access other kernel namespaces than the default one.
```Python ```Python
with SourceFileGenerator(sfg_config) as sfg: with SourceFileGenerator(sfg_config) as ctx:
sfg = SfgComposer(ctx)
# ... # ...
ast = ps.create_kernel(assignments, config) ast = ps.create_kernel(assignments, config)
...@@ -127,7 +129,8 @@ Use [`SfgComposer.function`][pystencilssfg.SfgComposer.function] to create a fun ...@@ -127,7 +129,8 @@ Use [`SfgComposer.function`][pystencilssfg.SfgComposer.function] to create a fun
and [`SfgComposer.call`][pystencilssfg.SfgComposer.call] to call a kernel by its handle: and [`SfgComposer.call`][pystencilssfg.SfgComposer.call] to call a kernel by its handle:
```Python ```Python
with SourceFileGenerator(sfg_config) as sfg: with SourceFileGenerator(sfg_config) as ctx:
sfg = SfgComposer(ctx)
# ... # ...
sfg.function("MyFunction")( sfg.function("MyFunction")(
...@@ -167,7 +170,8 @@ A conditonal branch may be added with [`SfgComposer.branch`][pystencilssfg.SfgCo ...@@ -167,7 +170,8 @@ A conditonal branch may be added with [`SfgComposer.branch`][pystencilssfg.SfgCo
using a special syntax: using a special syntax:
```Python ```Python
with SourceFileGenerator(sfg_config) as sfg: with SourceFileGenerator(sfg_config) as ctx:
sfg = SfgComposer(ctx)
# ... # ...
sfg.function("myFunction")( sfg.function("myFunction")(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment