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