add half-precision to type_to_C

This commit is contained in:
jan 2022-11-24 22:33:10 -08:00
parent b8ea859106
commit c42ce49983

View File

@ -42,6 +42,7 @@ def type_to_C(
string containing the corresponding C type (eg. 'double') string containing the corresponding C type (eg. 'double')
""" """
types = { types = {
numpy.float16: 'half',
numpy.float32: 'float', numpy.float32: 'float',
numpy.float64: 'double', numpy.float64: 'double',
numpy.complex64: 'cfloat_t', numpy.complex64: 'cfloat_t',