From f25ea0efa6f139effa96d45ee3fc90734448791d Mon Sep 17 00:00:00 2001 From: mloubout Date: Mon, 30 Sep 2024 14:19:08 -0400 Subject: [PATCH 1/2] compiler: missingcutom dtype --- devito/tools/dtypes_lowering.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/devito/tools/dtypes_lowering.py b/devito/tools/dtypes_lowering.py index 4e7908a552..b5b564a4d7 100644 --- a/devito/tools/dtypes_lowering.py +++ b/devito/tools/dtypes_lowering.py @@ -138,7 +138,9 @@ def dtype_to_ctype(dtype): except KeyError: pass - if issubclass(dtype, ctypes._SimpleCData): + if isinstance(dtype, CustomDtype): + return dtype + elif issubclass(dtype, ctypes._SimpleCData): # Bypass np.ctypeslib's normalization rules such as # `np.ctypeslib.as_ctypes_type(ctypes.c_void_p) -> ctypes.c_ulong` return dtype From ef578dd6d6c4ae31832721b59f876c1b5a5f9a1e Mon Sep 17 00:00:00 2001 From: mloubout Date: Wed, 2 Oct 2024 09:13:12 -0400 Subject: [PATCH 2/2] symbolics: add missing unsigned int --- devito/symbolics/extended_sympy.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/devito/symbolics/extended_sympy.py b/devito/symbolics/extended_sympy.py index 7ed801d17a..4087bbc72c 100644 --- a/devito/symbolics/extended_sympy.py +++ b/devito/symbolics/extended_sympy.py @@ -799,6 +799,14 @@ class UCHAR(Cast): _base_typ = 'unsigned char' +class UINT(Cast): + _base_typ = 'unsigned int' + + +class UINTP(CastStar): + base = UINT + + class LONG(Cast): _base_typ = 'long'