Skip to content

Commit

Permalink
dsl: Reworked inheritance
Browse files Browse the repository at this point in the history
  • Loading branch information
EdCaunt committed Nov 13, 2024
1 parent ff4b4d0 commit acdcb1e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
6 changes: 3 additions & 3 deletions devito/types/basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ def bound_symbols(self):
return set()


class AbstractSymbol(sympy.Symbol, Basic, Pickable, Evaluable, ArgProvider):
class AbstractSymbol(sympy.Symbol, Basic, Pickable, Evaluable):

"""
Base class for scalar symbols.
Expand Down Expand Up @@ -526,7 +526,7 @@ def __new__(cls, *args, **kwargs):
__hash__ = Cached.__hash__


class DataSymbol(AbstractSymbol, Uncached):
class DataSymbol(AbstractSymbol, Uncached, ArgProvider):

"""
A unique scalar symbol that carries data.
Expand All @@ -549,7 +549,7 @@ def __new__(cls, *args, **kwargs):
__hash__ = Uncached.__hash__


class Scalar(Symbol):
class Scalar(Symbol, ArgProvider):

"""
Like a Symbol, but in addition it can pass runtime values to an Operator.
Expand Down
3 changes: 1 addition & 2 deletions devito/types/constant.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@

from devito.exceptions import InvalidArgument
from devito.logger import warning
from devito.types.args import ArgProvider
from devito.types.basic import DataSymbol

__all__ = ['Constant']


class Constant(DataSymbol, ArgProvider):
class Constant(DataSymbol):

"""
Symbol representing a constant, scalar value in symbolic equations.
Expand Down

0 comments on commit acdcb1e

Please sign in to comment.