Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions devito/symbolics/extended_sympy.py
Original file line number Diff line number Diff line change
Expand Up @@ -619,6 +619,14 @@ class CHAR(Cast):
_base_typ = 'char'


class SHORT(Cast):
_base_typ = 'short'


class USHORT(Cast):
_base_typ = 'unsigned short'


class LONG(Cast):
_base_typ = 'long'

Expand All @@ -638,6 +646,8 @@ class CHARP(CastStar):
cast_mapper = {
np.int8: CHAR,
np.uint8: CHAR,
np.int16: SHORT, # noqa
np.uint16: USHORT, # noqa
int: INT, # noqa
np.int32: INT, # noqa
np.int64: LONG,
Expand All @@ -649,6 +659,8 @@ class CHARP(CastStar):
(np.int8, '*'): CHARP,
(np.uint8, '*'): CHARP,
(int, '*'): INTP, # noqa
(np.uint16, '*'): INTP, # noqa
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should actually be USHORTP (to be added) ?

(np.int16, '*'): INTP, # noqa
(np.int32, '*'): INTP, # noqa
(np.int64, '*'): INTP, # noqa
(np.float32, '*'): FLOATP, # noqa
Expand Down