Skip to content

Commit

Permalink
Merge pull request #2274 from devitocodes/shortp
Browse files Browse the repository at this point in the history
misc: fix short/ushort codegen
  • Loading branch information
mloubout authored Dec 4, 2023
2 parents 25fa68b + 74af0da commit 1b5f8c3
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions devito/symbolics/extended_sympy.py
Original file line number Diff line number Diff line change
Expand Up @@ -675,6 +675,14 @@ class UCHARP(CastStar):
base = UCHAR


class SHORTP(CastStar):
base = SHORT


class USHORTP(CastStar):
base = USHORT


cast_mapper = {
np.int8: CHAR,
np.uint8: UCHAR,
Expand All @@ -691,8 +699,8 @@ class UCHARP(CastStar):
(np.int8, '*'): CHARP,
(np.uint8, '*'): UCHARP,
(int, '*'): INTP, # noqa
(np.uint16, '*'): INTP, # noqa
(np.int16, '*'): INTP, # noqa
(np.uint16, '*'): USHORTP, # noqa
(np.int16, '*'): SHORTP, # noqa
(np.int32, '*'): INTP, # noqa
(np.int64, '*'): INTP, # noqa
(np.float32, '*'): FLOATP, # noqa
Expand Down

0 comments on commit 1b5f8c3

Please sign in to comment.