| 1024 | return o; |
| 1025 | } |
| 1026 | static inline FP16 float_to_half_full(FP32 f) { |
| 1027 | FP16 o; |
| 1028 | #if defined(_MSC_VER) && (defined(_M_IX86) || defined(_M_X64)) && defined(__AVX2__) |
| 1029 | o.f = static_cast<TINYEXR_FP16_COMPILER_TYPE> (_mm_cvtsi128_si32(_mm_cvtps_ph(_mm_set_ss(f.f), _MM_FROUND_CUR_DIRECTION))); |
| 1030 | #else |
| 1031 | o.f = static_cast<TINYEXR_FP16_COMPILER_TYPE> (f.f); |
| 1032 | #endif |
| 1033 | return o; |
| 1034 | } |
| 1035 | #else |
| 1036 | static FP32 half_to_float(FP16 h) { |
| 1037 | static const FP32 magic = {113 << 23}; |
no test coverage detected