SWDEV-384362 - Added explicit cast from __fp16 to _Float16 in rcph

Change-Id: Ibbb11e928a80126ed7a8c7cd8bddebc74c38986d
Tá an tiomantas seo le fáil i:
Ioannis Assiouras tiomanta 2023-02-21 17:32:59 -05:00
1 tuismitheoir cbb3937196
tiomantas aaf1c19609
1 comhad athraithe
+3 -3
+3 -3
Féach ar an gComhad
@@ -1569,7 +1569,7 @@ THE SOFTWARE.
__half hrcp(__half x)
{
return __half_raw{
__builtin_amdgcn_rcph(static_cast<__half_raw>(x).data)};
static_cast<_Float16>(__builtin_amdgcn_rcph(static_cast<__half_raw>(x).data))};
}
inline
__device__
@@ -1673,8 +1673,8 @@ THE SOFTWARE.
inline
__HOST_DEVICE__
__half2 h2rcp(__half2 x) {
return _Float16_2{__builtin_amdgcn_rcph(x.x),
__builtin_amdgcn_rcph(x.y)};
return _Float16_2{static_cast<_Float16>(__builtin_amdgcn_rcph(x.x)),
static_cast<_Float16>(__builtin_amdgcn_rcph(x.y))};
}
inline
__HOST_DEVICE__