21 #ifndef EIGEN_TYPE_CASTING_SYCL_H
22 #define EIGEN_TYPE_CASTING_SYCL_H
27 #ifdef SYCL_DEVICE_ONLY
29 struct type_casting_traits<float, int> {
35 pcast<cl::sycl::cl_float4, cl::sycl::cl_int4>(
const cl::sycl::cl_float4&
a) {
37 .template convert<cl::sycl::cl_int, cl::sycl::rounding_mode::automatic>();
41 struct type_casting_traits<int, float> {
47 pcast<cl::sycl::cl_int4, cl::sycl::cl_float4>(
const cl::sycl::cl_int4&
a) {
48 return a.template convert<cl::sycl::cl_float,
49 cl::sycl::rounding_mode::automatic>();
53 struct type_casting_traits<double, float> {
59 pcast<cl::sycl::cl_double2, cl::sycl::cl_float4>(
60 const cl::sycl::cl_double2&
a,
const cl::sycl::cl_double2& b) {
61 auto a1 =
a.template convert<cl::sycl::cl_float,
62 cl::sycl::rounding_mode::automatic>();
63 auto b1 = b.template convert<cl::sycl::cl_float,
64 cl::sycl::rounding_mode::automatic>();
65 return cl::sycl::float4(a1.x(), a1.y(), b1.x(), b1.y());
69 struct type_casting_traits<float, double> {
75 pcast<cl::sycl::cl_float4, cl::sycl::cl_double2>(
const cl::sycl::cl_float4&
a) {
77 return cl::sycl::cl_double2(
a.x(),
a.y());
#define EIGEN_ALWAYS_INLINE
Definition: Macros.h:932
#define EIGEN_DEVICE_FUNC
Definition: Macros.h:976
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
@ TgtCoeffRatio
Definition: GenericPacketMath.h:152
@ VectorizedCast
Definition: GenericPacketMath.h:150
@ SrcCoeffRatio
Definition: GenericPacketMath.h:151