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
Jonas Plewinski
pystencils
Commits
72e9b47b
Commit
72e9b47b
authored
Sep 30, 2019
by
Stephan Seitz
Browse files
Declare LoopCounterSymbols nonnegative
This removed some checks like `ctr1 <= 0` from my kernels
parent
0cc3b825
Changes
1
Hide whitespace changes
Inline
Side-by-side
pystencils/astnodes.py
View file @
72e9b47b
...
...
@@ -465,11 +465,13 @@ class LoopOverCoordinate(Node):
@
staticmethod
def
get_loop_counter_symbol
(
coordinate_to_loop_over
):
return
TypedSymbol
(
LoopOverCoordinate
.
get_loop_counter_name
(
coordinate_to_loop_over
),
'int'
)
return
TypedSymbol
(
LoopOverCoordinate
.
get_loop_counter_name
(
coordinate_to_loop_over
),
'int'
,
nonnegative
=
True
)
@
staticmethod
def
get_block_loop_counter_symbol
(
coordinate_to_loop_over
):
return
TypedSymbol
(
LoopOverCoordinate
.
get_block_loop_counter_name
(
coordinate_to_loop_over
),
'int'
)
return
TypedSymbol
(
LoopOverCoordinate
.
get_block_loop_counter_name
(
coordinate_to_loop_over
),
'int'
,
nonnegative
=
True
)
@
property
def
loop_counter_symbol
(
self
):
...
...
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