|
14 | 14 | CallFromPointer, Cast, DefFunction, FieldFromPointer, |
15 | 15 | INT, FieldFromComposite, IntDiv, Namespace, Rvalue, |
16 | 16 | ReservedWord, ListInitializer, uxreplace, pow_to_mul, |
17 | | - retrieve_derivatives, BaseCast) |
| 17 | + retrieve_derivatives, BaseCast, SizeOf) |
18 | 18 | from devito.tools import as_tuple |
19 | 19 | from devito.types import (Array, Bundle, FIndexed, LocalObject, Object, |
20 | 20 | ComponentAccess, StencilDimension, Symbol as dSymbol) |
@@ -877,7 +877,6 @@ def test_assumptions(self, op, expr, assumptions, expected): |
877 | 877 |
|
878 | 878 |
|
879 | 879 | def test_issue_2577a(): |
880 | | - |
881 | 880 | u = TimeFunction(name='u', grid=Grid((2,))) |
882 | 881 | x = u.grid.dimensions[0] |
883 | 882 | expr = Mul(-1, -1., x, u) |
@@ -906,3 +905,10 @@ def define(self, dimensions): |
906 | 905 |
|
907 | 906 | op = Operator(eq_u) |
908 | 907 | assert '--' not in str(op.ccode) |
| 908 | + |
| 909 | + |
| 910 | +def test_print_div(): |
| 911 | + a = SizeOf(np.int32) |
| 912 | + b = SizeOf(np.int64) |
| 913 | + cstr = ccode(a / b) |
| 914 | + assert cstr == 'sizeof(int)/sizeof(long)' |
0 commit comments