21#ifndef EIGEN_TYPE_CASTING_SYCL_H
22#define EIGEN_TYPE_CASTING_SYCL_H
27#ifdef SYCL_DEVICE_ONLY
29struct type_casting_traits<float,
int> {
35pcast<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>();
41struct type_casting_traits<
int, float> {
47pcast<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>();
53struct type_casting_traits<double, float> {
59pcast<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());
69struct type_casting_traits<float, double> {
75pcast<cl::sycl::cl_float4, cl::sycl::cl_double2>(
const cl::sycl::cl_float4&
a) {
77 return cl::sycl::cl_double2(
a.x(),
a.y());
ArrayXXi a
Definition Array_initializer_list_23_cxx11.cpp:1
#define EIGEN_ALWAYS_INLINE
Definition Macros.h:932
#define EIGEN_DEVICE_FUNC
Definition Macros.h:976
Scalar * b
Definition benchVecAdd.cpp:17
Namespace containing all symbols from the Eigen library.
Definition bench_norm.cpp:85
Definition BandTriangularSolver.h:13
@ TgtCoeffRatio
Definition GenericPacketMath.h:152
@ VectorizedCast
Definition GenericPacketMath.h:150
@ SrcCoeffRatio
Definition GenericPacketMath.h:151