14 #define EIGEN_TEST_NO_LONGDOUBLE 15 #define EIGEN_TEST_NO_COMPLEX 16 #define EIGEN_TEST_FUNC cxx11_tensor_forced_eval_sycl 17 #define EIGEN_DEFAULT_DENSE_INDEX_TYPE int 18 #define EIGEN_USE_SYCL 21 #include <unsupported/Eigen/CXX11/Tensor> 39 in1 = in1.random() + in1.constant(10.0
f);
40 in2 = in2.random() + in2.constant(10.0
f);
49 gpu_out.
device(sycl_device) =(gpu_in1 + gpu_in2).
eval() * gpu_in2;
51 for (
int i = 0;
i < sizeDim1; ++
i) {
52 for (
int j = 0;
j < sizeDim2; ++
j) {
53 for (
int k = 0; k < sizeDim3; ++k) {
55 (in1(
i,
j, k) + in2(
i,
j, k)) * in2(
i,
j, k));
59 printf(
"(a+b)*b Test Passed\n");
60 sycl_device.deallocate(gpu_in1_data);
61 sycl_device.deallocate(gpu_in2_data);
62 sycl_device.deallocate(gpu_out_data);
67 cl::sycl::gpu_selector
s;
68 Eigen::SyclDevice sycl_device(s);
void test_forced_eval_sycl(const Eigen::SyclDevice &sycl_device)
TensorDevice< TensorMap< PlainObjectType, Options_, MakePointer_ >, DeviceType > device(const DeviceType &device)
void test_cxx11_tensor_forced_eval_sycl()
#define VERIFY_IS_APPROX(a, b)
A tensor expression mapping an existing array of data.
Point2(* f)(const Point3 &, OptionalJacobian< 2, 3 >)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE DenseIndex TotalSize() const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar * data()
#define CALL_SUBTEST(FUNC)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Dimensions & dimensions() const
internal::nested_eval< T, 1 >::type eval(const T &xpr)