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
ec46da10
Commit
ec46da10
authored
3 months ago
by
Frederik Hennig
Browse files
Options
Downloads
Patches
Plain Diff
Add section on header-only mode to docs
parent
c0c1aebe
No related branches found
No related tags found
1 merge request
!22
Remove Inline Output Mode; Automate Inlining in Composer
Pipeline
#74411
passed
3 months ago
Stage: Code Quality
Stage: Tests
Stage: Documentation
Stage: deploy
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
docs/source/usage/config_and_cli.md
+17
-5
17 additions, 5 deletions
docs/source/usage/config_and_cli.md
with
17 additions
and
5 deletions
docs/source/usage/config_and_cli.md
+
17
−
5
View file @
ec46da10
...
...
@@ -42,14 +42,15 @@ The file extensions of the generated files can be modified through
{any}`cfg.extensions.header <FileExtensions.header>`
and {any}`cfg.extensions.impl <FileExtensions.impl>`;
and the output directory of the code generator can be set through {any}`cfg.output_directory <SfgConfig.output_directory>`.
H
eader-only
c
ode
generation
can be enabled using {any}`cfg.header_only <SfgConfig.header_only>`.
The [h
eader-only
m
ode
](#header_only_mode)
can be enabled using {any}`cfg.header_only <SfgConfig.header_only>`.
:::{danger}
When running generator scripts through [CMake](#cmake_integration), you should *never* set the file extensions
and the output directory in the inline configuration.
Both are managed by the pystencils-sfg CMake module, and setting them manually inside the script will
lead to an error.
When running generator scripts through [CMake](#cmake_integration), the file extensions,
output directory, and header-only mode settings will be managed fully by the pystencils-sfg
CMake module and the (optional) project configuration module.
They should therefore not be set in the inline configuration,
as this will likely lead to errors being raised during code generation.
:::
### Outer Namespace
...
...
@@ -89,6 +90,17 @@ with the `--help` flag:
$ python kernels.py --help
```
(header_only_mode)=
## Header-Only Mode
When the header-only output mode is enabled,
the code generator will emit only a header file and no separate implementation file.
In this case, the composer will automatically place all function, method,
and kernel definitions in the header file.
Header-only code generation can be enabled by setting the `--header-only` command-line flag
or the {any}`SfgConfig.header_only` configuration option.
(custom_cli_args)=
## Adding Custom Command-Line Options
...
...
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