Skip to content

Commit c61b8cc

Browse files
committed
compiler: Simplify EFuncMetadata
1 parent 8b6731a commit c61b8cc

2 files changed

Lines changed: 4 additions & 8 deletions

File tree

devito/ir/iet/efunc.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
'AsyncCall',
1212
'AsyncCallable',
1313
'CommCallable',
14-
'EFuncMetadata',
1514
'DeviceCall',
1615
'DeviceFunction',
16+
'EFuncMeta',
1717
'ElementalCall',
1818
'ElementalFunction',
1919
'EntryFunction',
@@ -25,21 +25,17 @@
2525

2626

2727
@dataclass(frozen=True)
28-
class EFuncMetadata:
28+
class EFuncMeta:
2929

3030
body: object = None
3131
efuncs: tuple = ()
3232
includes: tuple = ()
3333
namespaces: tuple = ()
3434
libs: tuple = ()
3535

36-
@classmethod
37-
def from_body(cls, body):
38-
return cls(body=body)
39-
4036
@classmethod
4137
def compose(cls, *items):
42-
items = tuple(i for i in items if i is not None)
38+
items = tuple(items)
4339

4440
if not items:
4541
return cls()

tests/test_derivatives.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -933,7 +933,7 @@ def test_unexpand_space_interp_w_saved_timefunc(self):
933933

934934
tau = TensorTimeFunction(name="tau", grid=grid, save=10)
935935

936-
eq = Eq(tau[0,1], tau[2,2])
936+
eq = Eq(tau[0, 1], tau[2, 2])
937937

938938
op = Operator(eq, opt=('advanced', {'expand': False}))
939939

0 commit comments

Comments
 (0)