Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Stephan Seitz
pystencils
Commits
d4a8419b
Commit
d4a8419b
authored
Jun 15, 2020
by
Michael Kuron
Browse files
add_types: only re-enable double-write check if it was previously enabled
parent
e685321c
Changes
1
Hide whitespace changes
Inline
Side-by-side
pystencils/transformations.py
View file @
d4a8419b
...
...
@@ -954,6 +954,7 @@ def add_types(eqs, type_for_symbol, check_independence_condition):
check
.
scopes
.
push
()
# Disable double write check inside conditionals
# would be triggered by e.g. in-kernel boundaries
old_double_write
=
check
.
check_double_write_condition
check
.
check_double_write_condition
=
False
false_block
=
None
if
obj
.
false_block
is
None
else
visit
(
obj
.
false_block
)
...
...
@@ -961,7 +962,7 @@ def add_types(eqs, type_for_symbol, check_independence_condition):
obj
.
condition_expr
,
type_constants
=
False
),
true_block
=
visit
(
obj
.
true_block
),
false_block
=
false_block
)
check
.
check_double_write_condition
=
Tru
e
check
.
check_double_write_condition
=
old_double_writ
e
check
.
scopes
.
pop
()
return
result
elif
isinstance
(
obj
,
ast
.
Block
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment