Trying to pass float16 type explicitly via macro(ugly method)

This commit is contained in:
Vladyslav Baranovskyi
2025-02-19 19:08:48 +02:00
parent 4bd2d89379
commit 6f2b637113
2 changed files with 6 additions and 9 deletions

View File

@@ -15,10 +15,13 @@
// map a half float type, if available, to float16
#if __has_keyword(_Float16)
typedef _Float16 float16;
#define UNDERLYING_FLOAT16_TYPE _Float16
#elif __has_keyword(__fp16)
typedef __fp16 float16;
#define UNDERLYING_FLOAT16_TYPE __fp16
#else
#define USING_CUSTOM_FLOAT16
#define UNDERLYING_FLOAT16_TYPE float16
class float16
{