21 #ifndef EIGEN_TYPE_CASTING_SYCL_H
22 #define EIGEN_TYPE_CASTING_SYCL_H
25 #include "../../InternalHeaderCheck.h"
30 #ifdef SYCL_DEVICE_ONLY
32 struct type_casting_traits<float,
int> {
38 const cl::sycl::cl_float4&
a) {
39 return a.template convert<cl::sycl::cl_int, cl::sycl::rounding_mode::automatic>();
43 struct type_casting_traits<
int, float> {
49 const cl::sycl::cl_int4&
a) {
50 return a.template convert<cl::sycl::cl_float, cl::sycl::rounding_mode::automatic>();
54 struct type_casting_traits<
double, float> {
60 const cl::sycl::cl_double2&
a,
const cl::sycl::cl_double2&
b) {
61 auto a1 =
a.template convert<cl::sycl::cl_float, cl::sycl::rounding_mode::automatic>();
62 auto b1 =
b.template convert<cl::sycl::cl_float, cl::sycl::rounding_mode::automatic>();
63 return cl::sycl::cl_float4(a1.x(), a1.y(), b1.x(), b1.y());
67 struct type_casting_traits<float,
double> {
73 const cl::sycl::cl_float4&
a) {
75 return cl::sycl::cl_double2(
a.x(),
a.y());
#define EIGEN_ALWAYS_INLINE
Definition: Macros.h:845
#define EIGEN_DEVICE_FUNC
Definition: Macros.h:892
Scalar * b
Definition: benchVecAdd.cpp:17
const Scalar * a
Definition: level2_cplx_impl.h:32
Namespace containing all symbols from the Eigen library.
Definition: bench_norm.cpp:70
Definition: Eigen_Colamd.h:49
@ TgtCoeffRatio
Definition: GenericPacketMath.h:206
@ VectorizedCast
Definition: GenericPacketMath.h:203
@ SrcCoeffRatio
Definition: GenericPacketMath.h:205