Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
pystencils
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
Model registry
Operate
Environments
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
Commits
e5700eb4
Commit
e5700eb4
authored
5 years ago
by
Stephan Seitz
Browse files
Options
Downloads
Patches
Plain Diff
Add `get_dummy_symbol`
parent
faf330f8
No related branches found
No related tags found
1 merge request
!9
Add CudaBackend, CudaSympyPrinter
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
pystencils/astnodes.py
+5
-0
5 additions, 0 deletions
pystencils/astnodes.py
with
5 additions
and
0 deletions
pystencils/astnodes.py
+
5
−
0
View file @
e5700eb4
import
uuid
from
typing
import
Any
,
List
,
Optional
,
Sequence
,
Set
,
Union
from
typing
import
Any
,
List
,
Optional
,
Sequence
,
Set
,
Union
import
jinja2
import
jinja2
...
@@ -700,3 +701,7 @@ class DestructuringBindingsForFieldClass(Node):
...
@@ -700,3 +701,7 @@ class DestructuringBindingsForFieldClass(Node):
def
atoms
(
self
,
arg_type
)
->
Set
[
Any
]:
def
atoms
(
self
,
arg_type
)
->
Set
[
Any
]:
return
self
.
body
.
atoms
(
arg_type
)
|
{
s
for
s
in
self
.
symbols_defined
if
isinstance
(
s
,
arg_type
)}
return
self
.
body
.
atoms
(
arg_type
)
|
{
s
for
s
in
self
.
symbols_defined
if
isinstance
(
s
,
arg_type
)}
def
get_dummy_symbol
(
dtype
=
'
bool
'
):
return
TypedSymbol
(
'
dummy%s
'
%
uuid
.
uuid4
().
hex
,
create_type
(
dtype
))
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