Skip to content
Snippets Groups Projects
Commit f9beddc6 authored by Martin Bauer's avatar Martin Bauer
Browse files

Merge branch 'LoopCounterSymbols-nonnegative' into 'master'

Declare LoopCounterSymbols nonnegative

See merge request pycodegen/pystencils!68
parents 40d720a9 72e9b47b
Branches
Tags
No related merge requests found
......@@ -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):
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment