|
13 | 13 | from devito.data import default_allocator
|
14 | 14 | from devito.parameters import configuration
|
15 | 15 | from devito.tools import (Pickable, as_tuple, ctypes_to_cstr, dtype_to_ctype,
|
16 |
| - frozendict, memoized_meth, sympy_mutex, dtype_to_cstr, |
17 |
| - CustomDtype) |
| 16 | + frozendict, memoized_meth, sympy_mutex) |
18 | 17 | from devito.types.args import ArgProvider
|
19 | 18 | from devito.types.caching import Cached, Uncached
|
20 | 19 | from devito.types.lazy import Evaluable
|
@@ -432,16 +431,7 @@ def _C_name(self):
|
432 | 431 |
|
433 | 432 | @property
|
434 | 433 | def _C_ctype(self):
|
435 |
| - if isinstance(self.dtype, CustomDtype): |
436 |
| - return self.dtype |
437 |
| - elif np.issubdtype(self.dtype, np.complexfloating): |
438 |
| - rtype = self.dtype(0).real.__class__ |
439 |
| - ctname = '%s complex' % dtype_to_cstr(rtype) |
440 |
| - ctype = dtype_to_ctype(rtype) |
441 |
| - r = type(ctname, (ctype,), {}) |
442 |
| - return r |
443 |
| - else: |
444 |
| - return dtype_to_ctype(self.dtype) |
| 434 | + return dtype_to_ctype(self.dtype) |
445 | 435 |
|
446 | 436 | def _subs(self, old, new, **hints):
|
447 | 437 | """
|
@@ -1438,14 +1428,7 @@ def _C_name(self):
|
1438 | 1428 | @cached_property
|
1439 | 1429 | def _C_ctype(self):
|
1440 | 1430 | try:
|
1441 |
| - if np.issubdtype(self.dtype, np.complexfloating): |
1442 |
| - rtype = self.dtype(0).real.__class__ |
1443 |
| - ctname = '%s complex' % dtype_to_cstr(rtype) |
1444 |
| - ctype = dtype_to_ctype(rtype) |
1445 |
| - r = type(ctname, (ctype,), {}) |
1446 |
| - return POINTER(r) |
1447 |
| - else: |
1448 |
| - return POINTER(dtype_to_ctype(self.dtype)) |
| 1431 | + return POINTER(dtype_to_ctype(self.dtype)) |
1449 | 1432 | except TypeError:
|
1450 | 1433 | # `dtype` is a ctypes-derived type!
|
1451 | 1434 | return self.dtype
|
|
0 commit comments