Defined USING_CUSTOM_FLOAT16 preproc constant along with float16 class and gated formatter for float16

This commit is contained in:
Vladyslav Baranovskyi
2025-02-19 12:07:14 +02:00
parent b5bd5c7388
commit c545d00f92
2 changed files with 3 additions and 0 deletions

View File

@@ -323,6 +323,7 @@ struct fmt::formatter<OpenVulkano::Math::Timestamp>
} }
}; };
#ifdef USING_CUSTOM_FLOAT16
template<> template<>
struct fmt::formatter<float16> : fmt::formatter<float> struct fmt::formatter<float16> : fmt::formatter<float>
{ {
@@ -332,6 +333,7 @@ struct fmt::formatter<float16> : fmt::formatter<float>
return fmt::formatter<float>::format(static_cast<float>(f), ctx); return fmt::formatter<float>::format(static_cast<float>(f), ctx);
} }
}; };
#endif
template<> template<>
struct fmt::formatter<OpenVulkano::int24> : fmt::formatter<int32_t> struct fmt::formatter<OpenVulkano::int24> : fmt::formatter<int32_t>

View File

@@ -18,6 +18,7 @@
#elif __has_keyword(__fp16) #elif __has_keyword(__fp16)
typedef __fp16 float16; typedef __fp16 float16;
#else #else
#define USING_CUSTOM_FLOAT16
class float16 class float16
{ {