10 #ifndef EIGEN_TYPE_CASTING_AVX_H 11 #define EIGEN_TYPE_CASTING_AVX_H 20 struct type_casting_traits<float, int> {
29 struct type_casting_traits<int, float> {
38 #ifndef EIGEN_VECTORIZE_AVX512 41 struct type_casting_traits<
Eigen::half, float> {
51 struct type_casting_traits<float,
Eigen::half> {
60 struct type_casting_traits<bfloat16, float> {
69 struct type_casting_traits<float, bfloat16> {
77 #endif // EIGEN_VECTORIZE_AVX512 79 template<> EIGEN_STRONG_INLINE Packet8i pcast<Packet8f, Packet8i>(
const Packet8f& a) {
80 return _mm256_cvttps_epi32(a);
83 template<> EIGEN_STRONG_INLINE Packet8f pcast<Packet8i, Packet8f>(
const Packet8i& a) {
84 return _mm256_cvtepi32_ps(a);
87 template<> EIGEN_STRONG_INLINE Packet8i preinterpret<Packet8i,Packet8f>(
const Packet8f& a) {
88 return _mm256_castps_si256(a);
91 template<> EIGEN_STRONG_INLINE Packet8f preinterpret<Packet8f,Packet8i>(
const Packet8i& a) {
92 return _mm256_castsi256_ps(a);
95 template<> EIGEN_STRONG_INLINE Packet8f pcast<Packet8h, Packet8f>(
const Packet8h& a) {
99 template<> EIGEN_STRONG_INLINE Packet8f pcast<Packet8bf, Packet8f>(
const Packet8bf& a) {
103 template<> EIGEN_STRONG_INLINE Packet8h pcast<Packet8f, Packet8h>(
const Packet8f& a) {
104 return float2half(a);
107 template<> EIGEN_STRONG_INLINE Packet8bf pcast<Packet8f, Packet8bf>(
const Packet8f& a) {
115 #endif // EIGEN_TYPE_CASTING_AVX_H Namespace containing all symbols from the Eigen library.
Definition: Core:141
Definition: Eigen_Colamd.h:50