Skip to content
Snippets Groups Projects
Commit 06813a14 authored by Andreas Klöckner's avatar Andreas Klöckner
Browse files

Merge branch 'wence/feature/dtype-registries' into 'master'

wence/feature/dtype registries

See merge request inducer/loopy!387
parents d1dc2911 27c3e8d3
No related branches found
No related tags found
1 merge request!387wence/feature/dtype registries
Pipeline #22494 failed
......@@ -80,6 +80,11 @@ class DTypeRegistryWrapper(object):
def c99_preamble_generator(preamble_info):
if any(dtype.is_integral() for dtype in preamble_info.seen_dtypes):
yield("10_stdint", "#include <stdint.h>")
if any(dtype.numpy_dtype == np.dtype("bool")
for dtype in preamble_info.seen_dtypes):
yield("10_stdbool", "#include <stdbool.h>")
if any(dtype.is_complex() for dtype in preamble_info.seen_dtypes):
yield("10_complex", "#include <complex.h>")
def _preamble_generator(preamble_info):
......@@ -1079,9 +1084,11 @@ class CTarget(CFamilyTarget):
@memoize_method
def get_dtype_registry(self):
from loopy.target.c.compyte.dtypes import (
DTypeRegistry, fill_registry_with_c99_stdint_types)
DTypeRegistry, fill_registry_with_c99_stdint_types,
fill_registry_with_c99_complex_types)
result = DTypeRegistry()
fill_registry_with_c99_stdint_types(result)
fill_registry_with_c99_complex_types(result)
return DTypeRegistryWrapper(result)
......
Subproject commit 25ee8b48fd0c7d9f0bd987c6862cdb1884fb1372
Subproject commit 7e48e1166a13cfbb7b60f909b071f088034ffda1
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment