10 #ifndef EIGEN_TYPE_CASTING_SSE_H
11 #define EIGEN_TYPE_CASTING_SSE_H
17 #ifndef EIGEN_VECTORIZE_AVX
19 struct type_casting_traits<float, int> {
28 struct type_casting_traits<int, float> {
56 return _mm_cvttps_epi32(
a);
60 return _mm_cvtepi32_ps(
a);
64 return _mm_shuffle_ps(_mm_cvtpd_ps(
a), _mm_cvtpd_ps(b), (1 << 2) | (1 << 6));
69 return _mm_cvtps_pd(
a);
73 return _mm_castps_si128(
a);
77 return _mm_castsi128_ps(
a);
81 return _mm_castsi128_pd(
a);
85 return _mm_castpd_si128(
a);
93 struct type_casting_traits<
Eigen::
half, float> {
102 __int64_t a64 = _mm_cvtm64_si64(
a.x);
104 float f1 =
static_cast<float>(h);
106 float f2 =
static_cast<float>(h);
108 float f3 =
static_cast<float>(h);
110 float f4 =
static_cast<float>(h);
111 return _mm_set_ps(f4, f3, f2, f1);
115 struct type_casting_traits<float,
Eigen::half> {
132 result.x = _mm_set_pi16(h3.x, h2.x, h1.x, h0.x);
#define EIGEN_STRONG_INLINE
Definition: Macros.h:917
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR __half_raw raw_uint16_to_half(numext::uint16_t x)
Definition: Half.h:495
v2f64 Packet2d
Definition: PacketMath.h:820
__vector int Packet4i
Definition: PacketMath.h:31
EIGEN_STRONG_INLINE Packet4i preinterpret< Packet4i, Packet2d >(const Packet2d &a)
Definition: TypeCasting.h:84
EIGEN_STRONG_INLINE Packet2d pcast< Packet4f, Packet2d >(const Packet4f &a)
Definition: TypeCasting.h:67
EIGEN_STRONG_INLINE Packet4f pcast< Packet4i, Packet4f >(const Packet4i &a)
Definition: PacketMath.h:2198
EIGEN_STRONG_INLINE Packet2d preinterpret< Packet2d, Packet4i >(const Packet4i &a)
Definition: TypeCasting.h:80
EIGEN_DEVICE_FUNC void pstore(Scalar *to, const Packet &from)
Definition: GenericPacketMath.h:696
EIGEN_STRONG_INLINE Packet4i pcast< Packet4f, Packet4i >(const Packet4f &a)
Definition: PacketMath.h:2190
EIGEN_STRONG_INLINE Packet4i preinterpret< Packet4i, Packet4f >(const Packet4f &a)
Definition: PacketMath.h:2244
EIGEN_STRONG_INLINE Packet4f preinterpret< Packet4f, Packet4i >(const Packet4i &a)
Definition: PacketMath.h:2248
__vector float Packet4f
Definition: PacketMath.h:30
EIGEN_STRONG_INLINE Packet4f pcast< Packet2d, Packet4f >(const Packet2d &a, const Packet2d &b)
Definition: TypeCasting.h:63
Namespace containing all symbols from the Eigen library.
Definition: LDLT.h:16
Definition: document.h:416
const GenericPointer< typename T::ValueType > T2 T::AllocatorType & a
Definition: pointer.h:1181
Definition: GenericPacketMath.h:148
@ TgtCoeffRatio
Definition: GenericPacketMath.h:152
@ VectorizedCast
Definition: GenericPacketMath.h:150
@ SrcCoeffRatio
Definition: GenericPacketMath.h:151