Skip to content

Commit

Permalink
compiler: Fix Bundle.properties
Browse files Browse the repository at this point in the history
  • Loading branch information
FabioLuporini committed Nov 15, 2024
1 parent 7acca9a commit 2042d86
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions devito/types/array.py
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,8 @@ def __args_setup__(cls, *args, **kwargs):
raise ValueError("Component type must be subclass of AbstractFunction")
if len({i.__padding_dtype__ for i in components}) != 1:
raise ValueError("Components must have the same padding dtype")
if len({i.properties for i in components}) != 1:
raise ValueError("Components must have the same properties")

return args, kwargs

Expand Down Expand Up @@ -441,12 +443,13 @@ def initvalue(self):

# Overrides defaulting to self.c0's behaviour

for i in ['_mem_internal_eager', '_mem_internal_lazy', '_mem_local',
for i in ('_mem_internal_eager', '_mem_internal_lazy', '_mem_local',
'_mem_mapped', '_mem_host', '_mem_stack', '_mem_constant',
'_mem_shared', '__padding_dtype__', '_size_domain', '_size_halo',
'_size_owned', '_size_padding', '_size_nopad', '_size_nodomain',
'_offset_domain', '_offset_halo', '_offset_owned', '_dist_dimensions',
'_C_get_field', 'grid', 'symbolic_shape']:
'_C_get_field', 'grid', 'symbolic_shape',
*AbstractFunction.__properties__):
locals()[i] = property(lambda self, v=i: getattr(self.c0, v))

@property
Expand Down

0 comments on commit 2042d86

Please sign in to comment.