SWDEV-144570 - Fix build failure after switching to gcc-7

	- Hex representation of float needs gnu++11. We'd better not relying on
	  that. Change the float in hex format into alternative representation.

	RBT: http://ocltc.amd.com/reviews/r/17300/

Affected files ...

... //depot/stg/opencl/drivers/opencl/api/hip/hip_platform.cpp#29 edit


[ROCm/clr commit: 0da954f20e]
Этот коммит содержится в:
foreman
2019-05-06 17:20:00 -04:00
родитель f567589672
Коммит be2ca7d2ef
+2 -2
Просмотреть файл
@@ -642,9 +642,9 @@ static inline int clamp_int(int i, int l, int h) { return std::min(std::max(i, l
// half float, the f16 is in the low 16 bits of the input argument
static inline float __convert_half_to_float(std::uint32_t a) noexcept {
std::uint32_t u = ((a << 13) + 0x70000000U) & 0x8fffe000U;
std::uint32_t v = f32_as_u32(u32_as_f32(u) * 0x1.0p+112f) + 0x38000000U;
std::uint32_t v = f32_as_u32(u32_as_f32(u) * u32_as_f32(0x77800000U)/*0x1.0p+112f*/) + 0x38000000U;
u = (a & 0x7fff) != 0 ? v : u;
return u32_as_f32(u) * 0x1.0p-112f;
return u32_as_f32(u) * u32_as_f32(0x07800000U)/*0x1.0p-112f*/;
}
// float half with nearest even rounding