Skip to content
Snippets Groups Projects

Declare LoopCounterSymbols nonnegative

Merged Stephan Seitz requested to merge seitz/pystencils:LoopCounterSymbols-nonnegative into master
1 file
+ 4
2
Compare changes
  • Side-by-side
  • Inline
+ 4
2
@@ -465,11 +465,13 @@ class LoopOverCoordinate(Node):
@@ -465,11 +465,13 @@ class LoopOverCoordinate(Node):
@staticmethod
@staticmethod
def get_loop_counter_symbol(coordinate_to_loop_over):
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
@staticmethod
def get_block_loop_counter_symbol(coordinate_to_loop_over):
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
@property
def loop_counter_symbol(self):
def loop_counter_symbol(self):
Loading