mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-06-04 18:54:00 +08:00
Worked around missing clang intrinsic
This commit is contained in:
parent
b517ab349b
commit
334e76537f
@ -144,7 +144,7 @@ struct type_casting_traits<half, float> {
|
|||||||
};
|
};
|
||||||
|
|
||||||
template<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet4f pcast<Packet4h, Packet4f>(const Packet4h& a) {
|
template<> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet4f pcast<Packet4h, Packet4f>(const Packet4h& a) {
|
||||||
__int64_t a64 = _m_to_int64(a.x);
|
__int64_t a64 = _mm_cvtm64_si64(a.x);
|
||||||
half h = raw_uint16_to_half(static_cast<unsigned short>(a64));
|
half h = raw_uint16_to_half(static_cast<unsigned short>(a64));
|
||||||
float f1 = static_cast<float>(h);
|
float f1 = static_cast<float>(h);
|
||||||
h = raw_uint16_to_half(static_cast<unsigned short>(a64 >> 16));
|
h = raw_uint16_to_half(static_cast<unsigned short>(a64 >> 16));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user