qfloat16(float) constructor: explicit cast on aarch64 to avoid warning
The warning was global/qfloat16.h: In constructor ‘qfloat16::qfloat16(float)’: global/qfloat16.h:124:18: error: conversion to ‘__fp16’ from ‘float’ may alter its value [-Werror=float-conversion] __fp16 f16 = f; ^ cc1plus: all warnings being treated as errors The warning was added by fb5976038162d93d60c7f76376bbb4df38e83ba9. Change-Id: I489348c4d5d672bfa5d4db99c837696a2a69a27e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
c4885b21d6
commit
a4113d0c64
@ -121,7 +121,7 @@ inline qfloat16::qfloat16(float f) Q_DECL_NOTHROW
|
||||
__m128i packhalf = _mm_cvtps_ph(packsingle, 0);
|
||||
b16 = _mm_extract_epi16(packhalf, 0);
|
||||
#elif defined (__ARM_FP16_FORMAT_IEEE)
|
||||
__fp16 f16 = f;
|
||||
__fp16 f16 = __fp16(f);
|
||||
memcpy(&b16, &f16, sizeof(quint16));
|
||||
#else
|
||||
quint32 u;
|
||||
|
Loading…
x
Reference in New Issue
Block a user