Skip to content
Snippets Groups Projects
Commit 72e9b47b authored by Stephan Seitz's avatar Stephan Seitz
Browse files

Declare LoopCounterSymbols nonnegative

This removed some checks like `ctr1 <= 0` from my kernels
parent 0cc3b825
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