Skip to content

Commit b255cca

Browse files
committed
compiler: Use python int when padding, if possible
1 parent 22910a3 commit b255cca

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

devito/types/basic.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -930,6 +930,8 @@ def __padding_setup_smart__(self, **kwargs):
930930
else:
931931
from devito.symbolics import RoundUp # noqa
932932
v = RoundUp(snp, mmts) - snp
933+
if v.is_Integer:
934+
v = int(v)
933935

934936
dpadding = (0, v)
935937
padding = [(0, 0)]*self.ndim

0 commit comments

Comments
 (0)