Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
pystencils-sfg
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pycodegen
pystencils-sfg
Commits
c5a41e2e
Commit
c5a41e2e
authored
1 year ago
by
Frederik Hennig
Browse files
Options
Downloads
Patches
Plain Diff
fixed generator script docs
parent
f36a80dd
No related branches found
No related tags found
Loading
Pipeline
#58415
passed
1 year ago
Stage: pretest
Stage: test
Stage: deploy
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
docs/usage/generator_scripts.md
+8
-4
8 additions, 4 deletions
docs/usage/generator_scripts.md
with
8 additions
and
4 deletions
docs/usage/generator_scripts.md
+
8
−
4
View file @
c5a41e2e
...
@@ -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")(
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment