Skip to content
Snippets Groups Projects

Add experimental half precison support

Merged Markus Holzer requested to merge holzer/pystencils:halfP into master
Files
5
+ 6
0
@@ -519,8 +519,14 @@ class ExtensionModuleCode:
self._code_string = str()
headers = {'<math.h>', '<stdint.h>'}
half = False
for ast in self._ast_nodes:
for field in ast.fields_accessed:
if field.dtype.base_type is None and field.dtype.is_half:
half = True
headers.update(get_headers(ast))
if half:
headers.update({'"half_precision.h"', })
header_list = list(headers)
header_list.sort()
header_list.insert(0, '"Python.h"')
Loading