diff --git a/pyopencl/tools.py b/pyopencl/tools.py index 69c3d855ce2263757e8c627cb557bb5f0e12ab20..6e13479bd3697be077bc58a18e54b016d6b86059 100644 --- a/pyopencl/tools.py +++ b/pyopencl/tools.py @@ -464,10 +464,7 @@ class _CDeclList: return if hasattr(dtype, "subdtype") and dtype.subdtype is not None: - if dtype.subdtype[0] in [np.float64 or np.complex128]: - self.saw_double = True - if dtype.subdtype[0].kind == "c": - self.saw_complex = True + self.add_dtype(dtype.subdtype[0]) return for name, field_data in sorted(six.iteritems(dtype.fields)): @@ -556,6 +553,8 @@ def match_dtype_to_c_struct(device, name, dtype, context=None): field_dtype, offset = dtype_and_offset[:2] if hasattr(field_dtype, "subdtype") and field_dtype.subdtype is not None: array_dtype = field_dtype.subdtype[0] + if hasattr(array_dtype, "subdtype") and array_dtype.subdtype is not None: + raise NotImplementedError("nested array dtypes are not supported") array_dims = field_dtype.subdtype[1] dims_str = "" try: